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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to install tun/tap driver for openvpn on centos linux?

Best wishes for you.

share|improve this question
up vote 4 down vote accepted

The TUN/TAP driver is already part of the standard kernel image. Just run modprobe tun to load it.

If you are inside a virtual server (e. g. OpenVZ/Virtuozzo, Linux-Vserver et al) the provider needs to enable tun/tap-functionality first since you cannot load kernel modules yourself in these environments.

share|improve this answer

The standard kernel image has TUN/TAP driver configured as default. But if you want to check that with your running kernel you can:

$ sudo apt-get install linux-headers-`uname -r`
$ cd /usr/src/linux-headers-`uname -r`
$ sudo make menuconfig

After searching for "TUN" you will find:

Symbol: TUN[=m]
│ Prompt: Universal TUN/TAP device driver support
│   Defined at drivers/net/Kconfig:112
│   Depends on: NETDEVICES
│   Location:
│     -> Device Drivers
│       -> Network device support (NETDEVICES [=y])
│   Selects: CRC32 

The kernel module is located at:

$ ls /lib/modules/`uname -r`/kernel/drivers/net/tun.ko

You can repeat almost the same procedure with a kernel source to check if TUN driver is compiled as a module. Just replace the first two commands with:

$ tar xvjf linux-2.6.XX.X.tar.bz2 && cd linux-2.6.XX.X

and continue.

Best regards


share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.