Multi-Host Servers

Create multi-host Pritunl servers for high availability

This tutorial will describe creating a multi-host configuration with two Pritunl servers. This will allow automatic failover when a host fails. The diagram below shows the network topology for this tutorial.

2490

MongoDB Server

Both Pritunl servers will need to be able to access the same database server. This is used for inter-server communication. Services such as MongoDB Atlas can be used to easily deploy a reliable replicated MongoDB cluster. When configuring a self hosted MongoDB cluster the instructions in Securing MongoDB should be followed to enable authentication and SSL on the MongoDB cluster.

Initial Setup

After a MongoDB cluster has been deployed all the Pritunl servers must be configured to connect to the same MongoDB cluster. If a Pritunl server has already configured the MongoDB uri it can be reconfigured by running the command pritunl reconfigure followed by restarting the Pritunl service.

500

Configure Server

First configure a VPN server that will have multiple hosts. The Pritunl hosts should all be on the same local network to access the local network routes. Then attach the hosts to the server.

598

The server configuration should look similar to the example below with multiple hosts listed. When the server is started one of the hosts will come online. In the event that a host fails one of the other available hosts will be used to run the VPN server.

1140