Solved How to enable Wireguard user-mode (wireguard-go) and remove kernel implementation on FreeBSD12.2 or 13.0 STABLE

I am trying to use wireguard-go userspace implementation except kernel module (if_wg.ko).


remember:


Security vulnerabilities were found when enabling Jumbo frames.

Netgate host of the pfSense open source firewall project also decided to remove kernel-mode WireGuard.


when using the user-mode version of WireGuard (wireguard-go).

It’s a little less performant than the kernel-mode, but it’s stable




so i tried myself this:



removed >> wireguard: 2,1

installed >> wireguard: 1.0.20200827



Code:
Installed packages to be REMOVED:

    wireguard-tools: 1.0.20210424


New packages to be INSTALLED:

    wireguard: 1.0.20200827


i have wg0.conf in this directory : /usr/local/etc/wireguard/

But when i tried bring up wg tunnel it stuck at setconf operation seen below


Code:
root@alfa:~ # wg-quick up wg0

[#] wireguard-go wg0

┌──────────────────────────────────────────────────────┐

│                                                      │

│   Running wireguard-go is not required because this  │

│   kernel has first class support for WireGuard. For  │

│   information on installing the kernel module,       │

│   please visit:                                      │

│         https://www.wireguard.com/install/           │

│                                                      │

└──────────────────────────────────────────────────────┘

[#] wg setconf wg0 /tmp/tmp.ZI5AWm9l/sh-np.RHcEmK


also manually tried and still stucking setconf operation.


wg setconf wg0 /usr/local/etc/wireguard/wg0.conf


any help would be appreciated at this point... ?‍♂️
 
Here is the solution:

1) remove kernel implementation :
pkg remove net/wireguard-kmod

2) install go user-mod implementation
pkg install net/wireguard-go

now everything works correctly
 
Back
Top