| Home | Forums | Reviews | Tutorials | Articles | Register | Search | | | LinuxQuestions.org > Forums > Linux Forums > Linux - Server | OpenVpn TUN/TAP | | | Linux - Server This 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. Are you new to LinuxQuestions.org? Visit the following links: Site Howto | Site FAQ | Sitemap | Register Now 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. | 05-08-2010, 02:17 PM | #1 | | LQ Newbie Registered: May 2010 Posts: 24 Rep: | OpenVpn TUN/TAP 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 | | | | 05-09-2010, 07:14 AM | #2 | | LQ 5k Club | What is the output of Code: ls -l /dev/net/tun lsmod | grep tun | | | | 05-09-2010, 10:20 AM | #3 | | LQ Newbie Registered: May 2010 Posts: 24 Original Poster Rep: | Code: [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 /]# | | | | 05-09-2010, 10:51 AM | #4 | | LQ 5k Club | Quote: Originally Posted by unminser Code: [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. | | | | 05-09-2010, 11:19 AM | #5 | | LQ Newbie Registered: May 2010 Posts: 24 Original Poster Rep: | Code: [root@server /]# find -name lsmod ./sbin/lsmod [root@server /]# ./sbin/lsmod | grep tun [root@server /]# [root@server /]# find -name tun ./dev/net/tun [root@server /]# im using centos 5.?.? | | | | 05-09-2010, 11:41 AM | #6 | | LQ 5k Club | Quote: Originally Posted by unminser Code: [root@server /]# find -name lsmod ./sbin/lsmod [root@server /]# ./sbin/lsmod | grep tun [root@server /]# [root@server /]# find -name tun ./dev/net/tun [root@server /]# im using centos 5.?.? 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. | | | | 05-09-2010, 11:58 AM | #7 | | LQ Newbie Registered: May 2010 Posts: 24 Original Poster Rep: | Code: [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 /]# | | | | 05-09-2010, 12:11 PM | #8 | | LQ 5k Club | Quote: Originally Posted by unminser Code: [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)? | | | | 05-09-2010, 12:17 PM | #9 | | LQ Newbie Registered: May 2010 Posts: 24 Original Poster Rep: | Code: 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 | | | | 05-09-2010, 12:52 PM | #10 | | LQ 5k Club | Quote: Originally Posted by unminser Code: 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. | | | | 05-09-2010, 12:57 PM | #11 | | LQ Newbie Registered: May 2010 Posts: 24 Original Poster Rep: | im new to linux i thought uname -a give the system inofrmation Quote: CentOS release 5.4 (Final) | | | | 05-29-2011, 04:00 AM | #12 | | LQ Newbie Registered: Oct 2010 Posts: 7 Rep: | Please refer the below URL: http://unixnethost.blogspot.com/2011...tallation.html | | | | Posting Rules | You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | Similar Threads | | Thread | Thread Starter | Forum | Replies | Last Post | | OpenVPN Tun/Tap error | Penn | Linux - Server | 5 | 10-14-2010 03:35 PM | | nm-openvpn write to TUN/TAP : Invalid argument (code=22) | jonaskellens | Linux - Newbie | 0 | 08-24-2009 04:49 AM | | OpenVPN - tun - tap - tunnels | leamassiot | Linux - Networking | 40 | 08-12-2009 10:36 AM | | Need help on TUN/TAP | vinodl | Linux - Networking | 1 | 06-22-2009 12:18 PM | | Tun/Tap issue | minasafwat | Linux - Kernel | 0 | 11-14-2006 02:11 AM | LinuxQuestions.org > Forums > Linux Forums > Linux - Server All times are GMT -5. The time now is 11:44 PM. | | Main Menu | - Linux Forum
- Search
- LQ Tags
- Linux Tutorials
- LQ Job Marketplace
- LQ Deals
- Linux Wiki
- Distro Reviews
- Book Reviews
- Download Linux
- Social Groups
- LQ Blogs
| | Write for LQ | | LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know. | | Main Menu | - LQ Calendar
- LQ Rules
- LQ Sitemap
- Site FAQ
- View New Posts
- View Latest Posts
- Zero Reply Threads
- LQ Wiki Most Wanted
- Jeremy's Blog
- Report LQ Bug
| | Syndicate | Latest Threads LQ News | |
Openvpn: Write to Tun/tap : Invalid Argument (Code=22)
Source: https://www.linuxquestions.org/questions/linux-server-73/openvpn-tun-tap-806675/
0 Response to "Openvpn: Write to Tun/tap : Invalid Argument (Code=22)"
Post a Comment