fbpx
View Categories

Reverse Proxy VPN Configuration

2 min read

When using the VPN tunnel with RPaaS there are a couple important items to keep in mind, such as keeping interruptions to a minimum and how traffic flows. Below are items that are commonly configured with this portion of the service.


Automatic reconnection #

The heartbeat traffic that flows over the VPN is used for offline server monitoring — so any interruption in VPN connectivity would result in a large number of offline server alerts. Thus, it’s important for the VPN to automatically reconnect after the server reboots.

For most scenarios, we suggest the use of the OpenVPN service; setting it to automatic is often times all that’s required (depending on authentication method). As a backup method, the VPN can also be connected on the command line.

The CLI command to connect the VPN is:

cd C:\Program Files\OpenVPN\config
start "" "C:\Program Files\OpenVPN\bin\openvpn.exe" --config "C:\Program Files\OpenVPN\config\<filename>.ovpn"

This command can be put into a startup task or script so it will automatically connect the VPN when the server reboots.

Routing traffic #

By default, traffic will route over the VPN. For normal VPNs, this is likely desired, but since this is for specific traffic only this behavior can be problematic. However, it’s very simple to configure this; changing the metric on the route to be higher than the LAN will resolve the issue.


Our first step is to get the index of the interface. To list all interfaces, run the following command:

Netsh interface ipv4 show interface

The first column is the index, and the second column is the metric. The lowest metric will be the default for routing, so the metric of the VPN adapter should be set higher than the LAN adapter. To change the metric run the following command:

netsh interface ipv4 set interface <#> metric=<#>

After running the command the show interface command can be run again to verify the changes completed.