Skip to content

Instantly share code, notes, and snippets.

@amuraru
Created June 5, 2014 18:59
Show Gist options
  • Select an option

  • Save amuraru/61eeeb0e455fd362cb27 to your computer and use it in GitHub Desktop.

Select an option

Save amuraru/61eeeb0e455fd362cb27 to your computer and use it in GitHub Desktop.
Monitor port bandwidth
iptables -F
iptables -X
/sbin/iptables -N INET_IN
/sbin/iptables -N INET_OUT
/sbin/iptables -A OUTPUT -j INET_OUT
/sbin/iptables -A INPUT -j INET_IN
/sbin/iptables -A INET_IN -s 10.2.122.0/24
/sbin/iptables -A INET_OUT -d 10.2.122.0/24
iptables -n -v -x -L INET_IN
iptables -n -v -x -L INET_OUT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment