Device Addresses Priority

Hi,

I’ve found an old thread about device address priority but I thought I’d just bring it up again.

If I set a computer up to have tcp://:,tcp://:, even though the computer has connected with the internal IP address, I can sometimes see in the logs “Failed to exchange Hello messages…” on the other computer that references that computers IP address trying to connect to the computer on the same network but on an external IP address.

On computer 1 it is set as tcp://:,tcp://: and on computer 2 as tcp://:, dynamic

Is there any way of stopping these messages or getting Syncthing to use only the internal address if it is on the internal network?

“Local Discovery” is enabled on both devices and I have configured a local DNS entry for the DNS name on the internal network.

It is as though computer 2 is trying to connect out to the internet and back in even though it has a connection and it is being blocked but I’d prefer this not to happen if they already have an internal connection.

If it failed to exchange hello messages, means the connection is not healthy, so it moves to the next available one.

Enabling discovery when addresses are hardcoded is moot, as it doesn’t use discovery when there is no “dynamic” entry in the list of addresses.

Makes sense that the connection is not healthy as I think it will be blocked.

Is there any setting I can use to stop it trying to connect externally when the computer is already on the local LAN?

You can remove the external address from the list of addresses it tries.

It doesn’t have the external address on that computer. It only has the internal address and ‘dynamic’.

The logs from that computer show that its internal IP address is trying to connect to the external IP address of the other computer even though it is on the same LAN. It won’t work either as it will end up trying to contact itself through the firewall etc.

If external addresses are configured, there is no way to make syncthing not connect via them, if the internal (lan) addresses are failing, because it has no clue where the device is, so it tries every option available.

If you don’t want them to connect over external addresses, then just remove dynamic/external addresses, but that means the devices will never connect if they move outside of the network.

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