TCP Server Accessible through the internet
-
I'm building a client-server application and it works fine if I use local IPs (like 192.168.1.1) but doesn't work if i use the server public IP. I guess that is because the router connected to the PC running as server doesn't allow port forwarding and keeps all the ports closed (and I'd like not to have to change that).
Since many other applications manage to communicate with that PC even with those ports closed (online games just to mention one) how can I make my server receive connection despite the router configuration?
I use TcpSocket and TcpServer inheriting classes and the port that I chose is 7676 -
Games connect to game servers owned by the companies. I'm sure they have ports forwarded there ;). If you want clients to connect to the server, the server must accept incoming connections, as you said, e.g. by port forwarding when there's a router in between. This is also true for games. I'm aware that a handful of applications (skype?) manage to circumvent this protective feature of routers, but they pose a security risk to the whole network they are used in and shouldn't be supported.
What's the problem with port forwarding your router? It's the obvious and correct way to do it.