Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot find device wg0 | RNETLINK answers: Operation not permitted #19

Open
nicedevil007 opened this issue Jul 29, 2020 · 1 comment
Open

Comments

@nicedevil007
Copy link

heya,

I recently tried to setup your docker container and wasn't able to get it up and running.

Warning: `/etc/wireguard/wg0.conf' is world accessible,
[#] ip link add wg0 type wireguard,
RTNETLINK answers: Operation not permitted,
[!] Missing WireGuard kernel module. Falling back to slow userspace implementation.,
[#] wireguard-go wg0,
WARNING WARNING WARNING WARNING WARNING WARNING WARNING,
W                                                     G,
W   You are running this software on a Linux kernel,  G,
W   which is probably unnecessary and misguided. This G,
W   is because the Linux kernel has built-in first    G,
W   class support for WireGuard, and this support is  G,
W   much more refined than this slower userspace      G,
W   implementation. For more information on           G,
W   installing the kernel module, please visit:       G,
W           https://www.wireguard.com/install         G,
W                                                     G,
WARNING WARNING WARNING WARNING WARNING WARNING WARNING,
INFO: (wg0) 2020/07/29 07:18:00 Starting wireguard-go version 0.0.20200320,
ERROR: (wg0) 2020/07/29 07:18:00 Failed to create TUN device: operation not permitted,
Unable to access interface: Operation not permitted,
[#] ip link delete dev wg0,
Cannot find device "wg0",

my kernel is:

root@DietPi:~# uname -a
Linux DietPi 5.4.51-v7l+ #1328 SMP Mon Jul 27 16:57:05 BST 2020 armv7l GNU/Linux

and the kernel headers are installed.

Then I followed your guide to create the config file and the 2 keys. Placed all 3 of them in a docker volume and created my stack file.

version: '3.7'

volumes:
  config:

services:
  app:
    image: masipcat/wireguard-go:latest
    cap_add:
     - NET_ADMIN
    sysctls:
     - net.ipv4.ip_forward=1
    volumes:
     - /dev/net/tun:/dev/net/tun
     - config:/etc/wireguard
    environment:
     - WG_COLOR_MODE=always
     - LOG_LEVEL=info
    ports:
     - 51820:51820/udp
    # Uncomment the following line when 'AllowedIPs' is '0.0.0.0/0'
    # privileged: true
    restart: always

What is going wrong here?

@josh1703658784
Copy link

Hi @nicedevil007 - did you happen to resolve this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants