Resource icon

How-To: Setup a Wireguard VPN Server in a Jail

Works perfectly first time and so simple!
Great guide. It works perfectly. I use it on iOS when I'm out.
Super easy to follow, much quicker and better than trying to setup OpenVPN (even through the GUI). Thanks a million.
Absolutely marvelous ! Nice How-To.
Great guide
Thank you great guide and works perfectly

A few things that took me a minute to realize:
- The "allow tun" checkbox is under "custom properties" now
- When port forwarding you use the WAN IP of the TrueNAS server (I am normally used to using the WAN IP of a particular jail or VM)
Worked on the second try. When I noticed, there's a wg.public and a wg.private key. And a remote.public and a remote.private. And one of each is used in the local server configuration, while the other is used for the remote configuration.

So clearly marking the difference would make sense I think, it's easy to gloss over (public and private are not too dissimilar words, start with p, similar length).

Another thing that would maybe be useful is to present the allowed IPs option. If I understand correctly setting it to "AllowedIPs = 192.168.0.0/24" will only tunnel requests to connect to IPs from 192.168.0.0 to 192.168.0.255 and so on. Makes it useful to tunnel to your local network for file access and the like.

Four stars are there only because I'm a bit angry (at myself) for missing that key detail. Otherwise it's a simple and good guide.
Top