3

Apologies if this question has been asked before, but I don't think any of the ones I've found are asking quite the same thing.

I'm designing a simple P2P protocol whereby a known server provides clients with each others' addresses, and they then communicate. I'd imagine there are some similarities to BitTorrent, Skype, and other P2P applications.

My question is, how can hosts that use NAT, being behind some router or firewall (i.e. 99% of home users) be identified and communicated with without manual port forwarding? I know it's possible, because BitTorrent and Skype work just fine.

I'm a relative novice in networking, so I greatly appreciate being able to call upon the collective wisdom of this community.

1
  • 1
    Have some experience in implementing P2P applications and getting them to work behind NAT routers. Skype and Bit Torrent use UDP hole punching to work behind NAT routers. I have written an article and made a Demo video to help others implement similar applications. Also provided links to useful libraries that does most of the ground work like libutp, here. >>> UDP hole punching Demo video and useful Libs. Oct 14 '16 at 7:31
3

You need nat traversal (nat-t) or nat hole punching. This is a partial solution, as many nat gateways will not allow that. This means you'll need servers with public IPs to pass the traffic between restricted nat clients as part of your solution.

1
  • 1
    using servers to pass the traffic isn't p2p any more, these servers will be the bottlenecks May 29 '19 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.