How do I make a TCP server work behind a router (NAT) without any redirection configuration needed.
Posted
by Chetane
on Stack Overflow
See other posts from Stack Overflow
or by Chetane
Published on 2009-10-02T20:10:32Z
Indexed on
2010/05/01
21:37 UTC
Read the original article
Hit count: 181
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.
© Stack Overflow or respective owner