title: Unable to connect on socket across different networks
body: <p>I am having trouble connecting my online application to others across another network. I am able to give them the hostAddress to connect when we are on the same network but when we are doing it across the internet the generated host address doesn't allow a connection, nor does using the ip address gotten from online sites such as whatismyip.com</p>
  
  <p>My biggest issue isn't debugging this code, because it works over intra-network but The server doesn't see attempts when we try to move to different networks. Also, the test port I am using is 2222.</p>
  
  <pre><code>InetAddress addr = InetAddress.getLocalHost();
  String hostname = addr.getHostName();
  System.out.println("Hostname: " + hostname);
  System.out.println("IP: " + addr.getHostAddress());
  </code></pre>
  
  <p>I display the host to the server when it is starting</p>
  
  <pre><code>if (isClient) {
  System.out.println("Client Starting..");
  clientSocket = new Socket(host, port_number); 
  } else {
  System.out.println("Server Starting..");
  echoServer = new ServerSocket(port_number);
  clientSocket = echoServer.accept();
  System.out.println("Warning, Incoming Game..");
  }
  </code></pre>