[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: openvpn ERROR: Cannot ioctl TUNSETIFF tun: Operation not permitted (
Re: openvpn ERROR: Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1
Wed, 13 Oct 2021 12:51:31 +0200
"Jovany Leandro G.C" <email@example.com> writes:
> when i run **openvpn myfile.ovpn**, throws:
> 2021-10-12 21:20:26 OpenVPN 2.5.4 x86_64-unknown-linux-gnu [SSL
> (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Jan 1 1970
> 2021-10-12 21:25:13 ERROR: Cannot ioctl TUNSETIFF tun: Operation not
> permitted (errno=1)
> 2021-10-12 21:25:13 Exiting due to fatal error
Note that I am by no means an OpenVPN expert, I have just used it a few
For its normal operations, OpenVPN clients need a TUN/TAP device; AFAIK
creating such devices require running with root permissions.
You have several options here.
The easiest 'fix' is to simply run `sudo openvpn myfile.ovpn`;
everything should work, with always-on root privileges though.
Run `sudo openvpn --user <youruser> --group <yourgroup> myfile.ovpn',
which uses root privileges to set up things and then drops these
privileges. If your connection gets interrupted, you might need to
manually restart the command to set things up properly again.
If you use Network Manager; there is a plugin for managing OpenVPN
connections. In Guix this has been packaged as
`network-manager-openvpn', and can be added to your operating system
declaration if you run Guix System 
> thanks any help
> Jovany Leandro G.C