You have to create tap0 and tap1 with ip-address 0.0.0.0 and bridge the 
two devices together.

Note: do you really need a such big 255.240.0.0 network?

First of all, modifiy your vtun startup script on your Gentoo-Box:

Before start VTUN create a network-bridge.

--- SNIP init.d/vtund ---

/sbin/brctl addbr vpnbr
/sbin/ip link set dev vpnbr up
/sbin/ip addr add 172.16.0.1/12 brd + dev vpnbr
/sbin/vtund -s -f /etc/vtund.conf

--- SNAP init.d/vtund ---

--- SNIP vtund.conf ---

up
{
        program "/sbin/ip link set dev %% up";
        program "/sbin/ip addr add 0.0.0.0 dev %%";
        program "/sbin/brctl addif vpnbr %%";
};

down
{
        program "/sbin/brctl delif vpnbr %%";
};

--- SNAP vtund.conf ---

This code was written out of my mind. Perhaps you have to modify the code. But 
this is the theoretical way to connect all tun-devices without routing.

On your server-config-file please change multi from yes to killold to prevent 
some strange problems.


Liebe Grüße aus Freilassing,

Michael Rack
RSM Freilassing
-- 
RSM Freilassing                 Tel.: +49 8654 607110
Nocksteinstr. 13                Fax.: +49 8654 670438
D-83395 Freilassing            www.rsm-freilassing.de


Am 10.12.2009 14:45, schrieb dorian:
> Hello all,
> I am quite new user of the vtun software and I found the following problem.
> I have 2 Linksys boxes (OpenWrt, WhiteRussian 0.9) configured as vtun
> clients and one Linux box (Gentoo) working as vtun server.
>
> What I need is to connect both Linksys boxes and PC in _ONE_ network.
>
> The simplest what I hit on was to create tunnel from Linksys1 to server
> and next from Linksys2 to server using the same TAP device.
>
> But I have found the problem with second tunnel:
> "Can't allocate tap device tap0. Device or resource busy(16)".
>
>
> Of course if I create tunnels using tap0 and tap1 (for each Linksys
> devices) everything is ok.
>
> But this in not what I would like to have since the second TAP needs
> another IP (and extra routing rules).
>
> I would like to have:
> - Linksys1 working with address 172.16.0.2
> - Linksys2 working with address 172.16.0.3
> - and the server having address 192.16.0.1
>
> Is it possible?
>
> Any suggestions will be appreciated.
>
> ---------------------
> The part of my server config is:
> MYSESSION {
>
>    type  ether;          # Ethernet tunnel (required)
>    device tap0;
>    proto tcp;            # TCP since Linksys boxes are behind firewall
>    compress no;
>    encrypt  yes;
>    stat  yes;
>    keepalive yes;
>    multi yes;
>
>    up {
>        ifconfig "%% 172.16.0.1 netmask 255.240.0.0";
>      };
> }
>
> Client's configs are the same.
> First Linksys local IP is 172.16.0.2 and the second one 172.16.0.3
> ----------------------
>
> Regards,
> Dorian
>
>
> ------------------------------------------------------------------------------
> Return on Information:
> Google Enterprise Search pays you back
> Get the facts.
> http://p.sf.net/sfu/google-dev2dev
> _______________________________________________
> Vtun-Users mailing list
> Vtun-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/vtun-users

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Vtun-Users mailing list
Vtun-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vtun-users

Reply via email to