unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* openvpn ERROR: Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1
@ 2021-10-13  2:36 Jovany Leandro G.C
  2021-10-13 10:51 ` Jelle Licht
  0 siblings, 1 reply; 3+ messages in thread
From: Jovany Leandro G.C @ 2021-10-13  2:36 UTC (permalink / raw)
  To: help-guix

hi, 
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
~~~

thanks any help
-- 
Jovany Leandro G.C
Desarrollador Software Libre
Cel: (57) 3165387562
Git: https://gitlab.com/bit4bit
Fossil: http://efossils.bit4bit.in
E-Sitio: http://www.bit4bit.in


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: openvpn ERROR: Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1
  2021-10-13  2:36 openvpn ERROR: Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1 Jovany Leandro G.C
@ 2021-10-13 10:51 ` Jelle Licht
  2021-10-13 14:31   ` Jovany Leandro G.C
  0 siblings, 1 reply; 3+ messages in thread
From: Jelle Licht @ 2021-10-13 10:51 UTC (permalink / raw)
  To: Jovany Leandro G.C, help-guix

Hello Jovany,

"Jovany Leandro G.C" <bit4bit@riseup.net> writes:

> hi, 
> 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
times.

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 [1]

> thanks any help
> -- 
> Jovany Leandro G.C

HTH!
 - Jelle

[1] http://guix.gnu.org/manual/en/html_node/Networking-Services.html#index-network_002dmanager_002dservice_002dtype


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: openvpn ERROR: Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1
  2021-10-13 10:51 ` Jelle Licht
@ 2021-10-13 14:31   ` Jovany Leandro G.C
  0 siblings, 0 replies; 3+ messages in thread
From: Jovany Leandro G.C @ 2021-10-13 14:31 UTC (permalink / raw)
  To: Jelle Licht; +Cc: help-guix

On 2021-10-13 10:51, Jelle Licht wrote:
> Hello Jovany,
> 
> "Jovany Leandro G.C" <bit4bit@riseup.net> writes:
> 
>> hi,
>> 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
> times.
> 
> 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 [1]
> 
>> thanks any help
>> --
>> Jovany Leandro G.C
> 
> HTH!
>  - Jelle
> 
> [1] http://guix.gnu.org/manual/en/html_node/Networking-Services.html#index-network_002dmanager_002dservice_002dtype

thanks,

using sudo works!

i try network-manager-openvpn when i add the file .ovpn 
popup "Insufficient Privileges",

config.scm
~~~
(supplementary-groups '("wheel" "netdev" "dialout"
                        "audio" "video" "docker"))
....
(services (append (list (set-xorg-configuration
			 (xorg-configuration
			  (keyboard-layout keyboard-layout)))
			(service docker-service-type))
		  
		  (modify-services %desktop-services
				   (network-manager-service-type config =>
					                         (network-manager-configuration
						                  (vpn-plugins (list network-manager-openvpn))))
			           )))
~~~

thanks any help

-- 
Jovany Leandro G.C
Desarrollador Software Libre
Cel: (57) 3165387562
Git: https://gitlab.com/bit4bit
Fossil: http://efossils.bit4bit.in
E-Sitio: http://www.bit4bit.in


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-13 14:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13  2:36 openvpn ERROR: Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1 Jovany Leandro G.C
2021-10-13 10:51 ` Jelle Licht
2021-10-13 14:31   ` Jovany Leandro G.C

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).