I have a situation I need some assistance with. I have clients that need to have traffic rerouted to a specific port on a remote server, and I would like to use iptables to redirect it for me.
Here is the config:
Clients use smtpout.secureserver.net for SMTP traffic. The server will accept SMTP traffic on port 80 or port 3535. The issue is that I am already redirecting traffic destined for port 80 outbound to a tranparent proxy on port 8080. When the clients try to send email outbound, the connection times out.
What I would like to do is construct a iptables rule that redirects traffic destined to smtpout.secureserver.net:80 to smtpout.secureserver.net:3535.
Here is what I have so far, but it does not seem to work the way I expect:
-A PREROUTING -i eth1 -d 184.108.40.206/32 -p tcp --dport 80 -j DNAT --to-destination 220.127.116.11:3535 -A POSTROUTING -j MASQUERADE