How to install tun/tap driver for openvpn on centos linux?
Solution 1
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.
Solution 2
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
Humber
Related videos on Youtube
M.Rezaei
I can programming with this language : c,c++,c#.net,vb,vb.net,python,perl,j2me,php,javascript,html,delphi. When i want to write program, I ask one question form myself, what program language is better for this work, and then write program with the best language.
Updated on September 17, 2022Comments
-
M.Rezaei over 1 year
How to install tun/tap driver for openvpn on centos linux?
Best wishes for you.
-
Chaminda Bandara about 5 yearsThanks a lot, A great answer, I did but still same issue having...