VPN connection between 2 remote NAS

I am setting up a DS1522+ and DS1520+ that will be part of a replication task. The devices are currently both located on my home network. I am moving one of them to a friend’s house and would like to set up a VPN connection between them for when the replication tasks are occurring. The replication will be two-way across multiple shared folders. For example:

  • Shared folder 1 (master)
  • Shared folder 2 (master)
  • Replication setup from A → B
  • Replicated folder 3 from NAS B (read only)


  • Shared folder 3 (master)
  • Replication setup from B → A
  • Replicated folder 1 from NAS A (read only)
  • Replicated folder 2 from NAS A (read only)

I only need A & B connected via the VPN during the replication tasks. Right now I have an OpenVPN setup on A.


  1. When I’m replicating B to A, I think I figured out how to connect B to A using A’s VPN. Since I don’t need B connected to A all the time, is there a way to schedule a task to create the VPN connection, perform the replication, and then disconnect the VPN?

  2. Similar approach for replicating A to B. Do I need to set up a different VPN on B and then connect from A to B?

  3. I set up the initial replication based on the two devices located on my home LAN. When I move device B to my friend’s house, I suspect I will need to repoint the replication task. However, I don’t know where: the QuickConnect URL or the Synology DDNS address. Thoughts?


For #1 I was interested in much the same thing for a future setup and found this script:

All you’d have to do is rearrange some of the pieces (the purpose of the above file is a keep alive situation), and you’ll be set. You don’t even need to mess with the ROUTE1 and 2 stuff, just the disconnect and reconnect. Conf_id is the item that’s not explained that you will need. Step 1 on this page ([Synology] Auto connect VPN at startup | Good Code Smell) explains how to get it.

I actually use Tailscale for this all the time!

I know that you mentioned Tailscale a few times in your videos but never gave it much thought. I noticed that their personal user accounts are free (which is good); however, I need to do some more research about the differences between using OpenVPN and Tailscale.

See this Synology link: How do I set up my Synology NAS as a VPN server? - Synology Knowledge Center.

But Synology says they don’t recommend it even though it’s doable. My guess is that it will be unstable. You can use VPNPlus if one of your routers is a Synology. I agree, use Tailscale; it is designed to do this.

1 Like