Posts

Showing posts from October, 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!