Reputation: 7292
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?
Upvotes: 131
Views: 272789
Reputation: 272
You just need to run command
sudo iptables -A INPUT -p tcp --dport <port_number> -j ACCEPT
You will be allow to access port in AWS Ubuntu
Upvotes: 2
Reputation: 736
You need to configure the security group as stated by cyraxjoe. Along with that you also need to open System port. Steps to open port in windows :-
Ref:- Microsoft Docs for port Opening
Upvotes: 16
Reputation: 5741
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
Find the Security Group that your instance is apart of Click on Inbound Rules Use the drop down and add HTTP (port 80) Click Apply and enjoy
Upvotes: 167
Reputation: 2819
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.
Upvotes: 39