title: Cannot curl EC2 instance - Connection refused on port 80
body: <p>So I have two instances, instance A is part of a security group sg-1 and instance B is part of another security group sg-2.</p>
  
  <p>sg-1 has settings to allow all outbound traffic
  sg-2 has settings to allow traffic from sg-1 on port 80, 9200 and 9300:</p>
  
  <p><a href="https://i.stack.imgur.com/hkuil.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hkuil.png" alt="enter image description here"></a></p>
  
  <p>Yet, when I SSH onto instance A and try to curl instance B on port 9200, I get an error: <code>Failed to connect to &lt;Instance B Private IP&gt; port 80: Connection refused</code></p>
  
  <p>Not sure what I am doing wrong here?</p>