0

I've created a machine (EC2) with public IP. It's running Linux.

output of uname -a:

4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

The (only) security group for this machine has only 5 rules:
- allow TCP on port 80 from anywhere
- allow TCP on port 22 from anywhere
- allow TCP on port 2678 from anywhere
- allow TCP on port 2679 from anywhere
- allow ICMP

I can ping my machine. So ICMP clearly works. Netstat says port 22 is open. And I can ssh into the machine.

But port 2678 and 2679, as well as 80 are closed. There is no firewall on the machine.

Running iptables -L yields:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

I checked the NACL settings:

inbound (same for outbound):

100    ALL Traffic    ALL    ALL    0.0.0.0/0    ALLOW
*      ALL Traffic    ALL    ALL    0.0.0.0/0    DENY

So, why is my machine not reachable?

  • You mean you can't connect to the instance public IP on port 80? Is the web server running? – strongjz Jul 12 '17 at 21:32
0

Have you checked the NACL associated with the subnet your EC2 instance is on? it needs to allow your traffic both inbound and outbound.

Mike,

  • No, how do I go about doing that? – Joris Schellekens Jul 12 '17 at 9:39
  • Have a look at the VPC section in the portal, under the security section you can find the NACL section. There will be at least one NACL that is linked to your VPC and its subnets. – Michael Brown Jul 12 '17 at 9:44
  • Added the information to the question – Joris Schellekens Jul 12 '17 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.