NAT Bypass: UPnP / IGD vs. NAT-PMP

I am writing a P2P application and do not want users to manually configure port forwarding.

I'm a bit confused, because there are two different protocols for setting up NAT, UPnP / IGD, and NAT-PMP. Which one should I use? Are they supported by all NATs? Or should I support both to make sure that at least one of them will be supported by NAT?

+3
source share
3 answers

NAT-PMP (now PCP) is an ietf project, so it needs to be implemented. However, to ensure compatibility, you must allow your application to silently refuse UPnP / IGD, since not all NAT devices support PCP / NAT-PMP, and many of the older devices only support UPnP / IGD.

+2
source

Consider using STUN instead of NAT-PMP or UPnP-IGD. It usually works all over the place and will almost certainly work through the large-scale NAT services NAT NAT and NAT64.

+1
source

UDP. , , 4G LTE ( ) , UDP-. , UDP.

0

Source: https://habr.com/ru/post/1783573/


All Articles