How does NAT traversal work?

Expert

How does NAT traversal work?

Answers 1

NAT is firewall device, stopping incoming connections - not ideal for p2p. To break through NATs, UPnP port forwarding allows people outside of NAT to connect to you but there’s a lot that go wrong - router doesn’t support UPnP, could be double NATs, port allocation can be taken by someone else. Another way to NAT traverse is new libp2p NAT transversal: circuit relay v2 solves a lot of problems - every node is a circuit relay node, ports are accessible from anywhere on the internet, circuit relay v2 allows rerouting and testing of latency.