Empulse Group a collection of notes from a sys admin, musician, and father

22Feb/110

Tricks with iptables

Use iptables to force mail out a specific ip address:

[root@www ~]# iptables -t nat -A POSTROUTING -p tcp --dport 25 -j SNAT --to-source 192.168.100.123

Rate limit port 80, 100 connection limit:

[root@www ~]# iptables -A INPUT -p tcp --syn --dport 80 -m connlimit --connlimit-above 100 -j DROP