I'm trying to establish a reliable VPN connection from a cloud VPS (CentOS7) to my Sophos UTM.
The purpose is for taking a Veeam Linux Agent backup of the VPS. The backup destination is a Veeam B&R repository on the local network (192.168.1.0/24), behind the Sophos UTM.
I have installed the OpenVPN client on the VPS and I can establish a connection but the VPS gets a dynamic IP (10.242.2.0/24). It needs a static IP. I tried adding a SNAT as described here, but it does not help for some reason. Is there a rule that needs to be added to iptables on the VPS?
I even considered working with the dynamic IP and running the backup job manually but for whatever reason, the VPN connection periodically disconnects/reconnects and the VPS gets a new IP each time so the backup job fails.
Any ideas? I'm open to suggestions. In Veeam I can specify the computer that is being backed up by name or IP.
What do most people use to backup/restore a cloud VPS? I have to store the backup on a Windows NTFS partition so sticking with Veeam would eliminate a lot of the Linux to Windows file system headaches.
UPDATE (2021-06-15):
The post I linked to above only mentions creating a SNAT. I found a more recent post which mentions creating a SNAT and a DNAT. This works in my preliminary testing.
So to make this work, you need three things:
- Host network definition:
- This is where you specify the local,static IP that you want to assign to this particular user. You can even assign a DNS hostname.
- Example: Test-static, 10.242.2.99, test.local, interface: Internal
- SNAT:
- test (User Network) -> Any -> Internal (Network) : from Test-static
- DNAT:
- Any -> Any -> Test-static : to test (User Network)
This thread was automatically locked due to age.