WireGuard on OPNsese: wg0 is not a WireGuard interface

Achtung! Dieser Artikel ist älter als ein Jahr. Der Inhalt ist möglicherweise nicht mehr aktuell!

My WireGuard on OPNsense 22.1 suddenly stopped working out of nowhere and would not restart:

root@firewall:~ # /usr/local/etc/rc.d/wireguard restart
wg-quick: ‘wg0’ is not a WireGuard interface
wg-quick: ‘wg0’ already exists

Checking the wg0 interface via ifconfig told me that was a lie:

root@firewall:~ # ifconfig wg0
wg0: flags=8002<BROADCAST,MULTICAST> metric 0 mtu 1420
options=80000
groups: tun wireguard
nd6 options=103<PERFORMNUD,ACCEPT_RTADV,NO_DAD>

A hanging interface is thankfully not new to me. I’ve dealt with many of them before when I was still OpenVPN. Simple solution: Destroying the interface:

root@firewall:~ # ifconfig wg0 destroy

After a newly issued restart command of the WireGuard service it should be up and running again.


Du hast einen Kommentar, einen Wunsch oder eine Verbesserung? Schreib mir doch eine E-Mail! Die Infos dazu stehen hier.

🖇️ = Link zu anderer Webseite
🔐 = Webseite nutzt HTTPS (verschlüsselter Transportweg)
Zurück