wiki'd

by JoKeru

RoundRobin OutGoing SMTP IP Address

[cc lang="bash"]
\$ iptables -t nat -F
\$ iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o eth0 -m statistic --mode nth --every 1 -j SNAT --to-source 10.20.30.41
\$ iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o eth0 -m statistic --mode nth --every 2 -j SNAT --to-source 10.20.30.42
\$ iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o eth0 -m statistic --mode nth --every 3 -j SNAT --to-source 10.20.30.43
\$ iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o eth0 -m statistic --mode nth --every 4 -j SNAT --to-source 10.20.30.44
\$ iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o eth0 -m statistic --mode nth --every 5 -j SNAT --to-source 10.20.30.45

\$ iptables -L -t nat -nv
[/cc]

Comments