rajatdasgupta



  1. The existing application uses the TCP - socket based programming and there by we are exclusively depending upon the IP address of the user machine along with the fixed port for working of the application.

  1. The server listens at one fixed port at a given IP, continuously listening to the incoming connection requests at the port.

  1. On receiving any information or data at the port, it sends that information to the processing function, where ultimately the message will be processed upon and give the required information. The server then utilizes the incoming data and recognizes which user has sent the query, and thereby redirecting to that user the processed information.

  1. This all goes well, when client is having a unique IP, which is visible to the outside world of internet. But when the client machine is behind a proxy or behind NAT, then the IP which is using by the client will become the LAN IP, which is not visible to the outside world. In this case, the requests from the clients will go to the server. But upon processing the information by the server, the server could not be able to locate that particular internal IP, thereby failing the application.

  1. So here the main problem we are facing is to how to expose the internal IP of the machine to the outside world in a unique manner, so that the server could send the data back to the client, even if the client is behind the proxy


Can someone help me out from this

Regards,
Rajat Dasgupta



Re: .NET Framework Networking and Communication dealing with NAT issue in .Net

Anch1ang

I think you will need port forwarding on the client side.
btw, why not using the same connection (initiated by client) to send back the information from the server

from my understanding, there is no way you can access client behind proxy (NAT) directly without port redirection.
but with port redirection you are limiting yourself to connect to only 1 PC or client on the unique IP.