This is an attempt to port the original WireGuard UI bits as implemented by Netgate in pfSense 2.5.0 to a package suitable for sideloading and more frequent updating on future releases of pfSense.
This also includes some improvments such as a proper status page (Status>WireGuard Status) and improved assigned interface handling.
Under the hood, this implementation relies on wg-quick(8)
for interacting with WireGuard.
XML configuration bits have been moved from wireguard/tunnel
to installedpackages/wireguard/tunnel
Note: I'm currently developing directly in the main branch. I know this is bad practice. Please ignore the mess.
Developed on pfSense 2.6.0-DEVELOPMENT snapshots.
DO NOT INSTALL ON pfSense 2.5.0.
The build process is similar to that of other FreeBSD and pfSense packages. You will need to set up a FreeBSD build environment and install or build wireguard
and wireguard-kmod
on it. Please check the pfSense package development documentation for more information.
wireguard-kmod
requires headers found in the kernel source and header files in SRC_BASE=/usr/src
. Here is one solution:
for 12.2-RELEASE , amd64
cd /tmp
fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/12.2-RELEASE/src.txz
tar -C / -zxvf src.txz
rm /tmp/src.txz
This package depends on the wireguard-tools
and wireguard-kmod
ports for FreeBSD. Download or build these packages for that version of FreeBSD, then manually install them using pkg
before installing this package.
Look for latest package links of wireguard-tools
and wireguard-kmod
in FreeBSD 12 repository.
NOTE: As of 4/6/2021, wireguard-kmod
is not being actively built by FreshPorts. You will probably have to build these packages manually.
You can find pre-compiled binaries and packages here.
https://docs.netgate.com/pfsense/en/latest/vpn/wireguard/index.html