Let me show you how I got ADSL usage tracking with a Wintel (CX-W8) box. You need bit of network and Linux knowledge to do this.
Very high level here’s how
- Change the ADSL router IP to 192.168.1.2
- Change router IP on DHCP setup to 192.168.1.1 on the ADSL router. So DHCP reply will tell the DHCP clients default gateway is 192.168.1.1 instead of 192.168.1.2
- Setup static DHCP IPs (MAC address – IP mappings) for all your wifi and wired devices on the ADSL router
- Install Ubuntu server (16.04, with openssh support) on the Wintel box – your new home server and give the IP 192.168.1.1
- Connect to router with a wired connection (we are not going to use wifi)
- Enable IP forwarding on the box
- Add a pre-route NAT entry using iptables so forwarded outbound traffic will carry 192.168.1.1 as source.
- Installed traffic monitoring scripts / services I wrote.
- Make sure the configs are persistent so they can survive reboots.
- Happily monitor bandwidth usage (against each IP) by running summarizing scripts.
Few notes that can help you:
- Change ADSL router IP to something other than the default 192.168.1.1. Any non tech guy who is trying to configure a manual IP on their device will use 192.168.1.1 as their default g/w.
- At least my router DSL 2750U, did not allow me to change the DHCP router IP. I used tamper data on firefox to capture the DHCP configuration page and change the DHCP router IP which was grayed on the configuration page.
- Install a SD card on the Wintel box and move /tmp and /var/logs, … to the SD card so Wintel’s internal flash drive can live longer.
I will complete this with all the scripting and installation steps later when I have more time. But if anyone wants to try this and need clarifications / scripts, feel free to drop me a comment.
595total visits,1visits today