How do I make a TCP server work behind a router (NAT) without any redirection configuration needed

前端 未结 4 694
孤独总比滥情好
孤独总比滥情好 2020-12-09 11:34

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

4条回答
  •  情深已故
    2020-12-09 12:29

    To answer the example of Peer to Peer programs, and in general: There is a technology called Universal Plug and Play which NAT routers can use to allow clients behind them to expose ports to the outside. That's what bittorrent clients can use so the other clients can directly connect to them.

提交回复
热议问题