0

I’m using Golang to try to send packets through UDP to an IP address and port provided by STUN. The goal is to communicate between two devices without having to open a port in the firewall, as both devices are located in a different network.

The program runs on both devices in the following manner: Device 1 waits for device 2 to send the IP address and port found by STUN. This goes through an open port in the firewall of device 1. (Only for device 1 an open port is possible) The problem is that device 2 does not receive any packets through the port found by STUN.

I think the problem consists of the router not knowing the connection to device 2. Device 2 is connected with the router, but the router doesn’t know what to do with the packets.

Do you have any idea how to solve this problem?

Thanks!

Chiel
  • 104
  • 7
  • Are you sure that device 2's NAT is (a) keeping the STUN port mapping open, and (b) allowing device 1's public address through the NAT port mapping? –  May 31 '18 at 14:15
  • https://stackoverflow.com/a/8524609/104458 – selbie Jun 02 '18 at 16:13

0 Answers0