Jump to content


Photo

OpenVPN error


  • Please log in to reply
61 replies to this topic

#1 doglover

  • Rytec EPG Team
  • 16,974 posts

+635
Excellent

Posted 26 August 2018 - 15:59

I needed to install OpenVPN for some reason.

But discovered an error.

 

When running OpenVPN I got the error:

ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)
Exiting due to fatal error

Some googling further I found this:  https://github.com/t...ker/issues/1011
 

 

As noted on the forums the Proxmox container build of OpenVPN doesn't play nice and it seems that the reason is that it doesn't have a /dev/tun device by default. It seems that one can be created easily using an init script, as noted on the Proxmox forums.

 

 

Extracted the code for just solving the problem:

mkdir /dev/net
mknod /dev/net/tun c 10 200
chmod 666 /dev/net/tun

and added these to my own script.  Now OpenVPN works.

However the solution does not stick.  Upon a restart you need to create the tun device again.

 

Can some-one solve the problem of not creating the tun device in the opkg package pls.

 

Willy


Edited by doglover, 26 August 2018 - 16:01.

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: OpenVPN error #2 WanWizard

  • PLi® Core member
  • 68,303 posts

+1,718
Excellent

Posted 27 August 2018 - 12:53

OpenPLi 6.2?

 

I have used OpenVPN on several boxes, and haven't seen this issue. Remind me next week when I can test again... 


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: OpenVPN error #3 doglover

  • Rytec EPG Team
  • 16,974 posts

+635
Excellent

Posted 27 August 2018 - 15:06

Yes, OpenPLi 6.2 on a Mutant HD2400.

The problem is solved for now, with the above mentioned "fix". 

But when reinstalling, the problem arises again, and then I have to invent the wheel again.

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: OpenVPN error #4 littlesat

  • PLi® Core member
  • 56,123 posts

+685
Excellent

Posted 27 August 2018 - 15:26

I also never saw this issue...


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: OpenVPN error #5 WanWizard

  • PLi® Core member
  • 68,303 posts

+1,718
Excellent

Posted 27 August 2018 - 15:45

Sounds more like kernel-module-tun is not installed as a dependency? I thought I'd fixed that.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: OpenVPN error #6 doglover

  • Rytec EPG Team
  • 16,974 posts

+635
Excellent

Posted 27 August 2018 - 15:55

Well the OpenPLi is from june 2018.  Maybe you fixed that later?

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: OpenVPN error #7 doglover

  • Rytec EPG Team
  • 16,974 posts

+635
Excellent

Posted 27 August 2018 - 15:57

I also never saw this issue...

 

And I am a liar, and do know not anything.....  And you all knowing.  Almost God is it not.

I am just reporting what I saw, and fixed it myself.

 

Willy

 

PS:  Yes, I am pissed


Edited by doglover, 27 August 2018 - 16:04.

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: OpenVPN error #8 Pr2

  • PLi® Contributor
  • 6,046 posts

+256
Excellent

Posted 27 August 2018 - 16:33

Hi,
 
I just make a test on my Solo4K without installing OpenVPN the tun kernel module is not installed.

modinfo tun

But it is installed with OpenVPN installation.

 
Pr2


NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: OpenVPN error #9 WanWizard

  • PLi® Core member
  • 68,303 posts

+1,718
Excellent

Posted 27 August 2018 - 17:06

Ok, so that isn't the problem.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: OpenVPN error #10 doglover

  • Rytec EPG Team
  • 16,974 posts

+635
Excellent

Posted 27 August 2018 - 17:09

Well on  the HD2400 installing OpenVPN 2 days ago, did not install the kernel module tun.....

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: OpenVPN error #11 WanWizard

  • PLi® Core member
  • 68,303 posts

+1,718
Excellent

Posted 27 August 2018 - 17:23

According to the defconfig, it is a separate module on the HD2400 too, so that's odd.

 

The last openvpn mipsel package build (in OpenPLi 6,2) was on May 8th, and that has kernel-module-tun listed as recommends, so that should work without problems. Maybe a download issue?


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: OpenVPN error #12 doglover

  • Rytec EPG Team
  • 16,974 posts

+635
Excellent

Posted 27 August 2018 - 18:14

Installed OpenVPN on my Zgemma Star S just for checking:

Merk & model:  Zgemma Star series
Chipset:  Broadcom 7358
Totaal geheugen:  149472 kB vrij / 233756 kB totaal
Box Uptime:  0:04
Software
Systeem OE:  PLi-OE
Firmware versie:  OpenPLi 6.2-release (2018-06-01-release-6.2)
Kernel versie / stuurprogramma datum:  4.10.12 / 4.10.12-20180411-r0.1
root@sh1:~# opkg update
Downloading http://downloads.openpli.org/feeds/openpli-6-release/3rd-party/Packages.gz.
Updated source 'openpli-3rd-party'.
Downloading http://downloads.openpli.org/feeds/openpli-6-release/3rd-party-sh1/Packages.gz.
Updated source 'openpli-3rd-party-sh1'.
Downloading http://downloads.openpli.org/feeds/openpli-6-release/all/Packages.gz.
Updated source 'openpli-all'.
Downloading http://downloads.openpli.org/feeds/openpli-6-release/mips32el-nf/Packages.gz.
Updated source 'openpli-mips32el-nf'.
Downloading http://downloads.openpli.org/feeds/openpli-6-release/sh1/Packages.gz.
Updated source 'openpli-sh1'.
root@sh1:~# opkg install openvpn
Installing liblzo2-2 (2.09) on root.
Downloading http://downloads.openpli.org/feeds/openpli-6-release/mips32el-nf/liblzo2-2_2.09-r0.2_mips32el-nf.ipk.
Installing kernel-module-tun (4.10.12) on root.
Downloading http://downloads.openpli.org/feeds/openpli-6-release/sh1/kernel-module-tun_4.10.12-.1.1_sh1.ipk.
Installing openvpn (2.3.9) on root.
Downloading http://downloads.openpli.org/feeds/openpli-6-release/mips32el-nf/openvpn_2.3.9-r0.0_mips32el-nf.ipk.
Removing any system startup links for openvpn ...
Configuring liblzo2-2.
Configuring kernel-module-tun.
Configuring openvpn.
Adding system startup for /etc/init.d/openvpn.
root@sh1:~#

kernel-module-tun seems to be present.

But then.

 

 

Reboot, and  (password and User editted out)

root@sh1:~# openvpn --config /home/root/client_willy.ovpn
Mon Aug 27 19:03:37 2018 OpenVPN 2.3.9 mipsel-oe-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on May  9 2018
Mon Aug 27 19:03:37 2018 library versions: OpenSSL 1.0.2j  26 Sep 2016, LZO 2.09
Enter Auth Username:
Enter Auth Password:
Mon Aug 27 19:03:46 2018 Socket Buffers: R=[87380->87380] S=[16384->16384]
Mon Aug 27 19:03:46 2018 Attempting to establish TCP connection with [AF_INET]81.83.2.63:443 [nonblock]
Mon Aug 27 19:03:47 2018 TCP connection established with [AF_INET]x.x.x.x:443
Mon Aug 27 19:03:47 2018 TCPv4_CLIENT link local: [undef]
Mon Aug 27 19:03:47 2018 TCPv4_CLIENT link remote: [AF_INET]x.x.x.x:443
Mon Aug 27 19:03:47 2018 TLS: Initial packet from [AF_INET]x.x.x.x:443, sid=8f28fc4c 4fb5a6cf
Mon Aug 27 19:03:47 2018 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Mon Aug 27 19:03:47 2018 VERIFY OK: depth=1, O=WatchGuard_Technologies, OU=Fireware, CN=Fireware SSLVPN (SN 80DE078CAF904 2017-01-26 12:41:11 GMT) CA
Mon Aug 27 19:03:47 2018 Validating certificate extended key usage
Mon Aug 27 19:03:47 2018 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Mon Aug 27 19:03:47 2018 VERIFY EKU OK
Mon Aug 27 19:03:47 2018 VERIFY OK: depth=0, O=WatchGuard_Technologies, OU=Fireware, CN=Fireware SSLVPN Server
Mon Aug 27 19:03:48 2018 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Mon Aug 27 19:03:48 2018 Data Channel Encrypt: Using 256 bit message hash 'SHA256' for HMAC authentication
Mon Aug 27 19:03:48 2018 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Mon Aug 27 19:03:48 2018 Data Channel Decrypt: Using 256 bit message hash 'SHA256' for HMAC authentication
Mon Aug 27 19:03:48 2018 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Mon Aug 27 19:03:48 2018 [Fireware SSLVPN Server] Peer Connection Initiated with [AF_INET]x.x.x.x:443
Mon Aug 27 19:03:50 2018 SENT CONTROL [Fireware SSLVPN Server]: 'PUSH_REQUEST' (status=1)
Mon Aug 27 19:03:50 2018 PUSH: Received control message: 'PUSH_REPLY,route 192.168.1.0 255.255.255.0,route 192.168.3.0 255.255.255.0,route 188.111.115.190 255.255.255.255,dhcp-option DNS 192.168.1.6,route-gateway 192.168.113.1,topology subnet,ping 10,ping-restart 60,ifconfig 192.168.113.3 255.255.255.0,peer-id 0'
Mon Aug 27 19:03:50 2018 OPTIONS IMPORT: timers and/or timeouts modified
Mon Aug 27 19:03:50 2018 OPTIONS IMPORT: --ifconfig/up options modified
Mon Aug 27 19:03:50 2018 OPTIONS IMPORT: route options modified
Mon Aug 27 19:03:50 2018 OPTIONS IMPORT: route-related options modified
Mon Aug 27 19:03:50 2018 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Mon Aug 27 19:03:50 2018 OPTIONS IMPORT: peer-id set
Mon Aug 27 19:03:50 2018 OPTIONS IMPORT: adjusting link_mtu to 1574
Mon Aug 27 19:03:50 2018 ROUTE_GATEWAY 192.168.178.1/255.255.255.0 IFACE=eth0 HWADDR=00:15:c0:36:95:6d
Mon Aug 27 19:03:50 2018 ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)
Mon Aug 27 19:03:50 2018 Exiting due to fatal error
root@sh1:~#

ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)

 

 

Applying the fix from: https://github.com/t...ker/issues/1011

And a working VPN.  Nothing to it.

 

But, There is a need for the application of the fix.

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: OpenVPN error #13 WanWizard

  • PLi® Core member
  • 68,303 posts

+1,718
Excellent

Posted 27 August 2018 - 19:17

Clear. 

 

Still weird though, the driver should create the device node upon load.

 

Manually, it should be

mkdir /dev/net 
mknod /dev/net/tun c 10 200 

Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: OpenVPN error #14 Pr2

  • PLi® Contributor
  • 6,046 posts

+256
Excellent

Posted 27 August 2018 - 19:48

I didn't launch OpenVPN just install it but I confirm that:

 

/dev/net/

 

doesn't exist on the Solo4K, so perhaps that the driver tries to create the /dev/net/tun only but since /dev/net/ doesn't exist.

 

But according to this:

 

https://www.kernel.o...king/tuntap.txt

 

They need to be created manually.

 

Pr2


NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: OpenVPN error #15 WanWizard

  • PLi® Core member
  • 68,303 posts

+1,718
Excellent

Posted 27 August 2018 - 20:01

That means a ticket, can't do anything about it now. ;)


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: OpenVPN error #16 Pr2

  • PLi® Contributor
  • 6,046 posts

+256
Excellent

Posted 28 August 2018 - 08:08

Ticket created:  https://devtools.ope....org/issues/357


NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: OpenVPN error #17 Erik Slagter

  • PLi® Core member
  • 46,951 posts

+541
Excellent

Posted 31 August 2018 - 17:14

It might be an mdev vs. udev issue. Which of them do you have installed? Default is mdev, but some packages require udev and replace mdev with it. Udev and mdev are different in how they create device nodes in subtile ways. It may be that node is created in another subdirectory.


Edited by Erik Slagter, 31 August 2018 - 17:14.

* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: OpenVPN error #18 WanWizard

  • PLi® Core member
  • 68,303 posts

+1,718
Excellent

Posted 31 August 2018 - 17:59

The problem is a lack of modprobe:

root@vusolo4k:~# opkg install kernel-module-tun
Installing kernel-module-tun-3.14.28-1.8 (3.14.28) on root.
Downloading http://garden.openpli.org/feeds/openpli-develop/vusolo4k/kernel-module-tun-3.14.28-1.8_3.14.28-r1.3.2.6_vusolo4k.ipk.
Configuring kernel-module-tun-3.14.28-1.8.

root@vusolo4k:~# ls -l /dev/n
network_latency     network_throughput  nexus               null                

root@vusolo4k:~# lsmod
Module                  Size  Used by
bluetooth             308974  4
6lowpan_iphc            9766  1 bluetooth
ipv6                  266509  67
brcmfb                  1483  2
dvb_bcm7376          2368227  2 brcmfb
dvb_base             6311169  5 dvb_bcm7376
bcm_event               2903  5 dvb_bcm7376
procmk                  1682  2 dvb_bcm7376,bcm_event
rt2800usb              16997  0
rt2800lib              70041  1 rt2800usb
rt2x00usb               7806  1 rt2800usb
rt2x00lib              34113  3 rt2x00usb,rt2800lib,rt2800usb
led_class               2797  1 rt2x00lib
mac80211              257199  3 rt2x00lib,rt2x00usb,rt2800lib

root@vusolo4k:~# modprobe tun

root@vusolo4k:~# lsmod
Module                  Size  Used by
tun                    18009  0
bluetooth             308974  4
6lowpan_iphc            9766  1 bluetooth
ipv6                  266509  67
brcmfb                  1483  2
dvb_bcm7376          2368227  2 brcmfb
dvb_base             6311169  5 dvb_bcm7376
bcm_event               2903  5 dvb_bcm7376
procmk                  1682  2 dvb_bcm7376,bcm_event
rt2800usb              16997  0
rt2800lib              70041  1 rt2800usb
rt2x00usb               7806  1 rt2800usb
rt2x00lib              34113  3 rt2x00usb,rt2800lib,rt2800usb
led_class               2797  1 rt2x00lib
mac80211              257199  3 rt2x00lib,rt2x00usb,rt2800lib

root@vusolo4k:~# ls -l /dev/n
net/                network_latency     network_throughput  nexus               null                

root@vusolo4k:~# ls -l /dev/net/tun 
crw-rw----    1 root     root       10, 200 Aug 31 17:57 /dev/net/tun

Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: OpenVPN error #19 doglover

  • Rytec EPG Team
  • 16,974 posts

+635
Excellent

Posted 1 September 2018 - 07:03

It might be an mdev vs. udev issue. Which of them do you have installed? Default is mdev, but some packages require udev and replace mdev with it. Udev and mdev are different in how they create device nodes in subtile ways. It may be that node is created in another subdirectory.

 

I have no idea.  Just installed the bog standard OPenPLi 6.2 and few plug-ins.

Did not find any tun device without the fix.

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: OpenVPN error #20 Erik Slagter

  • PLi® Core member
  • 46,951 posts

+541
Excellent

Posted 1 September 2018 - 08:26

According to Wanwizard it's some strange issue with autoloading the modules, not the actual creation of the device nodes. So let's see what he comes up with. In the meantime you can work around the issue by loading the tun module by hand (modprobe tun).


Edited by Erik Slagter, 1 September 2018 - 08:26.

* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users