Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: tun/tap on ubuntu

  1. #1
    Join Date
    Jan 2005
    Beans
    10

    tun/tap on ubuntu

    Does the standard ubuntu kernel have support for the tun/tap device driver? If not, how does one go about adding support for it (i.e. compiling a compatible module or whatever else is required)? Thanks.

  2. #2
    Join Date
    Jan 2005
    Beans
    4

    Re: tun/tap on ubuntu

    yes /sbin/modprobe tun

  3. #3
    Join Date
    Jan 2005
    Beans
    10

    Re: tun/tap on ubuntu

    Thank you. I really didn't expect it to be that simple.

  4. #4
    Join Date
    Mar 2005
    Beans
    26

    Re: tun/tap on ubuntu

    I've just spent the last several hours trying to get tun to work...
    it just doesn't like me.
    I've added the 'tun' module using modprobe and that's about it
    whenever I try 'ifconfig tun0 10.0.0.1 up' or similar I get this result:
    SIOCSIFADDR: No such device
    tun0: ERROR while getting interface flags: No such device
    tun0: ERROR while getting interface flags: No such device

    I've created the /dev/net/tun node and checked it's privileges and all that jazz but still no love!
    ifconfig -a comes up empty for the tun0 interface...
    any ideas?
    (i've installed the vtun package via synaptic was that the correct one?)

  5. #5
    Join Date
    Mar 2005
    Location
    Florence, Italy
    Beans
    329
    Distro
    Ubuntu

    Re: tun/tap on ubuntu

    I have the same problem using kernel 2.6.12-10-686 but I don't have any problems with latest dapper kernel.
    Question: is it a problem related to the kernel?
    15.04 on a sammy NP300E5A-S06IT notebook

  6. #6
    Join Date
    Apr 2005
    Beans
    Hidden!

    Re: tun/tap on ubuntu

    Quote Originally Posted by Happy
    I've just spent the last several hours trying to get tun to work...
    it just doesn't like me.
    I've added the 'tun' module using modprobe and that's about it
    whenever I try 'ifconfig tun0 10.0.0.1 up' or similar I get this result:
    SIOCSIFADDR: No such device
    tun0: ERROR while getting interface flags: No such device
    tun0: ERROR while getting interface flags: No such device

    I've created the /dev/net/tun node and checked it's privileges and all that jazz but still no love!
    ifconfig -a comes up empty for the tun0 interface...
    any ideas?
    (i've installed the vtun package via synaptic was that the correct one?)
    Have you created a virtual interface bridge? You need the userspace utilities contained in the vtun package (that's in the Universe repository).

  7. #7
    Join Date
    Aug 2005
    Location
    Ontario
    Beans
    80

    Re: tun/tap on ubuntu

    You can also create a persistent tunnel with openvpn...

    sudo openvpn --mktun --dev tun0

  8. #8
    Join Date
    Apr 2005
    Beans
    Hidden!

    Re: tun/tap on ubuntu

    There is also a tunctl utility in User Mode Linux (that hasn't worked for me, YMMV). You can download the source code from the project's CVS repository: http://www.user-mode-linux.org/cvs/t....c?sortby=date.

  9. #9
    Join Date
    Apr 2005
    Beans
    Hidden!

    Re: tun/tap on ubuntu

    Quote Originally Posted by dradul
    There is also a tunctl utility in User Mode Linux (that hasn't worked for me, YMMV). You can download the source code from the project's CVS repository: http://www.user-mode-linux.org/cvs/t....c?sortby=date.
    I can now say I have successfully used tunctl to set up a PPPoE (RFC2516) connection using the eciadsl drivers (big change in my ISPs a day after I posted the above).

    Now I'm using a PPPoE connection emulated over a persistent virtual ethernet TAP created with tunctl and controled with the eciadsl drivers. I tried with openvn at first but I then realized that it made the TAP device dependent on the openvpn daemon. Using tunctl is easier. You can either install uml-utilities available in the universe repository, or compile tunctl.c[1] and type a simple command[2].

    [1] gcc -O2 -s -o tunctl tunctl.c

    [2] sudo ./tunctl -u root tap0
    Last edited by GTvulse; January 13th, 2006 at 06:04 PM.

  10. #10
    Join Date
    Dec 2007
    Beans
    3

    Re: tun/tap on ubuntu

    Quote Originally Posted by sesquipedality View Post
    Thank you. I really didn't expect it to be that simple.
    didn't know that either

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •