title: AWS EC2 Instance Open Ports
body: <p>I was trying to determine why I can always access my AWS EC2 Instance on certain ports, such as port 80.</p>
  <pre><code>Port range  Protocol    Source            Security groups
  22           TCP    98.162.129.68/32    My AWS EC2 SSH Access
  22           TCP    107.77.234.218/32   My AWS EC2 SSH Access
  </code></pre>
  <p>These are my only rules as of right now - but I can seemingly always access port 80 via a programmatic connection.</p>
  <p>Are there default ports that are there that I can turn off somewhere else?</p>
  <p>For example:</p>
  <pre><code>if let Ok(stream) = TcpStream::connect(&quot;3.85.107.207:80&quot;) {
      println!(&quot;Connected to the server!&quot;);
      //println!(&quot;{}&quot;, stream.peer_addr().unwrap());
          Some(stream)
      } else {
          println!(&quot;Couldn't connect to server...&quot;);
          None
  }
  </code></pre>