Hello, I successfully set up a tunnel with tinc using the tun interface. however I need a tap device, because I need to run the OLSR routing protocol on the tunnel and if I use the tun mode OLSR will just skip the interface. (It is a well known thing, I had this issue before also when using OpenVPN in the past). The problem is that I cannot make tinc use a tap device. I created the tap0 interface with tunctl, however I have no tap0 characted device in /dev So in my tinc.conf a directive like: Device = /dev/tap0 makes no sense. If I don't give anyconfiguration tinc uses /dev/net/tun and sets up the VPN in tun mode without problems. DeviceType directive seems to be ignored on my Linux system (and it is ok on the documentation is says BSD only) I also tried to create my self the character device for tap0 with mknod like this: mknod /dev/tap0 c 36 16 it creates a node in /dev but still does not work. I have this output: tincd 1.0.11 (Jan 5 2010 14:34:19) starting, debug level 0 Could not open /dev/tap0: No such device or address Terminating please anybody is actually using tinc with a tap device? is there any template configuration file ? thanks Saverio
On Sat, Feb 20, 2010 at 09:31:36PM +0100, ZioPRoTo (Saverio Proto) wrote:> I successfully set up a tunnel with tinc using the tun interface. > > however I need a tap device, because I need to run the OLSR routing > protocol on the tunnel and if I use the tun mode OLSR will just skip > the interface. (It is a well known thing, I had this issue before also > when using OpenVPN in the past).On Linux, you only have /dev/net/tun. It can work both as a "tun" and as a "tap" device. Tinc will automatically use it in the tap mode when you use Mode = switch.> I created the tap0 interface with tunctl, however I have no tap0 > characted device in /devThere is only one /dev/net/tun file, but each program that opens it gets its own network interface, or if you use tunctl, it can access one you preconfigured.> So in my tinc.conf a directive like: > Device = /dev/tap0 > > makes no sense.No, if you want to use the tap0 interface, add the following to tinc.conf: Interface = tap0 If you do not specify Interface on Linux, tinc will use the netname as the name of the interface. -- Met vriendelijke groet / with kind regards, Guus Sliepen <guus at tinc-vpn.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20100220/33a9f02c/attachment.pgp>
> On Linux, you only have /dev/net/tun. It can work both as a "tun" and as a > "tap" device. Tinc will automatically use it in the tap mode when you use Mode > = switch.thanks ! I tried and it works ! What I was missing was "mode switch". I suggest to write a note here: http://www.tinc-vpn.org/documentation/tinc_4.html#Main-configuration-variables and specify that mode switch will enable the use of the tap Interface. Thank you very much ! Saverio