Connection with mobile vpn

Hi all,

does syncthing works inside the vpn ? When I active the vpn syncthing does not connect to the other pc. I get the error:

[XXXXX] 2025/04/24 17:22:34 INFO: Failed to acquire [::]:XXXXX/TCP open port on NAT-PMP@172.20.10.1: getting new lease on NAT-PMP@172.20.10.1 (external port XXXXX -> internal port XXXXX): read udp 172.20.10.2:XXXXX->172.20.10.1:XXXXX: recvfrom: connection refused

Is there anything to set ?

thnks

When a vpn is active syncthing should be able to still work using the wan (relay).

https://docs.syncthing.net/users/relaying.html

Sometime it connects, but sometime it doesn’t or the connection is not stable and it disconnects and don’t reconnects.
The vpn is installed on the phone
The error seems to refer to syncthing to try to open ports on the phone and it doesn’t succed, rather than a discovery problem

The problem is most likely that Syncthing on Android isn’t able to pick up the internal VPN IPs if you want to connect both phones that way.

I use Syncthing over VPN pretty constantly. I configured the VPN IP addresses as peer addresses.

Effectively I noticed that the two pc connects and sync in vpn too, that message does not block the connection and the sync

Syncthing works over a mesh VPN, because a mesh VPN is essentially a virtual LAN that all nodes are part of. Communicating over the mesh LAN is no different than communicating over a regular LAN to Syncthing.

No reason Syncthing would not also work over a centralized VPN, if the node that Syncthing is connecting to is also connected to the same central VPN server and the VPN firewall rules allow the communication between different nodes through the central VPN server.

Would assume that Syncthing could also work through a third party VPN provider through the Syncthing relay network.

ok