How do I connect two QNAPs in two different networks by VPN?
Run the QBelt server on the NAS that has a public IP address, and create a VPN client connection on the other. On the second one add a static route to the remote network. The two networks need different addresses, for example 192.168.1.0/24 and 192.168.2.0/24.
Topic: Network
Steps
- Check the addresses of both networks. If they overlap, change the subnet on one of the routers before you start.
- DDNS
Dynamic DNS: a name on the internet that follows the public address of your connection when it changes. To reach the NAS directly, it must still be reachable from the internet.On the server NAS (where the public address is; it need not be static) set up QBelt as described in How do I set up a VPN to a QNAP and reach my home network from outside?. That covers the server, the preshared key, the port, the UDP forward on the router, DDNS and the QuFirewall rules. - On that NAS create a separate account, such as
vpn-backup, and in Privilege Settings of QVPN Service allow it QBelt. Do not give it administrator rights. - On the client NAS install QVPN Service and open VPN Client → VPN Connection Profiles → Add → QBelt.
- Enter the profile name, the server's address (the DDNS name), the port, the account, the password and the preshared key. Select reconnecting when the connection is lost. Press Create and connect. When the server's address changes, QBelt does not look up the name again on an automatic reconnect; connect by hand then.
- Do not turn on the option to use the remote network's default gateway. Then only traffic for the remote network goes through the tunnel.
- On the client NAS open Control Panel → Network & File Services → Network & Virtual Switch, then Network → Route. Add an IPv4 static route: the destination is the remote network (for example
192.168.1.0, netmask255.255.255.0), and the interface is the QBelt tunnel. Without this route the client does not find the other NAS.