Can't connect on port 25 on my EC2 instance

Almost all residential ISPs, and almost all public WiFi hotspots, block outbound access on port 25. This is largely because approximately one-third of the world's computers are infected with malware, and one of the most popular ways to monetize malware is to send spam from infected computers.

ISPs obviously don't want to deal with complaints about spam originating from 30% of their IP addresses, so blocking port 25 outbound is the only sensible thing for them to do.

If you really need to connect to port 25 on your instance, just open a different port to your EC2 instance (e.g. port 2525) and then forward the port using iptables.

Or, if you desire to make this a little bit more complicated, you can use netcat or ssh to achieve a similar result.

Tags:

Amazon Ec2