| Linode Forum https://forum.linode.com/ |
|
| OpenVPN start up fails- no tun device https://forum.linode.com/viewtopic.php?f=19&t=6865 |
Page 1 of 1 |
| Author: | stephenr317 [ Fri Mar 25, 2011 8:01 am ] |
| Post subject: | OpenVPN start up fails- no tun device |
I am trying to set up an OpenVPN server on Ubuntu 10.10 64 bit and am using the community guide as reference. I have gone through the guide several times but I am still having an issue. When I attempt to start opevpn I get the following error: Code: root@boromir:/etc/openvpn# openvpn server.conf To confirm the module cannot be found: Code: root@boromir:/etc/openvpn# modprobe tun How to I install this module or set it up correctly? I have tried a few things I've found googling but nothing has worked thus far. Thanks! |
|
| Author: | Guspaz [ Fri Mar 25, 2011 10:23 am ] |
| Post subject: | |
You installed udev? |
|
| Author: | Stever [ Fri Mar 25, 2011 11:31 am ] |
| Post subject: | |
Code: ~ # uname -r I thought the linode kernels had the TUN device built-in, but it appears not to be - do the 32-bit kernels include TUN? You can: 1) Run your distro kernel with pv-grub 2) Download the linode kernel source and build the module yourself 3) Ask linode to include the TUN driver in their kernel |
|
| Author: | Stever [ Fri Mar 25, 2011 11:36 am ] |
| Post subject: | |
Code: # pwd Yep - the 32-bit kernels have the TUN device built-in, while the 64-bit don't. I'd probably file a support ticket on this one, I doubt linode meant it to be this way. |
|
| Author: | stephenr317 [ Fri Mar 25, 2011 2:31 pm ] |
| Post subject: | |
Thanks for the help! I thought that was the case but wasn't 100% sure. I'll open a support ticket for tun to be included in 64 bit kernel. |
|
| Author: | tarasis [ Sat Mar 16, 2013 4:13 pm ] |
| Post subject: | Re: OpenVPN start up fails- no tun device |
I'm trying to run OpenVPN on Ubuntu 12.10 with the latest 32bit kernel (3.7.10-linode49) and running into this. Do they typically not include the tun module, or was it dropped by accident? |
|
| Author: | caker [ Sat Mar 16, 2013 7:09 pm ] |
| Post subject: | Re: OpenVPN start up fails- no tun device |
This thread is old, and so is the kernel it references -Chris |
|
| Author: | tarasis [ Sun Mar 17, 2013 11:37 am ] |
| Post subject: | Re: OpenVPN start up fails- no tun device |
Thanks Chris, after OpenVPN complained about not finding TUN I did a search and found this thread. Cheers. |
|
| Author: | jphelps [ Mon Mar 18, 2013 4:17 pm ] |
| Post subject: | Re: OpenVPN start up fails- no tun device |
I'm experiencing this outcome though as Chris noted it's likely to be a different cause than the original solution indicated. For instance, my kernel hasn't changed and it should have TUN support included. I hate to start a new thread when the issue appears to be the same, no tun device so .. My openvpn implementation was working well until I rebooted this morning and I'm experiencing this issue. Mon Mar 18 15:02:22 2013 us=742824 OpenVPN 2.2.1 i686-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Mar 30 2012 Mon Mar 18 15:02:22 2013 us=743036 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables Mon Mar 18 15:02:22 2013 us=747934 Diffie-Hellman initialized with 1024 bit key Mon Mar 18 15:02:22 2013 us=748734 TLS-Auth MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ] Mon Mar 18 15:02:22 2013 us=748796 Socket Buffers: R=[163840->131072] S=[163840->131072] Mon Mar 18 15:02:22 2013 us=748938 ROUTE default_gateway=69.164.196.1 Mon Mar 18 15:02:22 2013 us=748989 Note: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2) Mon Mar 18 15:02:22 2013 us=749015 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0 Mon Mar 18 15:02:22 2013 us=749060 /sbin/ifconfig 10.8.0.1 pointopoint 10.8.0.2 mtu 1500 SIOCSIFADDR: No such device : ERROR while getting interface flags: No such device SIOCSIFDSTADDR: No such device : ERROR while getting interface flags: No such device SIOCSIFMTU: No such device Mon Mar 18 15:02:22 2013 us=765084 Linux ifconfig failed: external program exited with error status: 1 Mon Mar 18 15:02:22 2013 us=765186 Exiting I looked and /dev/net is missing so presumably any reference to /dev/net/tun is sure to fail. That's where I'm at right now, looking around further though. Update: kernel reports CONFIG_TUN=y so there's no module to load and I'm seeing "tun: Universal TUN/TAP device driver, 1.6 tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>" at boot so I'm at a loss as to why this problem has surfaced after rebooting. Could this be a linode kernel issue or perhaps related to an Ubuntu 12.04 update? |
|
| Author: | Vance [ Wed Mar 20, 2013 11:19 pm ] |
| Post subject: | Re: OpenVPN start up fails- no tun device |
Since you're seeing the TUN/TAP boot message, I'd suggest that it's probably not the kernel but more likely a problem of udev not creating the proper entry in /dev. |
|
| Author: | fuzzman442 [ Thu Mar 21, 2013 9:06 am ] |
| Post subject: | Re: OpenVPN start up fails- no tun device |
jphelps, I observed the same thing last weekend. I am on Ubuntu 12.04 LTS (32 bit). My OpenVPN TUN server was working fine, until I rebooted to pick up kernel 3.7.10. That was last weekend. The /dev/tun device disappeared. I asked about it in IRC; and someone mentioned the udev possibility. However, I'm not that familiar with it. I think something in the new kernel caused the issue. How to fix it: Code: linode:~$ cd /dev I thought that doing that and then an openvpn restart would have been enough. But I ended up with a tun1 instead of a tun0. This might have been because I had an existing installation. So I rebooted again, and tun0 came up and worked fine. I hope this helps. |
|
| Author: | jphelps [ Thu Mar 21, 2013 7:21 pm ] |
| Post subject: | Re: OpenVPN start up fails- no tun device |
fuzzman442 wrote: jphelps, I observed the same thing last weekend. I am on Ubuntu 12.04 LTS (32 bit). My OpenVPN TUN server was working fine, until I rebooted to pick up kernel 3.7.10. That was last weekend. The /dev/tun device disappeared. I asked about it in IRC; and someone mentioned the udev possibility. However, I'm not that familiar with it. I think something in the new kernel caused the issue. How to fix it: Code: linode:~$ cd /dev I thought that doing that and then an openvpn restart would have been enough. But I ended up with a tun1 instead of a tun0. This might have been because I had an existing installation. So I rebooted again, and tun0 came up and worked fine. I hope this helps. I've tried a few things but your comment has definitely helped me, thanks. An apt-get update/upgrade cycle showed udev needing updates however doing so didn't help, nor did rebooting. So I tried MAKEDEV tun though I'm skeptical that does anything meaningful with udev. No help there. However Code: openvpn --mktun --dev tun0showed expected output and Code: /etc/init.d/openvpn startimmediately afterward worked normally. I rebooted and openvpn had started normally. |
|
| Author: | fergtm [ Sat Nov 16, 2013 1:29 am ] |
| Post subject: | Re: OpenVPN start up fails- no tun device |
I was having the same problem (no /dev/net/tun) after upgrading from Ubuntu 10.04 to 12.04. In my case it was fixed by running Code: sudo udevadm trigger There was no need to manually create the /dev entry. Sorry for posting on a old thread. I just found this thread while trying to solve the same issue. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|