I have a little problem with a newly created docker-container (wireguard).
I created a wireguard-container and Inow want to start the wireguard-server with the command
“wg-quick up wg0”.
If I try to execute the command above I get the following error message:
"RTNETLINK answers: Operation not permitted
Unable to access interface: Operation not permitted
[#] ip link delete dev wg0
Cannot find device “wg0”
I think I have to apoligize, since the description is not clear. I just saw the example at the end of the description but that is for running the container in site to site VPN mode. The error message still indicates that the container is trying to manage networks which requires either using a privileged container or NET_ADMIN capability. The site-to-site VPN mode also requires the SYS_MODULE capability according to the description. Try NET_ADMIN first.
I just solved the problem with the message “RTNETLINK answers: Operation not permitted”.
You already mentioned the right hints ;).
I had to add the capabilities “NET_ADMIN” and “SYS_MODULE” and I had to set some environment variables in the configuration of the wireguard-container. Now it is working and I can establish a vpn-connection to the wireguard-server without problems.
This was my first docker-installation. Because of that I needed some help to get it running ;).