Posts

Showing posts from 2017

Traffic accounting

Got this from here: http://www.catonmat.net/blog/traffic-accounting-with-iptables/ All i'm interested in is my monthly bandwidth consumption, not the individual devices, there are plenty of forum threads/tools to do that. But why bring in additional tools when iptables has it all? iptables -N TRAFFIC_ACCT iptables -I FORWARD -j TRAFFIC_ACCT iptables -A TRAFFIC_ACCT and to just get the number: iptables -L TRAFFIC_ACCT -v | sed -n 3p | cut -d' ' -f2 to reset the counters /usr/sbin/iptables -L TRAFFIC_ACCT -Z the cron job to reset at the begining of the month, and a daily telegram msg 1 0 1 * * /usr/sbin/iptables -L TRAFFIC_ACCT -Z  0 8 * * * /usr/bin/curl -s -X POST https://api.telegram.org/<BOTID>/sendMessage -d chat_id=<CHATID> -d text="$(/usr/sbin/iptables -L TRAFFIC_ACCT -v | /bin/sed -n 3p | /usr/bin/cut -d' ' -f3)" >/dev/null 2>&1 (you'll need to opkg install ca-bundle for the https to work)

Fixing 5G on LEDE 17.01.1/2/3

Finally! I figured out how to get the 5Ghz to work on LEDE. 17.01.3 in  /lib/firmware/ath10k/ rename cal-pci-0000:01:00.0.bin  to  pre-cal-pci-0000:01:00.0.bin reload ath10k_pci and we're good to go!

upgrading to LEDE 17.01.1 - but without 5Ghz

Event though 15.05 has been running stable upgrading to 17.01 seems like a good idea. Going the lazy route and simply using luci to do the upgrade. (note: it's a good idea to keep a list of all the packages you installed, you'll have to add them all again) Since this is an upgrade from wrt we grab this file: https://downloads.lede-project.org/releases/17.01.0/targets/ar71xx/nand/lede-17.01.0-r3205-59508e3-ar71xx-nand-nbg6716-squashfs-sysupgrade.tar (yes it is a tar) under System->Flash/Back (make sure keep settings is checked) and.... somewhat success: system reboots, is accessible over ssh but luci isn't (but uhttpd is running). /etc/init.d/uhttpd restart seems to bring it back online. (with an enable). onward with restoring the missing packages: opkg update for ddns (settings were nicely maintained as expected) opkg install ddns-scripts luci-app-ddns for wake on LAN (i did have to recreate my wakenas script manually, and luci-app-wol doesn't show...