Enabling WireGuard
2 minute read.
Last Modified 2022-09-13 11:01 -0400WireGuard is a popular option in the VPN marketplace. It is fast, simple, and uses modern cryptography standards. It is possible to connect your NAS to a WireGuard network in a few easy steps. Systems running FreeNAS version 11.3-RC1 through TrueNAS 13.0 have WireGuard capability.
Go to System > Tunables > Add and use these settings to enable the service:
- Variable = wireguard_enable
- Value = YES
- Type = rc.conf
Next, create another tunable to define the networking interface:
- Variable = wireguard_interfaces
- Value = wg0
- Type = rc.conf
When finished, TrueNAS sets and enables the two variables.
Next, create a post-init script. This places the WireGuard config in the correct location at startup.
Go to Tasks > Init/Shutdown Scripts and click Add.
Configure the script to load the WireGuard
- Type = Command
- Command =
mkdir -p /usr/local/etc/wireguard && cp /root/wg0.conf /usr/local/etc/wireguard/wg0.conf && /usr/local/etc/rc.d/wireguard start
- When = Post Init
You can configure the
- Access data on a NAS from your Remote Laptop
- Linking NAS to NAS for replication
- Attaching a managed NAS to a remote network
- Access to your NAS from your smartphone
Now create the
There are quickstart guides and tutorials available online as well as the built-in wg-quick manpage.
Determine that you have a valid ifconfig
.