Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Hi I get the following error when I try to run openvpn in my Ubuntu Server

Fri Jan 8 02:12:59 2010 OpenVPN 2.1_rc11 i486-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Mar 9 2009
Fri Jan 8 02:12:59 2010 WARNING: --keepalive option is missing from server config
Fri Jan 8 02:12:59 2010 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Fri Jan 8 02:12:59 2010 Diffie-Hellman initialized with 1024 bit key
Fri Jan 8 02:12:59 2010 WARNING: file '/etc/openvpn/easy-rsa/2.0/keys/server.key' is group or others accessible
Fri Jan 8 02:12:59 2010 /usr/bin/openssl-vulnkey -q -b 1024 -m
Fri Jan 8 02:12:59 2010 TLS-Auth MTU parms [ L:1543 D:140 EF:40 EB:0 ET:0 EL:0 ]
Fri Jan 8 02:12:59 2010 ROUTE default_gateway=
Fri Jan 8 02:12:59 2010 Note: Cannot open TUN/TAP dev /dev/net/tun: Permission denied (errno=13)
Fri Jan 8 02:12:59 2010 Note: Attempting fallback to kernel 2.2 TUN/TAP interface
Fri Jan 8 02:12:59 2010 Cannot allocate TUN/TAP dev dynamically
Fri Jan 8 02:12:59 2010 Exiting

This is my config file for server side

dev tun
proto tcp
port 1194

ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem

user nobody
group nogroup


#status openvpn-status.log
#verb 3

push "redirect-gateway def1"

log-append /var/log/openvpn

I'm runining from my root account. So I don't know why the permission is denied. Also if I type in modprobe tun I get the following output.

WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/. FATAL: Could not load /lib/modules/2.6.18-128.2.1.el5.028stab064.7ent/modules.dep: No such file or directory

share|improve this question
The only directory in /lib/modules is '2.6.18-028stab062.3'. Actually this is a VPS, and I have installed the image provided by my provider. – John Franic Jan 8 '10 at 4:45
So, the image is broken. You need to get a kernel properly installed by some means, I suggest asking them about it. Or get a distribution kernel package and install that to get all the modules right. – Andrew McGregor Jan 8 '10 at 4:53

3 Answers 3

I wish I had caught this before, as this is something that has happened to me many times before.

You're running on an OpenVZ VPS. Therefore, kernel modules such as tun will not work. You will need your provider to enable them for you.

Consequently, things such as FUSE will not work without the provider enabling that as well, and also things like swap cannot work whatsoever.

share|improve this answer

The tun/tap module isn't loading, because it looks like your kernel isn't installed correctly. Therefore while you probably do have permission to use the device node, there's no device answering on the kernel side. Resolve the modprobe errors (just running depmod -a as root might do it) and see what happens then.

share|improve this answer
I ran depmod -a and got the following output WARNING: Couldn't open directory /lib/modules/2.6.18-128.2.1.el5.028stab064.7ent: No such file or directory FATAL: Could not open /lib/modules/2.6.18-128.2.1.el5.028stab064.7ent/modules.dep.temp for writing: No such file or directory – John Franic Jan 8 '10 at 1:09
So, /lib/modules/2.6.18-128.2.1.el5.028stab064.7ent actually exists? If not, something is badly wrong with your kernel installation, and you want to track that down. I presume you ran depmod as root. – Andrew McGregor Jan 8 '10 at 4:27
No, it doesn't exist, the only directory in /lib/modules is '2.6.18-028stab062.3'. Yes all these were done as root. – John Franic Jan 8 '10 at 5:21
Ok, there is a problem with the way the kernel was installed in that VM image. So, either contact the provider, or install a new kernel yourself. – Andrew McGregor Jan 8 '10 at 5:38
I contacted my VPN provider and they fixed it for me. Thanks for your help. – John Franic Jan 8 '10 at 9:18

Hope this helps

share|improve this answer
wat that is described in the link is the exact problem i'm having. – John Franic Jan 8 '10 at 5:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.