If you are getting error ‘Cannot open TUN/TAP dev /dev/net/tun‘ while starting OpenVPN server, it means that you should load ‘tun’ module which features TUN/TAP device driver:
OpenVPN 2.1.1 i386-redhat-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Jan 26 2010
NOTE: the current –script-security setting may allow this configuration to call user-defined scripts
LZO compression initialized
Note: Cannot open TUN/TAP dev /dev/net/tun: No such device (errno=19)
Note: Attempting fallback to kernel 2.2 TUN/TAP interface
Cannot allocate TUN/TAP dev dynamically
To load module you should use modprobe command:
modprobe tun
If no error apeared you will be able to check it with lsmod:
[root@server1 ~]# lsmod | grep tun tun 14455 2 [root@server1 ~]#
Afetr that you can start OpenVPN server:
[root@server1 ~]# /etc/init.d/openvpn start Starting openvpn: [ OK ] [root@server1 ~]#
Note that if you use OpenVZ -based VPS you might need to contact your provider or enable it in control panel.
Didn’t find the answer to your question? Ask it our administrators to reply we will publish on website.