How do I make a TCP server work behind a router (NAT) without any redirection configuration needed.
- by Chetane
The scenario is the following. I have two machines A and B:
A: Client (behind NAT)
B: Server (behind NAT)
I want B to be able to listen on any given port, so that A can send packets to B through that specific TCP port and receive any response. If both machines are not behind a NAT it is pretty straight foward process. However how do I make it work so that it works even when B is behind a router, without him having to go change the router configuration enable some port forwarding etc...
For example, how do p2p program like torrent clients work without the user having anything to configure?
Thanks and I hope my question is clear enough.