Search code examples
amazon-web-servicesaws-security-group

How to enable port 5000 on aws server?


I checked all the questions that are related to allowing port on AWS EC2 and I have tried the following:

sudo ufw allow 5000

sudo iptables -A INPUT -p tcp --dport 5000 -j ACCEPT

Also added the port to AWS SG as shown below

Outbound Configs AWS SG Outbound Config

Inbound Configs AWS SG Inbound Config

Still when I open my website it says:

This site can’t be reached

Am I missing anything? Are above rules are correct and secure?


Solution

  • The Inbound SG configs needs to be modified. As the image you have posted does not show that you allow 5000 in your AWS SG. So in this case you wont be able to access that port from outside unless you allow it in your security group that i assume it is attached already to your EC2 instance