title: GCP Firewall Issue - Unable to access specific port over public internet
body: <p>I am unable to access some specific ports in a GCP instance I created. I spin up a simple python server using command <code>python3 -m http.server &lt;port#&gt;</code> on port <code>22221</code> and <code>22222</code>. I can curl to both ports inside the machine or another machine inside the same VPC(using localhost or public ip). but when I tried to curl both ports from outside using public ip, only <code>22222</code> works, but the other port does not work.In the firewall I opened up all the ports. </p>
  
  <p>My Firewall rule opened up all the ports
  <a href="https://i.stack.imgur.com/XTDnb.png" rel="nofollow noreferrer">Firewall-Screenshot</a> </p>
  
  <p><a href="https://i.stack.imgur.com/E2f8c.png" rel="nofollow noreferrer">Curl inside the machine-Screenshot</a></p>
  
  <p>netstat
  <a href="https://i.stack.imgur.com/SeWDV.png" rel="nofollow noreferrer">netstat-screenshot</a></p>
  
  <p><strong>update 1 :</strong> 
  i did the same steps in AWS. Created an Ec2 -> assigned security group which allows all ports inbound/outbound -> spinup python simple http server on port <code>22222</code> and <code>22221</code>. only <code>22222</code> is accessible from public ip address. Looks like it is specific to OS(I am using ubuntu). below is the nmap from inside and outside the instance.</p>
  
  <p><a href="https://i.stack.imgur.com/i6bO6.png" rel="nofollow noreferrer">nmap inside the instance</a></p>
  
  <p><a href="https://i.stack.imgur.com/sxkBN.png" rel="nofollow noreferrer">nmap from remote machine</a></p>