Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (19.1k points)

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?

3 Answers

0 votes
by (44.4k points)

Follow these steps to do this:

  • Open "Network & Security" -- Security Group settings are on the left-hand navigation
  • Find the security group connected to your instance
  • Choose “inbound rules
  • Type the port number (in your case 8787) in “port range” then click “Add Rule”
  • Use the drop-down and add HTTP (port 80)

And it is done.

0 votes
by (37.3k points)

To open your web server port on EC2 instance, just go through the below steps:

  1. Go to your AWS console and click on EC2 to open the dashboard

  2. Click on Instances and select your instance

  3. If you scroll down you will see Security then click on security group link

  4. Then click on edit inbound rules and add one Rule as follows:

  • Type: Custom TCP

  • Port: 8787

  • Source: Anywhere (0.0.0.0/0)

5. Then save the Rules

  1. You can use your EC2’s Public address to use your cherry server 

This is the way you have to write you URL

http://<Your-Public-IP>:8787

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
by (2.8k points)

When you are trying to access CherryPy server on the mentioned port 8787, for the same you need to open the same port of your EC2 instance in the remote machine. For the same you need to log in to AWS Management Console, wherein you need to navigate to EC2 Dashboard, then select the instance you are working with, and then open the security group settings. Then modify the inbound rules and add the port 8787, and then just save the changes.

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Jul 12, 2019 in AWS by Amyra (12.9k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...