VPN providers such as NordVPN and IPVanish give you a WireGuard file per server, and allow one connected tunnel per account at a time. From 1.1.31, Korthveil can hold many servers of several providers in one failover group and keep exactly one tunnel per provider account connected: the first working NordVPN tunnel carries your traffic, the first working IPVanish tunnel is connected and ready, and every other tunnel waits idle until it is needed. When the active tunnel fails, the ready one of the other provider takes over at once.

At a glance:

Step Where What
1 VPN › WireGuard › Import configuration All your provider files at once
2 Firewall › NAT › Source NAT Outbound NAT per tunnel (the wizard adds it)
3 Network › Policy routing › Gateway groups The order, One tunnel per provider account, kill switch or fail-safe
4 Network › Policy routing › Policy routes The devices that use the group, first in the list
5 Policy routing, WireGuard › Tunnel status Check the states: active, ready, standby, failed

The wizard System › Wizards › Send devices through a VPN does steps 1–4 in one pass and picks the right connection mode by itself.

Why one connection per account

A provider account allows one connected tunnel (one session per key). If two tunnels of the same account are connected together, the provider keeps dropping one of them: the tunnels go up and down, pings are lost, and the group switches back and forth. That happens when a group keeps all its members connected (the classic Failover, Fastest and Load balance), and in a failover pair before 1.1.30 (both firewalls connected the same tunnels).

Step 1: Import all files at once

VPN › WireGuard › Import configuration, then choose all your files in one go (for example five NordVPN and five IPVanish .conf files, or QR code pictures). Each file becomes its own client tunnel with its own random local port, so several tunnels of one provider never clash on port 51820. A file that is the same as an existing tunnel is skipped.

Import several WireGuard files
Import several WireGuard files

NordVPN gives every client the address 10.5.0.2: the import (and the wizard) give such tunnels /32 so they can exist side by side.

Step 2: Outbound NAT per tunnel

Every tunnel needs a Masquerade rule with the tunnel as out interface (Firewall › NAT › Source NAT), or the provider drops what you send. The wizard adds the missing ones; see Send your TVs through a VPN for the picture.

Step 3: The group

Network › Policy routing › Gateway groups › Add gateway group (or edit yours):

The group: one tunnel per provider account
The group: one tunnel per provider account

Step 4: The route

Policy routes › Add policy route: the devices (an address object), destination any, Send via the group, and move it to the top. See Send your TVs through a VPN and Send chosen websites and torrent traffic through a VPN.

Step 5: Read the states

Network › Policy routing › Gateway groups shows each member:

States: two failed NordVPN tunnels, Portland active, IPVanish ready
States: two failed NordVPN tunnels, Portland active, IPVanish ready

VPN › WireGuard › Tunnel status shows the same from the tunnels' side: only the connected tunnels are online with a recent handshake; the standby ones show never and send nothing.

Tunnel status: one online tunnel per provider
Tunnel status: one online tunnel per provider

What happens when a tunnel fails

Tested on the test firewall with four provider servers (two NordVPN, one with an expired key, one IPVanish):

  1. NordVPN Seattle stops answering: after its monitor misses 3 pings (3 seconds with a 1-second check), the traffic moves at once (0.1 s) to the ready IPVanish tunnel; the old connections are cleared.
  2. In the background, the next NordVPN tunnel (Dallas) is woken; its key is no longer accepted, so it is marked failed within 10 seconds, and Portland is woken and connects.
  3. Portland is earlier in your order than IPVanish, so the traffic moves back to NordVPN (Portland); IPVanish stays connected and ready.
  4. If every tunnel fails: the kill switch drops the traffic (nothing leaves outside the VPN), or the internet line carries it (fail-safe).
  5. A failed tunnel is retried later, one per account, while that account has no working tunnel. In the test, two NordVPN tunnels were never connected at the same time.

In a failover pair

From 1.1.30 the standby firewall keeps all provider tunnels idle; only the active firewall connects. After a failover, the new active firewall starts from your first tunnel of each account.

Good to know

The pictures are from the test firewall (version 1.1.31) with a simulated provider network.