I have a VM with FreeBSD 13-STABLE where is disabled IPv6 because I don't need it. When I'm trying to start wireguard I'm getting:
# service wireguard start
[#] wireguard-go wg0
ERROR: (wg0) 2021/02/27 11:22:48 Failed to create TUN device: address family not supported by protocol family
[#] rm -f /var/run/wireguard/wg0.sock
netstat: inet6: unknown address family
Address = 192.168.222.1/32
PrivateKey = <key>
ListenPort = 51820
PublicKey = <key>
AllowedIPs = 192.168.222.2/32
Installed from ports:
Wireguard need to have possibility to work without IPv6 enabled.
Feel free to send patches for this but I won't spend any time on it. Hey it's 2021 and IPv6 is here to stay.
Quite soon you will be able to use the wireguard kernel implementation in FreeBSD 13.0 that might also work fine with IPv4 only.