TrueNAS Core Wireguard error with iptables

AuburnJamJoe

Cadet
Joined
Mar 28, 2023
Messages
4
I’m attempting to setup WireGuard on a relatively fresh install of TrueNAS Core 13.0 and following these instructions: https://www.truenas.com/docs/core/coretutorials/network/wireguard/

Nothing was working, so I tried running the commands individually in shell and when I try to start WireGuard I get the following:
root@croydon[~]# /usr/local/etc/rc.d/wireguard start
[#] ifconfig wg create name wg0
[#] wg setconf wg0 /dev/stdin
[#] ifconfig wg0 inet 10.0.0.1/24 alias
[#] ifconfig wg0 mtu 1420
[#] ifconfig wg0 up
[#] route -q -n add -inet 10.0.0.5/32 -interface wg0
[#] route -q -n add -inet 10.0.0.4/32 -interface wg0
[#] route -q -n add -inet 10.0.0.3/32 -interface wg0
[#] route -q -n add -inet 10.0.0.2/32 -interface wg0
[+] Backgrounding route monitor
[#] iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o wg0-j MASQUERADE
/use/local/bin/WB-quick: line 386: iptables: command not found
[#] ifconfig wg0 destroy

Which looks to me like the service is starting, then when it can’t find the command iptables it kills the interface?

I expect I’m missing something really straightforward, but any help would be much appreciated!
 
Top