Debian: Automatic installation of an fwbuilder script

To avoid losing the overview with several Debian servers, which work as an internal firewall, I use the fwbuilder.

http://www.fwbuilder.org/

So that the firewall rules after a reboot are loaded automatically I use the following script:

root@debian-iptables1 ~ # cat /etc/init.d/fwbuilder
#! /bin/sh
### BEGIN INIT INFO
# Provides: fwbuilder_script
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Installs iptables script by Fwbuilder
### END INIT INFO

#Filename needs to be customized depends on the file name in the FWbuilder
/etc/Debian-iptables1u.fw

The next 2 commands ensure that the script is executable and is automatically started to the appropriate runlevel.

root@debian-iptables1 ~ # chmod +x /etc/init.d/fwbuilder
root@debian-iptables1 ~ # insserv fwbuilder

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s