vortex-5 / ddwrt-bwmon

An Individual Bandwidth Monitor For DD-WRT
171 stars 37 forks source link

Monitor Internet Bandwidth Separate from Internal Network Bandwidth #35

Closed Triphammer closed 8 years ago

Triphammer commented 8 years ago

Transferring large files from my NAS to another host inside my network is counted as "bandwidth used" by BWMON.

Would it be possible to filter out traffic like this and only report the traffic to and from the Internet? This is the only traffic that really matters for bandwidth caps and such.

Awesome project, btw. Easy to install and configure, and outputs clear, easy information. Thank you.

vortex-5 commented 8 years ago

This doesn't happen unless you are passing traffic over the wan.

Triphammer commented 8 years ago

Hmm... After some high-volume testing I see that you are correct. The numbers from bwmon and my ISP aren't matching up and that hypothesis seemed to resolve the differences, but now I see that it's not correct. I'll have to look elsewhere.

Thanks, sorry to bother you.

vortex-5 commented 8 years ago

So maybe some background will help.

How the script works is it creates a new IP rule and then chains it to the WAN port. IP firewall rules have the ability to track packet count.

So your internet connection becomes WLAN -> BWMON -> WAN LAN -> BWMON -> WAN

Note this is also why during very first initialization once BWMON starts you might get a brief drop in connection as it switches you over the BWMON firewall rule.

It would be possible to track WLAN -> LAN packets but because of how consumer routers work the LAN switch is unmanaged meaning you cannot put any rules on the LAN ports so in theory if your NAS copy is LAN -> LAN there would be no possibility of tracking it.

If you are curious you can inspect the BWMON iptables rule yourself to get an idea if it's able to track connections on the NAS in question.

Triphammer commented 8 years ago

Thanks, that's great info. I'm looking at the iptables rules right now.

I appreciate your time.