I have a hard coded application that will only send SMTP outgoing messages through port 25. My ISP has recently firmly instituted a policy of blocking port 25 for a number of reasons. Can I set up my Tomato based router (Linksys E3000) to redirect all/any outgoing port 25 requests to go out 3535? All my other SMTP apps allow the client configuration to be changed for outgoing SMTP.
I have researched a number iptables commands and have been unable to get any of them to fix the problem.
Here are some samples I have tried that have not worked. They are correct syntax because I can see in NAT table. I believe they are just not correct.
iptables -t nat -A OUTPUT -p tcp —dport 25 -j REDIRECT —to-port 3535
iptables -t nat -A OUTPUT -p tcp —dport 25 -j DNAT —to-destination 18.104.22.168:3535
iptables -t nat -A POSTROUTING -p tcp —dport 25 -o eth0 -j SNAT —to-source 22.214.171.124:3535
The top options seems like it should do the job.