title: Bind ServerSocket to external IP
body: <p>I've built a simple server/client chat application, for study purpose.
  Now it works perfect locally while I initialize my server using the default constructor <code>ServerSocket server = new ServerSocket(18524);</code> and on the client side I'm using <code>client = new Socket(servername, 18524)</code> while <code>servername = "localhost";</code></p>
  
  <p>I've also figured how to use it on my local network, i.e connecting to server hosted on 192.168.x.x.</p>
  
  <p>Problem is when I try to bind my server to my external IP address, i.e 87.92.x.x</p>
  
  <p>Any idea why this is hapening?</p>
  
  <p>Edit: I've did the following, maybe I still am missing something.</p>
  
  <pre><code>server.bind(new InetSocketAddress("87.x.x.x", 18524));
  </code></pre>
  
  <p>I've also forwarded the port 18524 (TCP and UDP) on my router and made sure the port is open on my windows firewall.</p>
  
  <p>Still I recieve: <code>Exception in thread "main" java.net.BindException: Cannot assign requested address: JVM_Bind</code></p>