Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
lwc:hardware:wm02_nano_router [2020/11/26 18:05] – created John Harrison | lwc:hardware:wm02_nano_router [2021/08/30 15:20] (current) – [Loading new images] John Harrison | ||
---|---|---|---|
Line 6: | Line 6: | ||
==== Commands: ==== | ==== Commands: ==== | ||
- | Enable wireless: | + | * Enable wireless: |
+ | * Reset to factory defaults: | ||
+ | * mount_root | ||
+ | * mtd -r erase rootfs_data | ||
+ | * reboot -f | ||
- | < | + | * 1to see see iptables rules generated: |
- | < | + | * with a "deny all" rules the below rules would allow LAN to access snappykids.cc IP only |
- | uci set wireless.@wifi-device[0].disabled=0; uci commit wireless; wifi | + | * iptables |
- | </ | + | |
- | Reset to factory defaults: | + | |
- | * mount_root | + | |
- | * mtd -r erase rootfs_data | + | |
- | * reboot | + | |
- | + | * sysupgrade from cmd line: | |
- | + | * Use flag -n if configuration flags should not be kept | |
- | + | * to monitor packets being transmitted use tcpdump. It only catches packets that are actually transmitted tho maybe and not stuff blocked by iptables? | |
- | 1to see see iptables rules generated: | + | * use logread not dmsg to see messages from startup |
- | with a "deny all" rules the below rules would allow LAN to access snappykids.cc IP only | + | * enable init script with / |
- | | + | * get the MAC address of the router: |
- | * iptables -t filter -I zone_wan_output -p udp -d 173.236.164.109/ | + | * " |
- | + | * on 8-Mar-2018 " | |
- | sysupgrade from cmd line: | + | |
- | * Use flag -n if configuration flags should not be kept | + | |
- | + | * stock: | |
- | to monitor packets being transmitted use tcpdump. It only catches packets that are actually transmitted tho maybe and not stuff blocked by iptables? | + | * stock labeled " |
- | use logread not dmsg to see messages from startup | + | * log example: |
- | enable init script with / | + | * to get sshfs to work do an opkg update then opkg install openssh-sftp-server |
- | get the MAC address of the router: | + | * hexdump -C shows you file contents with hex |
- | " | + | * mount example for fat32 read only: mount -t vfat /dev/sdc2 /mnt/share -o ro |
- | on 8-Mar-2018 " | + | * using opkg: |
- | * eth0, eth0.1, br-lan, wlan0 has 00: | + | |
- | * eth0.2 has 02: | + | * get link status of ethernet port: dmesg | tail | grep "link changed" |
- | + | * memory usage by process: | |
- | stock: | + | |
- | stock labeled " | + | |
- | log example: | + | |
- | to get sshfs to work do an opkg update then opkg install openssh-sftp-server | + | |
- | hexdump -C shows you file contents with hex | + | |
- | mount example for fat32 read only: mount -t vfat /dev/sdc2 /mnt/share -o ro | + | |
- | using opkg: | + | |
- | | + | |
- | + | ||
- | get link status of ethernet port: dmesg | tail | grep "link changed" | + | |
- | memory usage by process: | + | |
==== Host Machine ==== | ==== Host Machine ==== | ||
Line 56: | Line 45: | ||
==== SSH in: ==== | ==== SSH in: ==== | ||
- | must ssh in as root. The magical incantation is: ssh -i / | + | * must ssh in as root. The magical incantation is: ssh -i / |
- | if the certificate fails, make sure PubkeyAuthentication no is commented out in / | + | |
- | * it may be necessary to restart the ssh service after making this change: | + | * it may be necessary to restart the ssh service after making this change: |
==== OpenWRT and firmware ==== | ==== OpenWRT and firmware ==== | ||
- | [[https:// | + | * [[https:// |
- | [[https:// | + | |
- | [[https:// | + | |
- | * [[https:// | + | * [[https:// |
==== RT5350 SDK Firmware ==== | ==== RT5350 SDK Firmware ==== | ||
* [[https:// | * [[https:// | ||
- | |||
===== NTP server ===== | ===== NTP server ===== | ||
Line 77: | Line 64: | ||
* add into / | * add into / | ||
* not sure if it matters or not but in / | * not sure if it matters or not but in / | ||
- | + | <code> | |
- | + | ||
- | <HTML>< | + | |
- | < | + | |
config timeserver ' | config timeserver ' | ||
- | |||
- | |||
- | </ | ||
- | < | ||
option enabled ' | option enabled ' | ||
- | |||
- | </ | ||
- | < | ||
option enable_server ' | option enable_server ' | ||
- | + | </code> | |
- | </blockquote></ | + | |
* not sure why but ESP8266 isn't always getting it | * not sure why but ESP8266 isn't always getting it | ||
Line 98: | Line 74: | ||
(based on https:// | (based on https:// | ||
- | |||
- | \\ | ||
- | |||
Change / | Change / | ||
- | + | <code> | |
- | <HTML>< | + | |
config interface ' | config interface ' | ||
- | |||
- | |||
- | |||
option ifname ' | option ifname ' | ||
- | |||
- | |||
- | |||
option proto ' | option proto ' | ||
- | |||
- | |||
- | |||
option ipaddr ' | option ipaddr ' | ||
- | |||
- | |||
- | |||
option netmask ' | option netmask ' | ||
- | |||
- | |||
- | |||
- | \\ | ||
- | |||
- | |||
- | |||
- | |||
- | config globals ' | ||
- | |||
- | |||
+ | config globals ' | ||
option ula_prefix ' | option ula_prefix ' | ||
- | |||
- | |||
- | |||
- | \\ | ||
- | |||
- | |||
- | |||
- | |||
- | config interface ' | ||
- | |||
- | |||
- | |||
- | option type ' | ||
- | |||
- | |||
- | |||
- | option ifname ' | ||
- | |||
- | |||
+ | config interface ' | ||
+ | option type ' | ||
+ | option ifname ' | ||
option proto ' | option proto ' | ||
- | |||
- | |||
- | |||
- | \\ | ||
- | |||
- | |||
- | |||
- | |||
- | config device ' | ||
- | |||
- | |||
+ | config device ' | ||
option name ' | option name ' | ||
- | |||
- | |||
- | |||
- | \\ | ||
- | |||
- | |||
- | |||
- | |||
- | config switch | ||
- | |||
- | |||
- | |||
- | option name ' | ||
- | |||
- | |||
- | |||
- | option reset ' | ||
- | |||
- | |||
+ | config switch | ||
+ | option name ' | ||
+ | option reset ' | ||
option enable_vlan ' | option enable_vlan ' | ||
- | |||
- | |||
- | |||
- | \\ | ||
- | |||
- | |||
- | |||
config switch_vlan | config switch_vlan | ||
- | + | option device ' | |
- | + | option vlan ' | |
- | + | ||
- | option device ' | + | |
- | + | ||
- | + | ||
- | + | ||
- | option vlan ' | + | |
- | + | ||
- | + | ||
- | + | ||
option ports '0 1 2 3 4 6t' | option ports '0 1 2 3 4 6t' | ||
- | + | </code> | |
- | </blockquote></ | + | |
- | \\ | + | |
Disable DHCP server, DHCP6 server, firewall, acceptions: | Disable DHCP server, DHCP6 server, firewall, acceptions: | ||
- | <HTML>< | + | <code> |
/ | / | ||
- | |||
/ | / | ||
- | |||
/ | / | ||
- | |||
/ | / | ||
- | |||
- | |||
/ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | Restart network:''/ | ||
- | |||
- | / | ||
- | / | ||
- | </ | ||
- | > / | ||
- | |||
- | < | ||
- | < | ||
- | |||
- | \\ | ||
- | |||
- | </ | ||
- | Restart network: | ||
- | |||
- | < | ||
- | / | ||
- | |||
- | </ | ||
==== Links: ==== | ==== Links: ==== | ||
Line 270: | Line 141: | ||
* sudo apt install tftpd-hpa | * sudo apt install tftpd-hpa | ||
+ | * set serial baud rate to 57600 | ||
* choose option " | * choose option " | ||
* firmware goes in / | * firmware goes in / | ||
Line 280: | Line 152: | ||
==== Memory Layout: ==== | ==== Memory Layout: ==== | ||
- | + | <code> | |
- | + | ||
- | + | ||
- | <HTML>< | + | |
dev: size erasesize name | dev: size erasesize name | ||
- | |||
- | |||
- | |||
- | |||
mtd0: 00030000 00001000 " | mtd0: 00030000 00001000 " | ||
- | |||
- | |||
- | |||
- | |||
mtd1: 00010000 00001000 " | mtd1: 00010000 00001000 " | ||
- | |||
- | |||
- | |||
- | |||
mtd2: 00010000 00001000 " | mtd2: 00010000 00001000 " | ||
- | |||
- | |||
- | |||
- | |||
mtd3: 003b0000 00001000 " | mtd3: 003b0000 00001000 " | ||
- | |||
- | |||
- | |||
- | |||
mtd4: 00126852 00001000 " | mtd4: 00126852 00001000 " | ||
- | |||
- | |||
- | |||
- | |||
mtd5: 002897ae 00001000 " | mtd5: 002897ae 00001000 " | ||
- | |||
- | |||
- | |||
- | |||
mtd6: 000c0000 00001000 " | mtd6: 000c0000 00001000 " | ||
- | |||
- | |||
- | |||
- | |||
- | \\ | ||
- | |||
- | |||
- | |||
- | |||
0x00000000-0x00800000 : " | 0x00000000-0x00800000 : " | ||
- | |||
- | |||
- | |||
- | |||
0x00000000-0x00030000 : " | 0x00000000-0x00030000 : " | ||
- | |||
- | |||
- | |||
- | |||
0x00030000-0x00040000 : " | 0x00030000-0x00040000 : " | ||
- | |||
- | |||
- | |||
- | |||
0x00040000-0x00050000 : " | 0x00040000-0x00050000 : " | ||
- | |||
- | |||
- | |||
- | |||
0x00050000-0x01000000 : " | 0x00050000-0x01000000 : " | ||
- | + | </ | |
- | + | ||
- | + | ||
- | + | ||
- | \\ | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | \\ | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
from the stock: | from the stock: | ||
- | + | < | |
- | + | ||
- | + | ||
/proc/mtd# cat /proc/mtd | /proc/mtd# cat /proc/mtd | ||
- | |||
- | |||
- | |||
- | |||
dev: size erasesize name | dev: size erasesize name | ||
- | |||
- | |||
- | |||
- | |||
mtd0: 00800000 00010000 " | mtd0: 00800000 00010000 " | ||
- | |||
- | |||
- | |||
- | |||
mtd1: 00030000 00010000 " | mtd1: 00030000 00010000 " | ||
- | |||
- | |||
- | |||
- | |||
mtd2: 00010000 00010000 " | mtd2: 00010000 00010000 " | ||
- | |||
- | |||
- | |||
- | |||
mtd3: 00010000 00010000 " | mtd3: 00010000 00010000 " | ||
- | |||
- | |||
- | |||
- | |||
mtd4: 007b0000 00010000 " | mtd4: 007b0000 00010000 " | ||
+ | </ | ||
- | |||
- | |||
- | </ | ||
==== Todo: ==== | ==== Todo: ==== | ||
- | |||
* check the allow dns rule | * check the allow dns rule | ||
Line 417: | Line 188: | ||
//Attached: latest mpr-a1 LEDE firmware with bitbucket customizations// | //Attached: latest mpr-a1 LEDE firmware with bitbucket customizations// | ||
+ | {{ : | ||
- | + | {{ : |