Opening a port : LAMP Stack on EC2??

John Talarico's picture

Yes I'm a newb to the Turnkey Linux thing, as well as EC2.  All I'm trying to do is open up a different port to run a virtual host.  I've added port 85 to the EC2 security group, and added an accept rule to the Linux Firewall for port 85 coming from any address.  I've also created a virtual host that responds to any inbound address on port 85.  However, the connection is getting refused.  

Any ideas?  This SHOULD be simple, no?

Liraz Siri's picture

Since multiple things could be going wrong, it's best to try and diagnose the issue by progressing incrementally. By default the firewall is disabled so unless you enabled it, that shouldn't be an issue which leaves the web server and the EC2 security groups.

Test the EC2 security groups first. Use netcat to listen on port 85 and then make sure you can connect to it remotely. If that doesn't work (and you don't have a firewall up) you know it's the EC2 group.

# make sure your iptables firewall is disabled
iptables --list 

# listen on port 85 with netcat
netcat --vvlp 85
John Talarico's picture

Thanks!  That helped.  As it turned out, it was the web server not listening on port 85.

Post new comment