Direct connection via odd ports and question about "dynamic" address

Hi there,

First of all great piece of software. Have been running it for a week through an SSH tunnel as this is easier, safer, and faster than a relay or port forwarding. When using the dynamic address for a remote device will a localhost address be discovered automatically? It appears not to. It would be neat if it did scan localhost as a last resort but not sure what kind of unintended consequences this would have.

Secondly when did get back home decided to give Syncthing a try without the SSH tunnel. No matter what one of the devices always connects to an odd port on the other machine. For example one is connected to IP:22000 while the other is connected to IP:60124. If restart at least one will always connect to an odd port. Which is interesting because the firewall on both is only open on 22000. Both machines set to listen on default but the same behaviour was observed when listening on tcp://

One machine is Linux with LXDE. Other is Windows using SyncTray. Additionally when using the syncthing-linux-amd64-v0.14.32.tar.gz package the default GUI port wasn’t 8384 and the default listening port wasn’t set as “default.” Had to set these manually.

Really neat that you have ARM and MIPS packages. Thought about running Syncthing on a Tomato router with Entwareng.

Syncthing doesn’t scan for devices with dynamic. It uses local broadcast to tell other devices in your network, that it’s there. This doesn’t work with local SSH port forward.

Syncthing connections are established in one direction only. So one device connects to the other and both are connected and can transfer in both directions. The connecting devices, of cause, doesn’t use it’s listening port for outgoing connections. That’s why one of the port is an “odd” port.

If the default ports are unavailable on first startup (typically because another Syncthing instance is running) it will pick something random instead.

Thanks to all. Great explanations and understand Syncthing much better now.

One thing found on own is that UDP port 21027 has to be open in order to find another Syncthing machine(s) broadcasting on a network when using “dynamic” on client machine. Was thinking initially that could find a machine broadcasting on a network without opening any ports on the client machine.

Bottom line this is even better now that understand how it works.