Weblog entry #2 for emeitner

Network Manager and Firestarter
Posted by emeitner on Tue 17 Jan 2006 at 23:31
Tags: none.

A quick little script to automatically enable Firestarter[1] when Network Manager[2] enables an interface. This is for Ubuntu/Breezy or bleeding edge Debian. Put it in /etc/NetworkManager/dispatcher.d

#!/bin/sh

source /etc/firestarter/configuration 2>&1

# Check to see if the interface that changed is the one currently
# protected by firestarter. If not, quit.
[ "$1" != "$IF" ] && exit

# Check the current status of Firestarter
[ -e /var/lock/subsys/firestarter -o -e /var/lock/firestarter ]
fs_status=$?

case "$2" in
        up)
                [ "$fs_status" -gt 0 ] && /etc/init.d/firestarter start
        ;;
        down)
                ## Uncomment the following line to allow this script to
                ## turn off the firewall when the interface goes down.
                #[ "$fs_status" -eq 0 ] && /etc/init.d/firestarter stop
        ;;
esac

By default it does not disable the firewall when the interface goes down because I prefer to do that myself. [1] http://packages.debian.org/stable/source/firestarter, http://fs-security.com/
[2] http://packages.debian.org/unstable/virtual/network-manager , http://www.gnome.org/projects/NetworkManager/

 

Comments on this Entry

Posted by sjpwong (59.167.xx.xx) on Wed 18 Jan 2006 at 02:00
[ Send Message ]
This is a good idea.

The only problem I can see (and regularly run into) is that firestarter deosn't seem to be configurable to use the default interface only explicit interfaces as the "untrusted" network interface.

Therefore, whenever I change interfaces I have problems until I remember to reconfigure firestarter.

[ Parent | Reply to this comment ]

Posted by emeitner (70.226.xx.xx) on Wed 18 Jan 2006 at 05:24
[ Send Message | View emeitner's Scratchpad | View Weblogs ]
Yes, that is a problem. For me my wireless is the only interface I need to use a firewall on. I look forward to the next release of Firestarter as it will add many needed features including multiple untrusted interfaces.
Of course, one can substitute any firewall start/stop script above.

[ Parent | Reply to this comment ]

Posted by emeitner (69.129.xx.xx) on Sat 22 Apr 2006 at 01:58
[ Send Message | View emeitner's Scratchpad | View Weblogs ]
It seems that under Ubuntu 6.06("Dapper Drake") you need to put the script here: /usr/share/NetworkManager/dispatcher.d/

[ Parent | Reply to this comment ]

Posted by Anonymous (96.242.xx.xx) on Thu 18 Sep 2008 at 17:26
I am fairly new to Linux, I am using Debian Etch, but seem to have the same problem with getting firestarter to start on boot. The question I have is, What do I save the script as? I mean what do I name it?

[ Parent | Reply to this comment ]

Posted by emeitner (96.60.xx.xx) on Fri 19 Sep 2008 at 02:36
[ Send Message | View emeitner's Scratchpad | View Weblogs ]
Doesn't matter too much. Something like "50firestarter" should work.

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search