Advanced network configuration in Debian

I spent a fair amount of time in the last couple of days trying to do some fairly advanced configuration of network interfaces on a couple of Ubuntu boxes today. Basically the Debian package ifup when run will run every script in /etc/network/if-up.d/ it set’s the environment variable IFACE for each script while doing this. This means if you want to run a script only when one interface comes up, (possibly for a firewall) you can use the line in your script

if [ "$IFACE" = "eth0" ]; then


As a side note, the reason I’m using Ubuntu for these machines is it’s reasonably fast development cycle and it’s Debian underpinnings. Packages like ifup are part of this, it works exceptionally well and is reasonably easy to use, the biggest problem however is it’s documentation. Nowhere in the man files or on a few searches of the net could I find this information.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>