Well I just took a look on Windows 8 and it’s quite a similar result. Here are my findings, connecting through a FritzBox-Router using some IPSEC magic VPN that routes all traffic through the VPN tunnel.
Networks involved:
Work: 87.173.x.x WAN / 192.168.0.0/24 LAN (currently at)
Home: 79.255.x.x WAN / 192.168.79.0.0/24 LAN (VPN target)
Devices involved:
SJ3BZVN nas@home
DE5FWBU laptop@work
Starting Syncthing normally gives me
[DE5FW] 14:35:26 INFO: Starting web GUI on http://127.0.0.1:8384/
[DE5FW] 14:35:26 INFO: Starting UPnP discovery...
[DE5FW] 14:35:32 INFO: UPnP discovery complete (found 2 devices).
[DE5FW] 14:35:32 INFO: Created UPnP port mapping for external port 9848 on UPnP device 'FRITZ!Box Fon WLAN 7390' (192.168.0.1).
[DE5FW] 14:35:32 INFO: Starting local discovery announcements
[DE5FW] 14:35:32 INFO: Local discovery over IPv6 unavailable
[DE5FW] 14:35:32 INFO: Starting global discovery announcements
[DE5FW] 14:35:42 INFO: Established secure connection to SJ3BZVN at 192.168.0.190:22000-79.255.x.x:51491
Everything fine so far. Now I activate my VPN. Nothing happens in the logfiles. I decided to drop a new file into one of the shares to trigger a process. Now the following happens:
[DE5FW] 14:38:37 INFO: Connection to SJ3BZVN closed: WSARecv tcp 192.168.0.190:22000: Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat.
Connected devices appear now offline.
Error messages approx. translation: “A connection attempt failed due to no correct response of the endpoint.” Problems seems to be that Syncthing is not aware of a local IP change and does not try to rediscover the network settings. It assumes that the client still has the same active connection.
Restarting the Syncthing instance now, while VPN is active, leads to nothing better:
[DE5FW] 14:41:04 INFO: Starting web GUI on http://127.0.0.1:8384/
[DE5FW] 14:41:05 INFO: Starting UPnP discovery...
[DE5FW] 14:41:29 INFO: Get http://192.168.0.1:49000/igddesc.xml: dial tcp 192.168.0.1:49000: ConnectEx tcp: Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat.
[DE5FW] 14:41:29 INFO: Get http://192.168.0.1:49000/igddesc.xml: dial tcp 192.168.0.1:49000: ConnectEx tcp: Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat.
[DE5FW] 14:41:29 INFO: UPnP discovery complete (found 0 devices).
[DE5FW] 14:41:29 INFO: Starting local discovery announcements
[DE5FW] 14:41:29 INFO: Local discovery over IPv6 unavailable
[DE5FW] 14:41:29 INFO: Starting global discovery announcements
Still assumes I’m in the work LAN, tries to UPnP the wrong router (it should be 192.168.79.1) and fails with the same error message. Does not discover the NAS instance on the new LAN through local discovery.
Looking at discovery through the REST API endpoint /rest/system show that the discovery is seems to be working:
"extAnnounceOK":{
"udp4://announce.syncthing.net:22026":true,
"udp6://announce-v6.syncthing.net:22026":true
}
Connections to other devices though, do not work, looking at the /rest/conncetions endpoint:
{
"total":{
"At":"2015-03-18T14:46:36.0707896+01:00",
"InBytesTotal":0,
"OutBytesTotal":0,
"Address":"",
"ClientVersion":""
}
}
Tricky thing is, I’m not a network guru and by all means, I have no fricking idea how this tunnel works. Nothing from ipconfig nor netsh shows any difference in configuration or routing when the VPN is active, yet it moves me out of my 192.168.0 net.
Skype, Chrome and btsync show activity as soon as I switch to VPN (looking with tcpview from Sysinternals) so there must a way to detect it, or they just register that the connection went down and retry it? Synthing on the other hand does not show any activity as soon as I switch to VPN, except it looses the one connection it had.
No idea if this helps in any way though.