I would like to understand how udp hole punching works when two hosts each behind the port restricted cone NAT establish connection.
As I understood, it happens in several stages and involves three hosts.
Host A and host B are behind the port restricted cone NAT.
Host C is a server that can receive packets from the hosts A and B.
- A sends a packet to C.
- C receives packet from A and determines A's external address:port pair
- B sends a packet to C.
- C receives packet from B and determines B's external address:port pair
- C sends the external address:port of B to A
- C sends the external address:port of A to B
- A sends packet_1 to B's external address
- B sends packet_2 to A's external address
But I can't do it。it's the window,Who can tell me why?