Results 1 to 4 of 4
Hi guys, I have installed openVPN in my redhat 8 linux box. When I try to run it just gives me these messages:
[root@vpn openvpn]# /usr/local/sbin/openvpn /etc/openvpn/server.conf
Thu Dec 28 ...
- 12-28-2006 #1Just Joined!
- Join Date
- Dec 2005
- Posts
- 13
Cannot open TUN/TAP dev /dev/net/tun: No such device (errno=19)
Hi guys, I have installed openVPN in my redhat 8 linux box. When I try to run it just gives me these messages:
[root@vpn openvpn]# /usr/local/sbin/openvpn /etc/openvpn/server.conf
Thu Dec 28 16:14:19 2006 OpenVPN 2.0.9 i686-pc-linux [SSL] [LZO] built on Dec 27 2006
Thu Dec 28 16:14:19 2006 Diffie-Hellman initialized with 1024 bit key
Thu Dec 28 16:14:19 2006 TLS-Auth MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Thu Dec 28 16:14:19 2006 Note: Cannot open TUN/TAP dev /dev/net/tun: No such device (errno=19)
Thu Dec 28 16:14:19 2006 Note: Attempting fallback to kernel 2.2 TUN/TAP interface
Thu Dec 28 16:14:19 2006 Cannot allocate TUN/TAP dev dynamically
Thu Dec 28 16:14:19 2006 Exiting
I'm new to openVPN... Can someone point me to what is really missing here?
I have this system info if it might help:
Linux vpn 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386 GNU/Linux
- 12-28-2006 #2Linux Enthusiast
- Join Date
- Apr 2004
- Location
- UK
- Posts
- 658
Openvpn uses the tun module to create a virtual network interface. As I understand it, the data sent over the tun interface is sent back to userspace (via /dev/net/tun) where openvpn can encrypt it and send it over a real interface to it's destination.
Your problem appears to be that the tun driver isn't loaded. As root:
If that returns any errors, post them here so we can take a look, otherwise try running openvpn again.Code:modprobe tun
Let us know how you get on,
Chris...To be good, you must first be bad. "Newbie" is a rank, not a slight.
- 05-23-2007 #3Just Joined!
- Join Date
- Oct 2004
- Location
- Johannesburg, South Africa
- Posts
- 3
OpenVPN and tun/yap module
Hi All,
3 years on from the original posting I have come across the very same problem. I occasionally have to build an openvpn box and each time I find that I have to "read up" on the same items!
I have loaded up a Redhat enterprise 3 ES box and configured openvpn with the lzo compression.
Here are my details...2.4.21-4.ELsmp
Straight to the point...My linux skills are a little wavy but I can get around happily, most of the time...BUT, I need assistance loading the tun/tap module.
When I run insmod tun I get the following
insmod: tun: no module by that name found
How can I go about installing the module? From what I have read the kernel dynamically loads modules where and when required but it appears as though this module is not installed in the kernel at all?
I have read numerous articles about installing an RPM or compiling the module from source RPMS...editing of /etc/modules.conf etc...but I am still running into problems.
Do I need to recompile the kernel with support for the tun/tap module or is there an easier, less time consuming way of getting module installed in the kernel??
ANY COMMENTS would be appreciated!
THANKS AGAIN TO ALL
- 05-24-2007 #4Linux Enthusiast
- Join Date
- Apr 2004
- Location
- UK
- Posts
- 658
To answer your exact question, you need the tun module from your version of the kernel, compiled with the same compiler as your kernel. You don't need to compile from source if you can get the right binary but compiling the whole kernel from source guarantees these conditions.
Ignore all that though because I'd be almost certain you have the module available already. If you use 'insmod tun' it will attempt to load the module from the current working directory. Unless you were in the right directory at the time, you will get the error you saw.
To check if you have the tun module available
Should return a single file that is the tun driver.Code:ls /lib/modules/`uname -r`/kernel/drivers/net/tun.*
To load the module without needing to remember where it is:
This will load the correct module (if it exists) with any settings defined in /etc/modules.conf.Code:modprobe tun
Let us know how you get on,
Chris...To be good, you must first be bad. "Newbie" is a rank, not a slight.



