Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open a web server port on EC2 instance

I'm running a CherryPy web server at 0.0.0.0:8787 on an EC2 instance.

I can connect to the web server via local wget on the EC2 machine, but I can't reach the instance from my own remote machine (I connect to EC2 via ssh).

Do I need to open up port 8787 to access the web server remotely? If so, how can this be done? Also, can I use the public IP of the EC2 instance for this?

like image 716
Cat Avatar asked Jun 18 '13 05:06

Cat


2 Answers

Follow the steps that are described on this answer just instead of using the drop down, type the port (8787) in "port range" an then "Add rule".

Go to the "Network & Security" -> Security Group settings in the left hand navigation 

enter image description here Find the Security Group that your instance is apart of Click on Inbound Rules enter image description here Use the drop down and add HTTP (port 80) enter image description here Click Apply and enjoy

like image 103
cyraxjoe Avatar answered Sep 21 '22 06:09

cyraxjoe


You need to open TCP port 8787 in the ec2 Security Group. Also need to open the same port on the EC2 instance's firewall.

like image 34
dmohr Avatar answered Sep 22 '22 06:09

dmohr