title: Amazon EC2 instance not able to make HTTP connection
body: <p>I am new to Amazon EC2 so please excuse me if I'm asking a stupid question. I created an instance using "Amazon Linux AMI" and installed NodeJS in it.</p>
  
  <p>I added the following IP table entry for forwarding all the request from port 80 to 3000.</p>
  
  <pre><code>sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000
  </code></pre>
  
  <p>and I created a hello world script to test this installation.</p>
  
  <pre><code>var http = require("http");
  
  http.createServer(function (request, response) {
    // Send the HTTP header
    // HTTP Status: 200 : OK
    // Content Type: text/plain
    response.writeHead(200, {'Content-Type': 'text/plain'});
  
    // Send the response body as "Hello World"
    response.end('Hello World\n');
  }).listen(3000);
  
  // Console will print the message
  console.log('Server running at http://127.0.0.1:3000/');
  </code></pre>
  
  <p>Here the issue is when I try to ping to my instance for command line, the request is timing out</p>
  
  <pre><code>ping ec2-52-26-59-26.us-west-2.compute.amazonaws.com
  
  PING ec2-52-26-59-26.us-west-2.compute.amazonaws.com (52.26.59.26): 56 data bytes
  Request timeout for icmp_seq 0
  Request timeout for icmp_seq 1
  Request timeout for icmp_seq 2
  </code></pre>
  
  <p>How I can fix this issue?</p>