title: Accessing tcp port 8080 externally on macos mojave
body: <p>I am trying to access a listening tcp socket on my macbook from any external client on the same wi-fi lan.</p>
  
  <p>This works for specific ports, eg. 8000, but not other ports, eg. 8080, 8081, 8082</p>
  
  <p>How can I open up or access the 8080 tcp port externally?</p>
  
  <h1>Working steps on port 8000</h1>
  
  <h2>Server</h2>
  
  <p><code>$ nc -lv 8000</code></p>
  
  <h2>Client</h2>
  
  <pre><code>$ nc -z 192.168.101.98 8000
  Connection to 192.168.101.98 port 8000 [tcp/irdmi] succeeded!
  </code></pre>
  
  <h1>Non-working steps on port 8080</h1>
  
  <h2>Server</h2>
  
  <p><code>$ nc -lv 8080</code></p>
  
  <h2>Client</h2>
  
  <p><code>$ nc -z 192.168.101.98 8080</code>
  (The command just hangs)</p>
  
  <h1>Diagnostics</h1>
  
  <pre><code>$ lsof -P -i TCP:8000
  COMMAND   PID   USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
  nc      75782 ...    3u  IPv4 0x5be3e11e5a732339      0t0  TCP *:8000 (LISTEN)
  
  $ lsof -P -i TCP:8080
  COMMAND   PID   USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
  nc      75952 ...    3u  IPv4 0x5be3e11e581e2fb9      0t0  TCP *:8080 (LISTEN)
  
  $ sudo pfctl -s all | grep Status
  No ALTQ support in kernel
  ALTQ related functions disabled
  Status: Disabled                              Debug: Urgent
  </code></pre>
  
  <p>I am running macOS Mojave 10.14.1 (same behavior on 10.14 as well).</p>
  
  <h1>Update</h1>
  
  <p>I changed nothing, everything suddenly works. I am very curious what made the difference. Will close the question, if everything keeps working.</p>