I wrote two applications, client and server using Visual C++ 2008. When I try to connect them they work fine in LAN network using local IP address like: 192.168.1.2 for the client and 192.168.1.3 for the server.
The problem is that when they connect over the internet, say for example the client is in a city and the server is in another city and both are behind routers they DO NOT connect even I use the public IP.
What I know is that the router clients all use one public IP to share internet connection, and the router generate local IPs for them.
I asked many developers but I had no clear answer, they suggest to disable NAT function of the router or put a redirect port. Then I responded why MSN for example did not need this kind of configuration to work where multiple users can connect under the same public ip behind a router?
If you know a technique, a website, a resource to solve this problem. Please share it with me I'm waiting...