Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i installed the openvpn and now try to run it but:
Code:
[root@server openvpn]# /usr/sbin/openvpn server.conf
Sat May 8 13:15:51 2010 OpenVPN 2.1.1 x86_64-redhat-linux [SSL] [LZO2] [EPOLL] [PKCS11] built on May 8 2010
Sat May 8 13:15:51 2010 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Sat May 8 13:15:51 2010 Diffie-Hellman initialized with 1024 bit key
Sat May 8 13:15:51 2010 TLS-Auth MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Sat May 8 13:15:51 2010 ROUTE default_gateway=191.255.255.1
Sat May 8 13:15:51 2010 Note: Cannot open TUN/TAP dev /dev/net/tun: Permission denied (errno=13)
Sat May 8 13:15:51 2010 Note: Attempting fallback to kernel 2.2 TUN/TAP interface
Sat May 8 13:15:51 2010 Cannot allocate TUN/TAP dev dynamically
Sat May 8 13:15:51 2010 Exiting
[root@server /]# ls -l /dev/net/tun
crw------- 1 root root 10, 200 May 7 21:51 /dev/net/tun
[root@dok /]# lsmod | grep tun
bash: lsmod: command not found
[root@server /]#
Strange; no lsmod command? Maybe RedHat has another way to list modules loaded into the kernel. Maybe try /sbin/lsmod. I'm guessing the underlying problem is tun is not in the kernel.
Seems you have an unusual $PATH for root -- it usually includes /sbin. For interest echo $PATH
The was no output from ./sbin/lsmod | grep tun showing the tun module was not loaded. Presuming tun is not built in to the kernel that might be enough to explain the symptoms. IDK how to load modules in RedHat but this page looks helpful. Looks like you just need to run /sbin/modprobe tun and, if it works OK (confirm with lsmod), try OpenVPN again.
[root@server /]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/rabbit/bin
[root@server /]# ./sbin/lsmod | grep tun
[root@server /]# /sbin/modprobe tun
FATAL: Could not load /lib/modules/2.6.18-028stab067.4/modules.dep: No such file or directory
[root@server /]# ./sbin/modprobe tun
FATAL: Could not load /lib/modules/2.6.18-028stab067.4/modules.dep: No such file or directory
[root@server /]#
[root@server /]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/rabbit/bin
[root@server /]# ./sbin/lsmod | grep tun
[root@server /]# /sbin/modprobe tun
FATAL: Could not load /lib/modules/2.6.18-028stab067.4/modules.dep: No such file or directory
[root@server /]# ./sbin/modprobe tun
FATAL: Could not load /lib/modules/2.6.18-028stab067.4/modules.dep: No such file or directory
[root@server /]#
/sbin/modprobe tun is the correct form of the command. ./sbin/modprobe tun is equivalent if the current directory is /
Unless tun is built into the kernel then the problem is that it is not available as a loadable module. IDK RedHat so do not know how to resolve that. How about a new thread asking how to load tun in RedHat (and giving the RedHat release)?
uname -a
Linux server 2.6.18-028stab067.4 #1 SMP Thu Jan 14 17:06:11 MSK 2010 x86_64 x86_64 x86_64 GNU/Linux
That's the kernel. Do you have an /etc/*release* or /etc/*version* file that shows the version/release of RedHat? With that information we should be able to netsearch for how tun is normally set up. The fact that you have a /dev/net/tun file suggests it's in there somewhere.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.