title: Amazon aws ec2 network tomcat issue
body: <p>I had the same problem as many others not being able to connect to tomcat port 8080</p>
  
  <p>I had tried everything suggested eg security groups. </p>
  
  <p>What I then did was I created the amazon linux instance (instead of the redhat)</p>
  
  <p>And this worked !! I did the same thing for both instances: added tcp port 8080 in security group</p>
  
  <p>Looking at my iptables does this give a clue? </p>
  
  <p>Bad redhat instance sudo iptables -L</p>
  
  <pre><code>[ec2-user@ip-172-31-37-61 ~]$ sudo iptables -L
  Chain INPUT (policy ACCEPT)
  target     prot opt source               destination
  ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
  ACCEPT     icmp --  anywhere             anywhere
  ACCEPT     all  --  anywhere             anywhere
  ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
  REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited
  
  Chain FORWARD (policy ACCEPT)
  target     prot opt source               destination
  REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited
  
  Chain OUTPUT (policy ACCEPT)
  target     prot opt source               destination
  </code></pre>
  
  <p>Good amazon linux:</p>
  
  <pre><code>[ec2-user@ip-172-31-36-174 ~]$ sudo iptables -L
  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
  </code></pre>
  
  <p>It was frustrating for a couple of hours but now with Amazon-linux working I can proceed again. whew!</p>
  
  <p>Thanks</p>