Simple Python TCP server not working on Amazon EC2 instance


I am trying to run a simple Python TCP server on my EC2, listening on port 6666. I’ve created an inbound TCP firewall rule to open port 6666, and there are no restrictions on outgoing ports.

I cannot connect to my instance from the outside world however, testing with telnet or netcat can never make the connection. Things do work if I make a connection from localhost however.

Any ideas as to what could be wrong?


Your TCP_IP is only listening locally because you set your listening IP to
Set TCP_IP = "" and it will listen on “all” interfaces including your externally-facing IP.

Leave a Reply