Iptables And Remote Port 25 Blocking
By Ian Scott
With many ISP’s today blocking remote port 25 connections for what they think is spam prevention, many users are complaining that they are unable to send through the email server they wish to send through.
If this is something that has happened to you, here’s something you might want to refer your ISP to, or if it is your own mail server, a quick trick to allow yourself to connect to an remote SMTP server without opening up new ports on the SMTP server.
It’s a nice little rule you can add to your Iptables firewall. Here it is in all it’s glory:
/sbin/iptables -t nat -A PREROUTING -p tcp –dport 2525 -i eth0 -j REDIRECT –to-ports 25
What this command says to Iptables is to reroute any port 2525 connections to port 25.
So, if you’re ISP is blocking remote port 25 connects, then simply use port 2525, and if the rule has been added, you will be succesfully able to connect to port 25 via using port 2525 in your eamail client, as long as other authentication requirements are met.
It’s much easier than trying to set up other ways to send email remotely, especially if you have DRAC with QPopper installed.
Of course, don’t forget to save this rule after you’ve added it:
/sbin/service iptables save
Hope this is helpful to you!
Read more in: Firewalls |