How to set up syncthing to work with and without VPN

This thread seems to be related, but did not help me with my problem.

So I have syncthing running at home with the router set up to forward on a certain port to my computer’s syncthing. At workplace I have a computer and it is behind a firewall. If I have VPN (home -> work network) off then syncthing works fine without relay server. If I turn on VPN it won’t connect. My guess is that the VPN guides packages to the work computer onto a different route and that somehow does not allow a connection? Also there is another firewall between the VPN server and my work computer. What helps is to point the work computer’s syncthing to the VPN IP of my home computer. But that IP is different every time I connect.

What would be options for me in order to have syncthing syncing, VPN being on or off?

I don’t think this will work, as effectively you’re on a private network and no form of global discovery makes any sense. Local discovery is most likely blocked/filtered out as it’s broadcast traffic.

You could run a private discovery server within the private network (but it can’t be either of the machines that you are trying to connect, it has to be an third machine to be able to observe ips of the other two when they announce).

Another thing you could do is try to route the traffic outside of the VPN even when it’s enabled with operating system routing rules, but it’s not always viable, as some vpns are implemented like an all or nothing kind of thing.

Ok, thanks for your comments. If I have time I might go the way of routing around the VPN. Can be closed.

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