NHAS / wag

Simple Wireguard 2FA
BSD 3-Clause "New" or "Revised" License
499 stars 27 forks source link

unable to start router: could not attach XDP program: bpf_link not supported #42

Closed cheegui closed 1 year ago

cheegui commented 1 year ago

Hi All

When we start the wag service, we got this: root@server015:/opt/wag# systemctl status wag ? wag.service - Wireguard Manager Loaded: loaded (/etc/systemd/system/wag.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Thu 2023-04-20 03:50:04 PDT; 5s ago Process: 345636 ExecStart=/opt/wag/wag start (code=exited, status=1/FAILURE) Process: 345678 ExecStopPost=/opt/wag/wag cleanup (code=exited, status=1/FAILURE) Main PID: 345636 (code=exited, status=1/FAILURE) root@server015:/opt/wag#

root@server015:/opt/wag# journalctl -u wag Apr 20 03:58:39 pa015 systemd[1]: Started Wireguard Manager. Apr 20 03:58:39 pa015 wag[349530]: 2023/04/20 03:58:39 Removing Firewall rules... Apr 20 03:58:39 pa015 wag[349530]: 2023/04/20 03:58:39 unable to start router: could not attach XDP program: bpf_link not supported (> Apr 20 03:58:39 pa015 systemd[1]: wag.service: Main process exited, code=exited, status=1/FAILURE Apr 20 03:58:39 pa015 wag[349572]: 2023/04/20 03:58:39 Cleaning up Apr 20 03:58:39 pa015 wag[349572]: 2023/04/20 03:58:39 Removing Firewall rules... Apr 20 03:58:39 pa015 wag[349572]: 2023/04/20 03:58:39 Unable to clean up firewall rules: running [/usr/sbin/iptables -t filter -D F> Apr 20 03:58:39 pa015 wag[349572]: 2023/04/20 03:58:39 Unable to clean up firewall rules: running [/usr/sbin/iptables -t filter -D F>

We are running Wag and Wireguard on Ubuntu 20.04.1. Thank you very much in anticipation.

cheegui commented 1 year ago

Okay our mistake.
Ubuntu 20.04 is only 5.4.0-146-generic kernel. In the Limitations section: Very Modern kernel 5.9+ at least (>5.9 allows loops in ebpf and bpf_link)

NHAS commented 1 year ago

Yep thats correct. I use Ubuntu 22.04.2 LTS in our deployment, others have used alpine (but then you need to install glibc)