1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cannot open TUN/TAP dev openvpn

Discussion in 'Tomato Firmware' started by gandalf_123, Jul 29, 2009.

  1. gandalf_123

    gandalf_123 Addicted to LI Member

    Hello everybody,

    I'm completely new to OpenVpn. On my router I run tomatovpnND-1.25 vpn3.3.7. My computer has ubuntu 9,04. I tried to set up my system according to this thread:

    Quick and dirty server howto from delta221.

    I configured my linksys device according to this thread and I also took the cfg's from there with the modifications needed for my machine (IP's, dyndns-name ...).

    Then I started openvpn

    openvpn ..../client_tun.cfg

    Everything worked fine until in the end I got the message:

    Cannot open TUN/TAP dev openvpn

    In my /dev/net/ I have a tun device named tun.

    I also tried the same procedure with the tap-configuration ... same result

    So if anybody can give me a hint ...
  2. rhester72

    rhester72 Network Guru Member

    Sounds like you called your tun device openvpn instead of tun (or tun0) in your OpenVPN config.

  3. fyellin

    fyellin LI Guru Member

    On some linux computers, you need to be "root" to run openvpn. If you have root access, try typing:
    sudo openvpn . . .​
    and see if that works.

    If you look at the device you're trying to open
    $ ls -ld /dev/net/tun
    crw-rw---- 1 root root 10, 200 Apr 24 03:33 /dev/net/tun
    you might see that it isn't publicly readable or writable on your computer.
  4. gandalf_123

    gandalf_123 Addicted to LI Member

    tun device

    Hello again,

    thank you for your quick answers. I did 3 things:

    1) I commented out dev-node openvpn
    2) changes the permissions for /dev/net tun to

    3) started openvpn as root ...

    no error messages :)
    no working vpn tunnel :-(

    my client.cfg is:

    and on the server:

    maybe something wrong with the gateway ?
  5. SgtPepperKSU

    SgtPepperKSU Network Guru Member

    Get rid of all of that from your Custom Config section on the server and try again.

    EDIT: Also get rid of the "topology subnet" from the client config
  6. gandalf_123

    gandalf_123 Addicted to LI Member

    some success


    sorry for my late response, but I was abroad for some time.

    I followed your advice and I got an VPN - tunnel. But then I read in the OpenVpn - doc the following:

    So I added:

    push "redirect-gateway def1"
    push "dhcp-option DNS 10.X.X.1"
    according to the openvpn - doc.

    and my internet broke down. I think it's an DNS problem because I can ping IP addesses internal as well as extern but I get no connection in my internet browser (firefox).
    Has anybody an idea ?

  7. SgtPepperKSU

    SgtPepperKSU Network Guru Member

    There is a GUI options for that: "Direct clients to redirect Internet traffic". See if that works better for you.
  8. gandalf_123

    gandalf_123 Addicted to LI Member

    vpn options


    no not a chance. But i experienced something else. It seems to be connected to the compression. If set set comp lzo no on the client and compression to no on the server it seemed to work but veeery slow.

Share This Page