[clug] Network "profiles" and locations
Sam Couter
sam at couter.id.au
Sun Aug 21 16:19:17 MDT 2011
Adam Baxter <voltagex at voltagex.org> wrote:
> Is anyone doing "location aware" network configuration?
I do, to determine which OpenVPN configuration should be started.
> I'm thinking of the following:
> * Laptop has been assigned an IP in the 10.0.0.0/24 range, I must be
> at home. Otherwise I'm out, change/disable my /etc/apt/sources.list to
> not use my local mirror
> * Laptop has been assigned a public IP via ppp0, I'm on GPRS, disable
> all chatty services to conserve bandwidth
> * Laptop has been assigned an IP in the 172.0.0.0/24 range, I'm at
> work, change my homepage
> ...and so on.
>
> I think Network Manager does some of this, but I'm thinking about
> doing it via ifup/down.
ifup/ifdown will run scripts in several directories in /etc/network. The
most interesting directories are if-up.d and if-post-down.d to take action
after the interface is up or down.
The scripts have access to the interface configuration in
/etc/network/interfaces through environment variables. man interfaces for
all the details.
--
Sam Couter | mailto:sam at couter.id.au
OpenPGP fingerprint: A46B 9BB5 3148 7BEA 1F05 5BD5 8530 03AE DE89 C75C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/linux/attachments/20110822/f2dd8485/attachment.pgp>
More information about the linux
mailing list