Skip to content

Instantly share code, notes, and snippets.

@teisman
Created January 13, 2013 17:28
Show Gist options
  • Save teisman/4525209 to your computer and use it in GitHub Desktop.
Save teisman/4525209 to your computer and use it in GitHub Desktop.

In many cases, ISPs block port 25 because of spam related issues. In case you want to connect to your server over SMTP - which uses port 25 - you might want to have your iptables firewall forward a port of your choice to port 25.

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 587 -j REDIRECT --to-port 25

This preroutes port 587 to 25. Now, you can connect to your SMTP server over port 587.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment