title: How to find a free TCP port
body: <p>How do I find a completely free TCP port on a server?  I have tried the command line;</p>
  
  <pre><code>netstat -an
  </code></pre>
  
  <p>but I am told the ones with a status of LISTENING are already being used.</p>
  
  <p>I also tried a tool called TCPView but again it only showed which TCP ports were being used.  I know how to telnet to a port to check its open but I need to find one that is free.</p>