Route port 25 to interface eth2
I have a network with an internal mail server and a linux proxy. I wonder if there's a way to tell iptables to route all internal SMTP (25) traffic (coming to proxy through eth1) to the external interface eth2?
this is what I have, but does not do the work:
iptables -A INPUT -i eth1 -p tcp --destination-port 25 -j ACCEPT
It's worth to mention that I have two external interfaces (eth2 and eth3) and SMTP traffic should only go out using eth2.