mtd -r write openwrt-19.07.4-<hw>-squashfs-factory.img linux
Category: OpenWRT
-
OpenWRT flash Asus RT-N66U
Upload OpenWRT Firmware for Asus RT-N66U via tftp / curl
- Set your computer to a static IP (e.g. 192.168.1.123), subnet 255.255.255.0, default gateway 192.168.1.1
- Put router into recovery mode by holding down the reset button while powering up the router, wait until the power led is blinking slowly, then release the reset button.
- upload .trx file (brcm47xx/mips74k/) with
curl -T openwrt-18.06.4-brcm47xx-mips74k-asus-rt-n66u-squashfs.trx tftp://192.168.1.1
- When complete, wait until the router reboots itself, which can take at least 10 minutes.
- Wait until the router reboots itself, then access the OpenWRT GUI (Luci) at 192.168.1.1 to set a password.
-
LEDE / OpenWRT sniff DNS traffic
log into router via ssh
opkg update opkg install tcpdump tcpdump -i eth1 -l -vvv dst port 53
save dump
tcpdump -i eth1 -l -vvv dst port 53 >> /tmp/dns.dump grep -E 'A\?' /tmp/dns.dump |sed -e 's/^.*A? //' -e 's/ .*//'|sort -u
live dns view
tcpdump -lvi any "udp port 53" 2>/dev/null | grep -E 'A\?' | awk '{print $(NF-1)}' -
LEDE upgrade
ssh into the box
ssh 192.168.1.1 -lroot
download image
cd /tmp wget http://downloads.lede-project.org/releases/17.01.2/targets/ar71xx/generic/lede-17.01.2-ar71xx-generic-wzr-hp-g300nh-squashfs-sysupgrade.bin
upgrade
sysupgrade -c image.bin
sysupgrade -v image.bin
-
LEDE tftp flash HP-G300NH
apt install net-tools
ifconfig eth0 192.168.11.2 arp -s 192.168.11.1 02:aa:bb:cc:dd:1a
curl -T openwrt-19.07.4-ar71xx-generic-wzr-hp-g300nh-squashfs-tftp.bin tftp://192.168.11.1
-
LEDE reset to default settings in ssh terminal
reset all settings:
mount_root mtd -r erase rootfs_data reboot -f
specific config:
rm /etc/config/whatever config_generate