jeudi 2 avril 2015

Can't connect to EC2 instance over HTTP from outside AWS

If it makes any difference, this is in AWS China.


I have a new EC2 instance. I created it a couple of days ago. It's supposed to be an application server for a rails app. Apache is up and running, and it works (curl localhost works). When I try from another EC2 instance, it also responds OK (using the EC2 internal IP address).


However, if I use the external IP address it doesn't work. It times out.


Things I checked:



  • Apache is running, and it's listening on eth0 as well as localhost.

  • No firewall in the instance (default Amazon Linux image, iptables -L returns all ACCEPT policies, no other rules).

  • Security group is correct. It has rules for inbound port 80 and port 443 allowed for the whole world.

  • The security group I'm modifying is indeed applied to the instance with issues. I tried removing SSH access from that security group and my ssh connection into the server died. Added access again and I was able to ssh in. So the security group is working and applying rules.

  • I even tried setting up a load balancer in front of the instance. The load balancer can't reach the instance either.

  • Yes, I'm using the correct IP address. I checked it over and over again.

  • I tried using the public hostname, it still doesn't work (why should it?), but it confirms I have the right IP address because it does work from inside the instance (because inside AWS it points to the internal IP address).


I'm completely stumped on this. It's possible that it's a really silly mistake on my part, but I've already tried everything I could come up with. I googled and tried everything other people said worked for them. I had a coworker look into it, he also couldn't make it work.


So, any ideas? What am I missing?


Thanks!





Aucun commentaire:

Enregistrer un commentaire