Help needed with Tinc Setup on remote hosts and lots of ISPs / Failover Problems between ISPs

Guus Sliepen guus at tinc-vpn.org
Fri Apr 24 22:35:48 CEST 2015


On Fri, Apr 24, 2015 at 10:26:18PM +0200, Sven-Haegar Koch wrote:

> > #!/bin/sh
> > ifconfig $INTERFACE 10.96.x.y
> 
> Won't a netmask of 255.255.255.255 be better than not specifying any?
> Otherwise it falls back to old classful adressing and would assume
> 10.0.0.0/8 - which is clearly always wrong. [...] Or are tun devices
> different in this regard?

Hm, it seems that ifconfig indeed treats tun and tap differently, if you
don't specify a netmask it applies a /32 for tun interfaces and a /8 for
tap.

Iproute is better I guess:

#!/bin/sh
ip addr add 10.96.x.y dev $INTERFACE
ip link set dev $INTERFACE up

> > Then, assuming you run tinc in router Mode (the default), you should
> > create a script named "subnet-up" in the same directory as tinc-up, and
> > put this in it:
> > 
> > #!/bin/sh
> > ip addr add $SUBNET dev $INTERFACE
> > 
> > And a "subnet-down" script:
> > 
> > #!/bin/sh
> > ip addr del $SUBNET dev $INTERFACE
> 
> Don't you mean "ip route add/del" here?

Yes, thanks for correcting me.

-- 
Met vriendelijke groet / with kind regards,
     Guus Sliepen <guus at tinc-vpn.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20150424/67e27feb/attachment-0001.sig>


More information about the tinc mailing list