How to track ADSL / Broadband usage with tiny Intel box (Wintel CX-W8)

Hi all,

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.

 

adsl

Very high level here’s how

  1. Change the ADSL router IP to 192.168.1.2
  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
  3. Setup static DHCP IPs (MAC address – IP mappings) for all your wifi and wired devices on the ADSL router
  4. Install Ubuntu server (16.04, with openssh support) on the Wintel box – your new home server and give the IP 192.168.1.1
  5. Connect to router with a wired connection (we are not going to use wifi)
  6. Enable IP forwarding on the box
  7. Add a pre-route NAT entry using iptables so forwarded outbound traffic will carry 192.168.1.1 as source.
  8. Installed traffic monitoring scripts / services I wrote.
  9. Make sure the configs are persistent so they can survive reboots.
  10. Done.
  11. Happily monitor bandwidth usage (against each IP) by running summarizing scripts.

Few notes that can help you:

  1. 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.
  2. 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.
  3. 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.

 

Thanks,

Harshana

 

 

201total visits,1visits today

Add a Comment

Your email address will not be published. Required fields are marked *