Syncthing over NAT

I’ve set up a shared folder between two Linux machines, both behind residential routers. All connections seem to go via a relay, even though the router at one endpoint is set up to forward traffic on port 22000, as described in the documentation. The relay connection is unreliable at best, and doesn’t seem to have the throughput to handle files more than a couple of megabytes in size :confused:

I don’t have access to open that port on the other router, but according to the docs I should only need to do it on one node. I’d rather not enable UPnP because I’m concerned that would open a security hole in that local network—my understanding is that UPnP was never intended to face the public internet.

Both computers are running Linux x86-64, and both are running the latest version of Syncthing (0.12.8?), as well as all other software (kernel, etc).

I’d do a nc -l 22000 on the end which supposedly has the port forwarded and echo test >/dev/tcp/<ip>/22000 on the other end, and see if the message arrives to verify that the port is forwarded correctly.

If it is, then set STTRACE=discovery,connections env var on the non-forwarded side, and check what addresses it discovers for the forwarded side. Bare in mind that you have to forward 22000 to 22000, and not X to 22000, as syncthing has no clue what X is to be able to advertise it.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.