Hi!
I have installed mail server on my lan. Now I would like to redirect all lan users to use that mail server as smtp (similar as transparent proxy with squid). How do I do that smtp redirection?
I was thinking something like:
-------------
iptables -t nat -A PREROUTING -i eth0 -s ! smtp-box -p tcp --dport 25 -j DNAT --to smtp-box:25
iptables -t nat -A POSTROUTING -o eth0 -s local-network -d smtp-box -j SNAT --to iptables-box
iptables -A FORWARD -s local-network -d smtp-box -i eth0 -o eth0 -p tcp --dport 25 -j ACCEPT
--------------
Is this correct?
Regards, Sasa