Enabling WireGuard
2 minute read.
Last Modified 2022-05-13 13:10 EDTWireGuard is a popular option in the VPN marketplace due to its speed, simplicity, and modern cryptography standards. Starting with FreeNAS version 11.3-RC1 and continuing through TrueNAS 12.0, it is possible to connect your NAS directly to a WireGuard network with a few easy steps.
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 that 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.
After you have a valid ifconfig
.