Reputation: 91
I have an Ubuntu docker container with openvpn
installed, and a config.ovpn
file.
I try doing:
openvpn --config config.ovpn
and get the following error:
ERROR: Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1)
Some googling seems to suggest that this is because of not running with sudo
but does root
not already have sudo
permissions? (For what it's worth - running sudo openvpn
makes no difference).
Upvotes: 4
Views: 2078
Reputation: 356
You can simply add the right capacity to the container by giving the --cap-add NET_ADMIN
parameter to docker run
.
Upvotes: 2