Hey. First time syncthing user here and I’m loving it! One question I have is how do I know if syncthing is syncing my stuff through the Internet, or it’s local only?
I have three devices (1 that acts like a server, syncing my stuff to the other two devices which are a smartphone and Windows PC) all located in my LAN network. Each of them has the following options set:
The purpose of this is to disable any type of Internet chatting and everything to be synced via my local network. However, once I click on my devices from the menu, I see the the connection type as TCP WAN:
The above picture is taken from my server application. The “VM” device is a Windows 10. Once I go there and take a picture of the syncthing config however, I see TCP LAN:
My question is, how do I know for sure what’s the type of connection and if it’s a LAN, then how do I make it?
With only local discovery enabled, the only connection adresses that can be discovered are LAN. You can see that all devices are connected via a 192.168.2.0/24 subnet (IPv4 adresses from the private RFC1918 subspace), which is almost certainly your LAN subnet.
The probable reason why the VM says “WAN” is because the VM’s virtual network interface is run behind an internal NAT (managed by the hypervisor). This is a common setup within VMs, but it does mean that your VM uses a different subnet than your actual LAN. This in turn causes syncthing’s network detection to consider your actual LAN to be a WAN address.
Great explination, thank you very much. However I do not understand how would syncthing know that the VM’s virtual network adapter is controlled from my hypervisor, therefore it’s behind a NAT.
I didn’t form that question so well. I know that this VM is NATed, because I made it. But looking from a side, it’s sitting in the same subnet, with the same mask. Anyone looking without knowing will assume that this is just another host on the same network (as it is). The hypervisor is ESXI and my understanding is that NATing there should not be visible for the hosts around the network.
That’s correct, but from the perspective of the syncthing instance running inside the VM, everything outside of the VM is outside of its local (virtual) network. Therefore, what you consider LAN is “not local” from the VM’s perspective. Hence the syncthing instance in the VM says that your LAN is WAN.
For the hosts not running in the VM, the NAT is indeed (practically) invisible.
The TCP WAN is being shown on the syncthing server (another ubuntu VM). On the Windows 10 VM, the connection type is shown as LAN. Actually on all of the client devices the connection type is shown as LAN
You however still had the correct answer. The syncthing server is a docker container which is sitting on the Ubuntu VM. And since docker adds another layer of NAT, it would be inevitable for the syncthing to recognize the network as WAN.