Syncthing using wrong port to connect node

I’m not entirely sure if this is maybe PBCK, so I’m posting this here.

I set up my nodes, made sure the announce server connects on both, and forwarded ports 8080 and 22000 on my server node. For some reason, my laptop (connecting over internet) tries to connect to port 29670 instead of 22000 (according to STTRACE=net logs).

I checked the config on both nodes, and neither contains that port number.

I have worked around it now by setting address to hostname:22000 instead of dynamic, but that’s obviously not how it’s meant to be.

Edit: Both nodes are on v0.9.2.

Is UPnP enabled on the server? If it is, and if syncthing sets up a port forward using UPnP, it will announce that port instead of 22000. You can see in the startup messages if this is the case. However, connecting to it should also work in that case…

RIght, it prints “[4GIJ6] 07:34:51 INFO: Created UPnP port mapping - external port 29670”.

The problem is probably that there are two routers on the way out, which both need to have their ports opened, whereas syncthing only seems to open one router’s port.

Yes. Only the closest router can be reached by UPnP.

Okay, I fixed it by disabling upnp in the syncthing config.

Thanks for your help :slight_smile:

1 Like