Bandwidth monitoring with iptables for non-router machine
- by user1591276
I came across this tutorial here that describes how to monitor bandwidth using iptables. I wanted to adapt it for a non-router machine, so I want to know how much data is going in/coming out and not passing through.
Here are the rules I added:
iptables -N ETH0_IN
iptables -N ETH0_OUT
iptables -I INPUT -i eth0 -j ETH0_IN
iptables -I OUTPUT -o eth0…