-1

I have a Amazon EC2 instance running Ubuntu and a local personal Ubuntu computer. I use the default VPC configuration for my EC2 instance and didn't block any internet traffic from the firewall.

I can telnet Google.com 80 and Ping Google.com on my EC2 instance which means I have internet connection to the outside. I try to run

telnet nebraskalegislature.gov 80

on both machine. It succeed on my own Ubuntu

Trying 164.119.9.166... Connected to nebraskalegislature.gov.

but it time out on my EC2 Instance

Trying 164.119.9.166... telnet: Unable to connect to remote host: Connection timed out

I try to run dig 164.119.9.166 on both machine.

It has one answer from my own machine but there is no answer on EC2 instance.It looks like a DNS issue

Does anybody can help me this question? Please don't block me again. I am trying to ask a good question.

Jack Wang
  • 77
  • 1
  • 7
  • 1
    I can resolve the DNS from and EC2 Ubuntu, you've changed something somewhere. Check /etc/resolv.conf and make sure it's set to a valid DNS server. Otherwise, you need to check your security groups. Make sure you allow outbound connections on port 53. – mickzer Dec 30 '15 at 22:30
  • Thank you for replying. I checked the /etc/resolv.conf before and it said nameserver is 172.31.0.2 and search is ec2.internal. I was wandering whether it is a good one or not because I just have two website which are not reachable. Also, the outbound connection in my security groups is open every port to public on this test machine. – Jack Wang Dec 31 '15 at 14:14
  • And also means if you do curl on the address, it will response you the HTML string, right? – Jack Wang Dec 31 '15 at 14:27
  • @mickzer Thank you for replying. I checked the /etc/resolv.conf before and it said nameserver is 172.31.0.2 and search is ec2.internal. I was wandering whether it is a good one or not because I just have two website which are not reachable. Also, the outbound connection in my security groups is open every port to public on this test machine. – Jack Wang Jan 06 '16 at 20:25
  • @mickzer if you use curl on that address, it will response you the HTML string, right? – Jack Wang Jan 06 '16 at 20:26
  • 1
    The DNS resolver looks fine assuming your VPC has 172.31.something range. The DNS resolver should be the 3rd IP in your VPC. You could always try changing it to Googles DNS 8.8.8.8. And if you curl the address, you should receive a repsonse IF: 1. You have a web server installed and running, 2. Your security groups and NACLs allow it, 3. The instance is in a public subnet, 4. You don't have any software level firewalls blocking port 80 eg. IP tables. Otherwise, you should be good. – mickzer Jan 06 '16 at 21:13
  • I recommend launching another instance eg. t2.micro temporarily. Try and resolve the address from that new instance. – mickzer Jan 06 '16 at 21:18
  • @mickzer Hi, I didn't see the comment before. That helps. Could you please talk about how to change from the default DNS to Google 8.8.8.8. Actually, I tried it on the instance itself and it doesn't. I think I have to do that through the web console. But I didn't find the place to do it. You give me good heads up. How to change the DNS server? – Jack Wang Jan 07 '16 at 16:13
  • @mickzer Yeah..I also tried launching a new instance even from another region. It just doesn't work on the new one.. – Jack Wang Jan 07 '16 at 16:17

1 Answers1

0

After I test their website connection on all Amazon EC2 subnets, I think it is their internal bugs. I test two websites which are http://legislature.vermont.gov/ and http://nebraskalegislature.gov/. The result is as following:

For http://legislature.vermont.gov/

  1. us-east-1b (fail)
  2. us-east-1c (pass)
  3. us-east-1d (pass)
  4. us-east-1e (fail)

For http://nebraskalegislature.gov/

  1. us-east-1b (fail)
  2. us-east-1c (pass)
  3. us-east-1d (fail)
  4. us-east-1e (pass)

For other region like Oregon and California. There are also some issue on their subnet which is not clearHuman beings create machine and also create bugs because of human nature

Jack Wang
  • 77
  • 1
  • 7