I am finding conflicting discovery port addresses on my machines and also online in support topics even on this forum. Can someone tell me what ports I should be using and perhaps even why they are preferred (since they changed at some point)? Should the IPv6 and IPv4 be the same or different (and again why)? Finally, is there a reason to change the port 22000 assignment to be different on each machine or should they be all the same (I am thinking it might make the WAN NAT a little cleaner but am not sure if I’ll break more than I fix)?
Background:
I have been using Syncthing for several months. As new machines were added to the mix, sometime they found the other locals, sometimes not - it seemed there were two camps or pools of machines syncing together with occasional overlaps though I could be wrong about the overlaps. However, everyone was able to see the “main server” when they were offsite and I was not too concerned. Over the weekend I tried to sort things out and discovered that the port addresses for discovery were different on several machines. I have never touched this setting so I am assuming that the default values changed at some point. I believe I set everyone to the same addresses and now the camps of which set of machines sees what other set of machines has changed and nothing works offsite. I rather imagine that I need to change some other firewall filter/NAT/port forwarding settings et al. on each machine and the WAN router, but, I would like to know what I should be trying to get working.
Perhaps my Google skills are lacking but I’ve not been able to find an explanation.
Setting the data transfer port to something other than 22000 is needed, if you don’t / can’t use UPnP and want more than one machine to be reachable from WAN. Without UPnP the port in the settings must be the same as the forwarded WAN port to be able to use global discovery.
For local discovery to work, the devices need to be in the same subnet and the the firewalls on the devices need to allow syncthing to use the local discovery ports (which also changed in v0.12, I think) and allow multicast/broadcast.