OPNsense WireGuard VPN for Road Warrior configuration

From Thomas-Krenn-Wiki
Jump to navigation Jump to search

The Open Source Firewall OPNsense supports several technologies for setting up VPN (Virtual Private Network) connections. In addition to IPsec and OpenVPN, OPNsense version 19.7 offers the possibility to set up a VPN with WireGuard. In this article we show the configuration of the WireGuard VPN service on an OPNsense firewall, so that a roadwarrior user can access the internal (company) network behind the OPNsense firewall.

Note: This manual was created with an older version of OPNsense, it may be that some menus and settings are now done differently.

Prepare OPNsense for Wireguard VPN

The following steps are described in this section for setting up the VPN:

  1. Installing the WireGuard Plugin
  2. Configuration of WireGuard to OPNsense
  3. Firewall rules WAN connection
  4. Firewall rules WireGuard connection

Installation of the WireGuard Plugin

The installation of the WireGuard plugin is done conveniently via the integrated plugin management.

Configuration of WireGuard to OPNsense

The following screenshots show the configuration of WireGuard:

Firewall rule for WAN

The following screenshots show the configuration of a firewall rule that allows access to the WireGuard VPN service on the OPNsense firewall:

Firewall rule for WireGuard

The following new rule allows the connected VPN peer ("client") complete access to the networks of OPNsense:

Configure endpoint ("client")

The following screenshots show an example of the configuration of an endpoint that is allowed to connect to the OPNsense system via WireGuard. The configuration of the remote terminal (in this example a Ubuntu system) can be found in the article Ubuntu 18.04 as WireGuard VPN client configuration.

Test connection

Start the Connect from client device.

You can then also check the status of a connection on the OPNsense firewall:


Foto Thomas Niedermeier.jpg

Author: Thomas Niedermeier

Thomas Niedermeier working in the product management team at Thomas-Krenn, completed his bachelor's degree in business informatics at the Deggendorf University of Applied Sciences. Since 2013 Thomas is employed at Thomas-Krenn and takes care of OPNsense firewalls, the Thomas-Krenn-Wiki and firmware security updates.


Related articles

OPNsense LTE connection
OPNsense OpenVPN performance tests and results
OPNsense WireGuard VPN Site-to-Site configuration