Bram
Bram

Reputation: 8283

UDP hole punching between two clients on one machine

I do UDP hole punching using the following method: I have a lobby server L, and two clients A and B behind a (shared) NAT.

Now, A and B are running on the same machine. They both send a datagram to server L.

Server L tells both A and B the IP+PORT of the other. Note that the IPs of A and B that the server sees are identical, but the ports are different, as expected.

Then A and B send a datagram to each other, using the server provided addr+port.

Yet, their datagrams to each other never arrive.

My question: does UDP hole punching work if both clients are on the same machine? What if they are just on the same LAN, behind the same NAT?

NOTE: I tried to lower the strictness of my router, but Archer C7 does not seem to have a selection for Cone/Symmetric/Asymmetric unfortunately. I did switch off Stateful Packet Inspection.

UPDATE: When I try sending punch datagrams, I do see this come by over the network device:

ICMP dest unrch (port)

UPDATE: stunclient output:

$ stunclient --mode full stunserver.stunprotocol.org
Binding test: success
Local address: 10.0.1.2:49703
Mapped address: 209.161.250.218:49703
Behavior test: success
Nat behavior: Endpoint Independent Mapping
Filtering test: success
Nat filtering: Address and Port Dependent Filtering

Upvotes: 1

Views: 439

Answers (0)

Related Questions