Openvpn connection problem

Post Reply
OdroidCelt
Posts: 15
Joined: Mon Apr 13, 2020 1:43 am
languages_spoken: english, italian
ODROIDs: N2
Has thanked: 2 times
Been thanked: 3 times
Contact:

Openvpn connection problem

Post by OdroidCelt »

Hi, after my last software update of Ubuntu on my odroid n2, Im not able to connect to my pia vpn service through openvpn.
Before the update it connected correctly.
Ive got following error:

Code: Select all

Thu Jul 23 19:35:36 2020 ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)
Inside /dev I dont have /net/tun folder. I tried to find how to install tun but I dont know how to install it.
Can someone please can help me to solve this problem?
thank you

mad_ady
Posts: 8316
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 573 times
Been thanked: 434 times
Contact:

Re: Openvpn connection problem

Post by mad_ady »

What kernel version are you running? Kernel needs to have tun built-in or a module

OdroidCelt
Posts: 15
Joined: Mon Apr 13, 2020 1:43 am
languages_spoken: english, italian
ODROIDs: N2
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: Openvpn connection problem

Post by OdroidCelt »

kernel 4.9.219-72

OdroidCelt
Posts: 15
Joined: Mon Apr 13, 2020 1:43 am
languages_spoken: english, italian
ODROIDs: N2
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: Openvpn connection problem

Post by OdroidCelt »

Ive searched and found tun folder on following location
/media/usb0/lib/modules/4.9.230-73/build/include/config

I try to explain what happened. When I made system upgrade, after rebooting system didnt start, black screen and no blue led, only red led.
So I solved by flashing back my previous "boot" backup image.
This solved my boot problem but maybe created new ones.
Sorry but as you understand Im not a linux expert for sure!
Hope someone could help me.
Than you

User avatar
rooted
Posts: 7875
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 724 times
Been thanked: 222 times
Contact:

Re: Openvpn connection problem

Post by rooted »

Try:

Code: Select all

sudo modprobe tun 

OdroidCelt
Posts: 15
Joined: Mon Apr 13, 2020 1:43 am
languages_spoken: english, italian
ODROIDs: N2
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: Openvpn connection problem

Post by OdroidCelt »

Code: Select all

odroid@odroid:~$ sudo modprobe tun
modprobe: FATAL: Module tun not found in directory /lib/modules/4.9.219-72
for sure I made mistakes by flashing my previous boot image.
Inside /modules Ive /4.9.230-73 folder
How to adjust this problem?
thank you

User avatar
rooted
Posts: 7875
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 724 times
Been thanked: 222 times
Contact:

Re: Openvpn connection problem

Post by rooted »

Run this and show me the output:

Code: Select all

zcat /proc/config.gz | grep TUN
These users thanked the author rooted for the post:
OdroidCelt (Fri Jul 24, 2020 7:54 pm)

OdroidCelt
Posts: 15
Joined: Mon Apr 13, 2020 1:43 am
languages_spoken: english, italian
ODROIDs: N2
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: Openvpn connection problem

Post by OdroidCelt »

rooted wrote:
Fri Jul 24, 2020 6:06 am
Run this and show me the output:

Code: Select all

zcat /proc/config.gz | grep TUN

Code: Select all

odroid@odroid:~$ zcat /proc/config.gz | grep TUN
# CONFIG_CGROUP_SCHEDTUNE is not set
CONFIG_SCHED_TUNE=y
CONFIG_NET_IP_TUNNEL=m
CONFIG_NET_UDP_TUNNEL=m
# CONFIG_NET_FOU_IP_TUNNELS is not set
CONFIG_INET_XFRM_TUNNEL=m
CONFIG_INET_TUNNEL=m
CONFIG_INET_XFRM_MODE_TUNNEL=m
CONFIG_INET6_XFRM_TUNNEL=m
CONFIG_INET6_TUNNEL=m
CONFIG_INET6_XFRM_MODE_TUNNEL=m
CONFIG_IPV6_TUNNEL=m
# CONFIG_IPV6_FOU_TUNNEL is not set
CONFIG_NET_ACT_TUNNEL_KEY=m
CONFIG_LWTUNNEL=y
CONFIG_TUN=m
CONFIG_TUN_VNET_CROSS_LE=y
CONFIG_VIDEO_TUNER=m
CONFIG_MEDIA_TUNER=y
CONFIG_MEDIA_TUNER_SIMPLE=y
CONFIG_MEDIA_TUNER_TDA8290=y
CONFIG_MEDIA_TUNER_TDA827X=y
CONFIG_MEDIA_TUNER_TDA18271=y
CONFIG_MEDIA_TUNER_TDA18272=m
CONFIG_MEDIA_TUNER_TDA9887=y
CONFIG_MEDIA_TUNER_TEA5761=y
CONFIG_MEDIA_TUNER_TEA5767=y
CONFIG_MEDIA_TUNER_MSI001=m
CONFIG_MEDIA_TUNER_MT20XX=y
CONFIG_MEDIA_TUNER_MT2060=m
CONFIG_MEDIA_TUNER_MT2063=m
CONFIG_MEDIA_TUNER_MT2266=m
CONFIG_MEDIA_TUNER_QT1010=m
CONFIG_MEDIA_TUNER_XC2028=y
CONFIG_MEDIA_TUNER_XC5000=y
CONFIG_MEDIA_TUNER_XC4000=y
CONFIG_MEDIA_TUNER_MXL5005S=m
CONFIG_MEDIA_TUNER_MXL5007T=m
CONFIG_MEDIA_TUNER_MC44S803=y
CONFIG_MEDIA_TUNER_MAX2165=m
CONFIG_MEDIA_TUNER_TDA18218=m
CONFIG_MEDIA_TUNER_FC0011=m
CONFIG_MEDIA_TUNER_FC0012=m
CONFIG_MEDIA_TUNER_FC0013=m
CONFIG_MEDIA_TUNER_TDA18212=m
CONFIG_MEDIA_TUNER_E4000=m
CONFIG_MEDIA_TUNER_FC2580=m
CONFIG_MEDIA_TUNER_TUA9001=m
CONFIG_MEDIA_TUNER_SI2157=m
CONFIG_MEDIA_TUNER_IT913X=m
CONFIG_MEDIA_TUNER_R820T=m
CONFIG_MEDIA_TUNER_QM1D1C0042=m
CONFIG_DVB_TUNER_ITD1000=m
CONFIG_DVB_TUNER_CX24113=m
CONFIG_DVB_TUNER_DIB0070=m
CONFIG_DVB_TUNER_DIB0090=m

mad_ady
Posts: 8316
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 573 times
Been thanked: 434 times
Contact:

Re: Openvpn connection problem

Post by mad_ady »

You're running an older kernel and the newer modules don't match the kernel version and aren't loaded. You'll need to reinstall the new kernel (don't know the exact command but should be something like) sudo apt-get install --reinstall linux-kernel-n2
These users thanked the author mad_ady for the post:
OdroidCelt (Fri Jul 24, 2020 7:40 pm)

User avatar
rooted
Posts: 7875
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 724 times
Been thanked: 222 times
Contact:

Re: Openvpn connection problem

Post by rooted »

I missed that he restored a backup boot. Unless you also restored the modules you will have major issues.

Reinstall as mad_ady suggested and it will resolve the issue.

OdroidCelt
Posts: 15
Joined: Mon Apr 13, 2020 1:43 am
languages_spoken: english, italian
ODROIDs: N2
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: Openvpn connection problem

Post by OdroidCelt »

mad_ady wrote:
Fri Jul 24, 2020 6:55 am
You're running an older kernel and the newer modules don't match the kernel version and aren't loaded. You'll need to reinstall the new kernel (don't know the exact command but should be something like) sudo apt-get install --reinstall linux-kernel-n2
Thank you, I will try later when I will come home.
I hope to don't come back to the starting problem when after upgrading my odroid didn't boot.
My configuration is, "boot" partition on microsd and "rootfs" partition on external usb hd.
Is it possible that new kernel doesen't support usb boot?
Or what could have gone wrong?
Thank you

mad_ady
Posts: 8316
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 573 times
Been thanked: 434 times
Contact:

Re: Openvpn connection problem

Post by mad_ady »

Maybe boot.ini got updated and overwrote your uuid for the rootfs (if you changed it)

OdroidCelt
Posts: 15
Joined: Mon Apr 13, 2020 1:43 am
languages_spoken: english, italian
ODROIDs: N2
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: Openvpn connection problem

Post by OdroidCelt »

mad_ady wrote:
Fri Jul 24, 2020 11:53 pm
Maybe boot.ini got updated and overwrote your uuid for the rootfs (if you changed it)
I changed it as it was previously to upgrade but didn't booted

mad_ady
Posts: 8316
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 573 times
Been thanked: 434 times
Contact:

Re: Openvpn connection problem

Post by mad_ady »

We'd need to see serial output to figure out what's wrong. If you don't have a serial adapter around, do you have a different 3.3V sbc around that has a serial port? You could use jumper wires between the two.

OdroidCelt
Posts: 15
Joined: Mon Apr 13, 2020 1:43 am
languages_spoken: english, italian
ODROIDs: N2
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: Openvpn connection problem

Post by OdroidCelt »

No unfortunately I have nothing of what you asked for.

OdroidCelt
Posts: 15
Joined: Mon Apr 13, 2020 1:43 am
languages_spoken: english, italian
ODROIDs: N2
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: Openvpn connection problem

Post by OdroidCelt »

I have copied previous Image.gz file inside Boot partition and it booted again but with problems connected to previous kernel.
Sorry if I wrote obvious things.
Is there something different I could try?

mad_ady
Posts: 8316
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 573 times
Been thanked: 434 times
Contact:

Re: Openvpn connection problem

Post by mad_ady »

Hmm, you'll need to get hold of the previous version of /lib/modules/kernel-version/* from somewhere

mdrjr
Site Admin
Posts: 11757
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 1 time
Been thanked: 28 times
Contact:

Re: Openvpn connection problem

Post by mdrjr »

I have no problems with N2 and 4.9.230-93 kernel. OpenVPN tun and tap works.
Tue Jul 28 12:36:38 2020 TUN/TAP device tun0 opened
Tue Jul 28 12:36:38 2020 TUN/TAP TX queue length set to 100
Tue Jul 28 12:36:38 2020 /sbin/ip link set dev tun0 up mtu 1500
Tue Jul 28 12:36:38 2020 /sbin/ip addr add dev tun0 192.168.20.2/24 broadcast 192.168.20.255
Tue Jul 28 12:36:38 2020 /sbin/ip route add 192.168.2.0/24 via 192.168.20.1
Tue Jul 28 12:36:38 2020 /sbin/ip route add 192.168.3.0/24 via 192.168.20.1


tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 192.168.20.2 netmask 255.255.255.0 destination 192.168.20.2
inet6 fe80::a8a6:ace3:e33a:5d0d prefixlen 64 scopeid 0x20<link>
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100 (UNSPEC)
RX packets 2 bytes 168 (168.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7 bytes 408 (408.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I only did.
modprobe tun
openvpn --config conf.ovpn

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 0 guests