title: Socket.RemoteEndPoint returns gateway address
body: <p>For some reason the C# socket.RemoteEndPoint started returning the address of the default gateway. It used to work and I know the code hasn't changed. I'm not sure when it started occurring as the logs don't go back far enough so I'm not sure what could have happened to this server to cause this. Everything seems to be working normally. Just not getting the remote IP anymore.</p>
  
  <p>Anyone have any idea what could cause this? </p>
  
  <p>Here is the relevant code.</p>
  
  <pre><code>    public void startClientListening(string ipString, int port)
      {
  
                  IPAddress ip = IPAddress.Parse(ipString);
  
                  // Create the listening socket...
                  clientListenerSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
  
                  IPEndPoint ipLocal = new IPEndPoint(ip, port);
                  // Bind to local IP Address...
                  clientListenerSocket.Bind(ipLocal);
                  // Start listening...
                  clientListenerSocket.Listen(32);
                  // Create the call back for any client connections...
                  clientListenerSocket.BeginAccept(onClientConnect, clientListenerSocket);
      }
  
      private void onClientConnect(IAsyncResult asyn)
      {
              Socket workerSocket = clientListenerSocket.EndAccept(asyn);
              workerSocket.NoDelay = true;
  
              //This returns 192.168.1.1 rather than the remoteIp
              string remoteIp = ((IPEndPoint)workerSocket.RemoteEndPoint).Address.ToString();
  
      }
  </code></pre>