Changing interface based on network availability

Andrew Cowie andrew at operationaldynamics.com
Wed Jun 27 08:36:48 CEST 2012


Is there a way to have tinc change the interface according to whether it
thinks it is successfully connected to a [external] next hop?

We've got a problem where the tinc provided tun0 is sitting there
(obviously not going anywhere because there's no uplink via eth0 or
whatever anymore after a suspend/resume cycle & having moved locations)
but various programs see that as "an interface" and think they can
connect through it to get to the internet; result is numerous
"connection failed" type error popups from those applications.

I'm trying to find out if I can teach those programs to ignore tun0, but
meanwhile can anyone suggest an ifconfig parameter change that might
make tun0 look less appealing? Failing that, is there something tinc
itself could do as the mesh comes and goes?

I'm sure typing

# ifconfig tun0 down

would do the trick, but presumably we want something a touch more
elegant — and automatic — than that.

AfC
Sydney




-- 
Andrew Frederick Cowie
Consulting Engineer
Operational Dynamics Consulting, Pty Ltd



More information about the tinc mailing list