Global and Local discovery

Why do I get the message

New UPnP port mapping: external port 9999 to local port 99999

when global discovery is disabled?

If the global discovery is not enabled, I expect this to mean that

  1. my device can only connect to other devices on my lan AND
  2. only devices on my lan can connect to my device

Assuming my interpretation of global discovery is correct, I can’t see why an incoming connection is necessary.

I don’t want to enable global discovery unless and until I want to sync off-lan.

I’m assuming that updates and stats are initiated by device.

Am I missing something?

Global discovery means, that your client will send it info (device id + ip) to the discovery servers listed in the input field below the checkboxes and has nothing to do with UPnP directly. Even if you disable global discovery, you can still be available from outside, when you use e.g. dyndns and enter the connection details on the other client manually.

To disable UPnP, disable UPnP in the settings.

1 Like

Thank you for replying, but you missed the point of my question.

I’m not after a lesson in UPnP or dyndns, just the answer to a simple question.

If I’m right, he only function for which syncthing needs to listen on an open port involves syncing off-lan.

So, why does it open a port anyway?

In case you hard code the address on one of the nodes, instead of using discovery.

1 Like

Got it. Thanks. :blush:

How to get connected device list of discovery server?

You can’t.

thank you for answer. How to connect my home pc and my office pc? why use the own discovery server. in local network, all my device connected. but outside devices are not connected

If the devices say OK in the global discovery server Then its finding it fine. Check the firewall and port forwarding section in the docs, as that’s most likely the reason.

OK Thank you very much

AFAIK: If your discovery server is running inside your network, all local syncthing nodes have the local ip and port in the discovery database. The discovery server uses the ip from which the clients are connecting.

So all external nodes will be able to find each other and all local nodes will find the local and the external nodes. As the external nodes probably won’t have port forwardning / UPnP, the local nodes won’t be able to connect to the external nodes.

In short: The discovery server needs to run outside your home / local network (e.g. VPS) to be used by internal and external nodes.

1 Like

Actually it could work.

When I set the global discovery server to my DynDNS name, my router connects as if it comes from the external IP but routes it internally (better speed, irrelevant for discovery).

I started the discovery server in debug, to get the info:

./discosrv -debug=true
2015/09/09 18:16:14 New limiter for <my-external-ip>
2015/09/09 18:16:14 <- <my-external-ip>:<random-port> discover.Announce{Magic:0x9d79bc39, This:discover.Device{ID:[]uint8{<my-id-in-hex>}, Addresses:[]discover.Address{discover.Address{IP:[]uint8(nil), Port:<my-port-in-hex>}}}, Extra:[]discover.Device{}}
2015/09/09 18:16:15 <- <my-external-ip>:<random-port2> discover.Query{Magic:0x2ca856f5, DeviceID:[]uint8{<my-id-in-hex>}}
2015/09/09 18:16:15 -> <my-external-ip>:<random-port2> discover.Query{Magic:0x2ca856f5, DeviceID:[]uint8{<my-id-in-hex>}}

I did not test this, but it seems that that should work for external nodes.

So it depends on your router and how the connection is established.

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