Possible for a device to push its “address” to peers?

I’m curious if it’s possible for a device to push an address string to all peers that connect to it, and for those peers to use that address string for future connections…

As a for instance, in cases where local broadcasting is challenged due to network configurations, a device can advertise its lan host name. Or in a dynamic DNS situation a machine may know its dns name and the devices trying to connect can do so directly without having to use dynamic or the discovery server.

Of course a connection would have to be established at least once for the address to be pushed, but once pushed, subsequent connections would be aware of the appropriate address string already.

I don’t think it works this way already, right? As I understand I have to manually set the address string for each machine on each machine. Is that right?

Yes, but only if you have disabled global discovery. Global discovery, despite its name, also helps LOCAL discovery. This is particularly useful in situations where local broadcasting does not work.

Since you asked this question, I assume that you have disabled global discovery. I would enable it again if I was you. If that is not allowed, you can install a local discovery server or, as you mention, manually configure devise addresses. But even if you use a local discovery server you still need to configure all nodes to use it.

How does it work? I had global discovery enabled and a VPN already established between the local networks, but discovery established a WAN link outside the VPN rather than a virtually local link through the VPN. Unless the discovery was aware of the VPN, I expected it to choose the local address. But it didn’t.

Anyway curious how global discovery helps local discovery. If it’s that the lan IPs are also passed through global discovery I’m aware of that. But in this case the link didn’t happen as I expected.

Security Principles — Syncthing documentation says:

I think that means that ALL addresses of the host are announced. (Someone please correct me if I am wrong.)

From what you have written so far I don’t know if you have tried to do direct connection by entering peer addresses instead of using global discovery. If you HAVE tried and it failed, I would suspect firewall SW on each of the involved devices. If that is the case, they will fall back to using global relays (which the default config allows).

You’re right. :slightly_smiling_face:

Enabling Syncthing’s “discover” option under Actions → Logs → Debugging Facilities shows it in action.

Does it include the ones manually entered into the address field of that host?

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