Iptables

From Wiki.voidnet.us

Jump to: navigation, search

[edit] IPTABLES magic for getting traffict re-directed to another port

 iptables -t nat -A PREROUTING -p tcp -j DNAT --dport 2525 --to the.prim.ary.ip:25

[edit] IPTABLES rule to foward mail to another IP

 /sbin/iptables -t nat -A POSTROUTING -p tcp --dport 25 -j SNAT --to-source ip.address.to.forward.to


[edit] Watch bandwidth usage real time

 iptables -I INPUT
 watch -n0 'iptables -n -L -v'
Personal tools