3

I run a program to start a website on a linux server (I'm using Amazon Web Services EC2 virtual server) and I run it from port 3000, so that I can type (ipaddress:3000) into chrome to access the website and it works fine.

When I change the port number to 3004, 3005, 3007, 4200 etc and go to the corresponding url in chrome it gives me the message "page isn't working." I used netstat -lnptu to find a list of open ports and it doesn't list any of those ports so I don't get why I can't use them instead of 3000.

EDIT: You can solve this by looking at your EC2 instances in your Amazon Management Console, then scrolling to the right side of the instances panel and clicking on "security groups" (of the instance you want to add a new rule to), then you should be at a page which has a bottom panel that says "security groups: [group id of your instance]", then for inbound rules click "edit" and add a new rule.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232

1 Answers1

3

I have posted this as a comment, but will do so as an answer. AWS utilizes a tool called Security Groups which will allow you to open/close ports and assign firewall rules to your ec2 instance. It is best practice to use that to open up port 3000 and assign it to your instance.

ryekayo
  • 4,763