OpenWRT flash Asus RT-N66U

Upload OpenWRT Firmware for Asus RT-N66U via tftp / curl

  1. Set your computer to a static IP (e.g. 192.168.1.123), subnet 255.255.255.0, default gateway 192.168.1.1
  2. 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.
  3. upload .trx file (brcm47xx/mips74k/) with
    curl -T openwrt-18.06.4-brcm47xx-mips74k-asus-rt-n66u-squashfs.trx tftp://192.168.1.1
  4. When complete, wait until the router reboots itself, which can take at least 10 minutes.
  5. 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