[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: IP/IP and IPv6/IP tunnels and dynamic IP address



On Thu, Jun 27, 2013 at 01:16:44PM +0200, Urs Thuermann wrote:
> My ISP provides a single, dynamic IPv4 address to me.  I have
> configured several tunnels, IPv4 in IPv4 and IPv6 in IPv4, to several
> sites.  This is running on a very old Linux installation and I want to
> move that to a Debian system.
> 
> I know how to set up /etc/network/interfaces for such tunnels if the
> IPv4 address is static.  However, with dynamic IPv4 address you do not
> only needed ifup <tunnel> and ifdown <tunnel> but also a way to update
> the remote tunnel configuration when the local IPv4 address changes.
> E.g. for Hurricane Electric tunnel broker you access a certain URL
> (using e.g. wget) where the URL encodes your current IPv4 address.  At
> another site I need to execute a command using ssh.
> 
> I know how I can do that using cron and/or pppd configs.  But I'd like
> to know if Debian has some standard way to update tunnel configs,
> preferrably in /etc/network/interfaces with the rest of the interface
> definition.

If the local address only changes on ifup/ifdown, then you can
add a preup or postup command to each interface that will run
an arbitrary command.

If the local address is controlled by a DHCP client, consult
your DHCP client's man pages for a script that can be run
post-change.

-dsr-


Reply to: