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.

hammil
  • 33
  • 3
  • 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.](http://quicksorted.com/how-bit-torrent-and-skype-work-behind-a-nat-router/?so) – Rakesh Gopal Oct 14 '16 at 07:31

1 Answers1

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.

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