Jump to content


Openvpn install question/issue TUN/TAP interface


36 replies to this topic

#1 digitalebola

    Senior Member

  • Members
  • 129 posts

Posted 03 November 2007 - 01:11 AM

Greetings all. I have been banging away on my 701 today and I am trying to get OpenVPN client working. I am a relative newb in linux as well.

I have the certs and config file in place but when I try to start the vpn I get the error \:

Cannot open TUN/TAP dev OpenVPN: no such file or directory (errno=2)



When I execute - openvpn --mktun --dev tun0

I get :

Note: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)

To do the install I used apt-get install openvpn. I am guessing there is a piece missing due to that. Anyone have any tips?

Thanks

John

#2 montyZdog

    Advanced Member

  • Members
  • PipPipPip
  • 52 posts
  • LocationUSA

Posted 16 November 2007 - 10:53 PM

I have the same issue. Looks like the kernel is compiled without TUN/TAP support. Browsing /boot/config* file shows no sign of the device compiled in or as module.
This is a disappointment. We run OpenVPN in the office and I assured my boss that EEE would support it.
Now I have to build a POPTOP server. :-(

#3 digitalebola

    Senior Member

  • Members
  • 129 posts

Posted 16 November 2007 - 11:20 PM

Quote

I have the same issue. Looks like the kernel is compiled without TUN/TAP support. Browsing /boot/config* file shows no sign of the device compiled in or as module.
This is a disappointment. We run OpenVPN in the office and I assured my boss that EEE would support it.
Now I have to build a POPTOP server. :-(
Do the following

mknod /dev/net/tun c 10 200
modprobe tun

#4 cedric

    New member

  • Members
  • 4 posts

Posted 17 November 2007 - 10:27 AM

I've submitted a support request to ASUS on about this.

I'm trying for the second time to download the kernel sources from ASUS. If it's successful I'll try and compile tun.ko

If that doesn't work then I'll probably install another distribution although the thought of getting the wireless and webcam working makes me shudder.

#5 digitalebola

    Senior Member

  • Members
  • 129 posts

Posted 17 November 2007 - 12:03 PM

Cedric - What I mentioned above works. I have been using openVPN for a couple of weeks to access my home VPN and VPNC to access work.

#6 cedric

    New member

  • Members
  • 4 posts

Posted 17 November 2007 - 12:44 PM

It doesn't work for me i'm afraid:

/home/user> uname -a
Linux titch 2.6.21.4-eeepc #2 Mon Sep 24 14:09:46 EDT 2007 i686 GNU/Linux
/home/user> sudo modprobe tun
FATAL: Module tun not found.

If you've been using it for a couple of months perhaps you have a different version of the kernel?

#7 digitalebola

    Senior Member

  • Members
  • 129 posts

Posted 17 November 2007 - 02:02 PM

did you do the -


mknod /dev/net/tun c 10 200

#8 cedric

    New member

  • Members
  • 4 posts

Posted 17 November 2007 - 02:31 PM

Yes:

titch:/home/user> mknod /dev/net/tun c 10 200
mknod: `/dev/net/tun': No such file or directory

The tun/tap module doesn't exist/
titch:/home/user> find /lib/modules/ -name '*tun*' -print

Is it possible that you've installed some package that supplies this module?

#9 cedric

    New member

  • Members
  • 4 posts

Posted 17 November 2007 - 02:37 PM

Fixed it! mkdir /dev/net before the mknod
I assumed that /dev/ was a filesystem managed by udev and it isn't - it's a real directory
Thanks for your help

#10 quant

    Senior Member

  • Members
  • 103 posts

Posted 17 November 2007 - 03:09 PM

Right.
According to the kernel config - TUN is built into kernel - no need to modprobe it...

#
# Network device support
#
CONFIG_NETDEVICES=y
CONFIG_DUMMY=m
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
CONFIG_TUN=y
# CONFIG_NET_SB1000 is not set

So if there is a problem with automatic devnode creation - maybe you need to modify /etc/udev rules?

#11 halfvulcan

    Advanced Member

  • Members
  • PipPipPip
  • 81 posts

Posted 06 December 2007 - 07:30 PM

Hamachi uses tun/tap as well. Anyway, long story short, I installed Hamachi using a hard-to-find deb file, but after having some tun trouble, even after I created the folder like Cedric did, I get:
/home/user> mknod /dev/net/tun c 10 200
mknod: `/dev/net/tun': File exists
/home/user> sudo modprobe tun
FATAL: Module tun not found.
/home/user>

Any ideas?

Edited by halfvulcan, 06 December 2007 - 07:33 PM.


#12 halfvulcan

    Advanced Member

  • Members
  • PipPipPip
  • 81 posts

Posted 06 December 2007 - 10:54 PM

Restored the home partition to factory, still no luck. Please tell me what this means. I think I know, but not certain.

/home/user> mkdir /dev/net
mkdir: cannot create directory `/dev/net': Permission denied
/home/user> sudo mkdir /dev/net
/home/user> sudo mknod /dev/net/tun c 10 200
/home/user> mknod /dev/net/tun c 10 200
mknod: `/dev/net/tun': File exists
/home/user> modprobe tun
bash: modprobe: command not found
/home/user> sudo modprobe tun
FATAL: Module tun not found.
/home/user>

Is tun not going to work for me? Do I need to recompile the kernel? How difficult is that? I need Hamachi...

Edited by halfvulcan, 06 December 2007 - 10:56 PM.


#13 jricher

    Advanced Member

  • Members
  • PipPipPip
  • 89 posts

Posted 06 December 2007 - 11:18 PM

You need to use sudo to create the directory. A regular user doesn't have the right privileges

#14 halfvulcan

    Advanced Member

  • Members
  • PipPipPip
  • 81 posts

Posted 07 December 2007 - 01:40 AM

Yes, and as you can see, I did use sudo, and created the folder. Thanks for clearing that up for those who haven't figured out by trial and error as I did. Back to my question... Is tun not going to work in the Xandros that comes with the EEE?
Here are the relevant lines, the confusing ones removed:
/home/user> sudo mkdir /dev/net
/home/user> sudo mknod /dev/net/tun c 10 200
/home/user> sudo modprobe tun
FATAL: Module tun not found.

Edited by halfvulcan, 07 December 2007 - 01:44 AM.


#15 pfriedel

    Member

  • Members
  • 12 posts

Posted 07 December 2007 - 05:43 AM

Quote

Yes, and as you can see, I did use sudo, and created the folder. Thanks for clearing that up for those who haven't figured out by trial and error as I did. Back to my question... Is tun not going to work in the Xandros that comes with the EEE?
Here are the relevant lines, the confusing ones removed:
/home/user> sudo mkdir /dev/net
/home/user> sudo mknod /dev/net/tun c 10 200
/home/user> sudo modprobe tun
FATAL: Module tun not found.
According to quant, tun is built in, it's not a module. Once you have the tun device made, hamachi should be able to use it.

Quote

Right.
According to the kernel config - TUN is built into kernel - no need to modprobe it...

#
# Network device support
#
CONFIG_NETDEVICES=y
CONFIG_DUMMY=m
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
CONFIG_TUN=y
# CONFIG_NET_SB1000 is not set

So if there is a problem with automatic devnode creation - maybe you need to modify /etc/udev rules?
So to back up a bit - if you do this:

 ls /dev/net/run
does it show up with anything?

#16 halfvulcan

    Advanced Member

  • Members
  • PipPipPip
  • 81 posts

Posted 07 December 2007 - 06:44 AM

/home/user> sudo ls /dev/net/tun
ls: /dev/net/tun: No such file or directory

Ok, I don't know if this was the right thing to do, but I figured it couldn't hurt, so I created a /dev/net folder. Now I'm reinstalling the build-essential package, which may or may not have anything whatsoever to do with tun.

Edited by halfvulcan, 07 December 2007 - 07:01 AM.


#17 halfvulcan

    Advanced Member

  • Members
  • PipPipPip
  • 81 posts

Posted 07 December 2007 - 07:09 AM

Quote

# Network device support
#
CONFIG_NETDEVICES=y
CONFIG_DUMMY=m
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
CONFIG_TUN=y
# CONFIG_NET_SB1000 is not set

So if there is a problem with automatic devnode creation - maybe you need to modify /etc/udev rules?
I know that's not the first time you've said that, but I don't know what it means. I'll look in that folder /etc/udev again, but I don't know what to edit or do. I also don't know where that bit of code you keep quoting comes from, but I'll take your word for it that tun is built in properly to the os. I just have no clue how to get it working. Months ago when I was installing Ubuntu-based distros tun/tap usually just worked and all I had to worry about was following instructions.

Edited by halfvulcan, 07 December 2007 - 03:26 PM.


#18 halfvulcan

    Advanced Member

  • Members
  • PipPipPip
  • 81 posts

Posted 07 December 2007 - 07:37 AM

Ohhhkay, I think I may have stumbled upon what you mean in my googling. Do you mean that maybe the links.conf file (something I just looked at for the first time) needs to be configured to tell it to create a symlink for tun? And that will be one of my last conscious thoughts for tonight. It's 3 hours past my bed time. Good night. And thanks for the help. I could use an answer to that last one, because I really don't know how all this works yet. Links.conf, right?

Edited by halfvulcan, 07 December 2007 - 07:41 AM.


#19 halfvulcan

    Advanced Member

  • Members
  • PipPipPip
  • 81 posts

Posted 07 December 2007 - 03:31 PM

Quote

# Network device support
#
CONFIG_NETDEVICES=y
CONFIG_DUMMY=m
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
CONFIG_TUN=y
# CONFIG_NET_SB1000 is not set
What file is this from? Is this from your config? Is this how mine should be set? Or do these config items just prove that tun/tap functionality should be working?

Edited by halfvulcan, 07 December 2007 - 03:33 PM.


#20 pfriedel

    Member

  • Members
  • 12 posts

Posted 07 December 2007 - 05:07 PM

Quote

What file is this from? Is this from your config? Is this how mine should be set? Or do these config items just prove that tun/tap functionality should be working?
Those are just the kernel options that quant posted, so tun/tap support is built in to the (xandros) kernel, it isn't built in as a module, so you shouldn't need to "modprobe tun" to get it working. The udev suggestion was that the /dev/net/ devices should be automatically made as necessary, but they weren't - side diversion to the core problem. What does hamachi do when you try to fire it up? Could it just be a /dev permissions problem?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users