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

init.d script for iptables ruleset

Hello --

I guess this is the right place to dump an idea, right ?

Here it goes. I wondered about a clever way to load my iptables ruleset via
init.d's script. Surprisingly, I didn't find any with Debian. I didn't search
that much though.

I just wrote one that please me and will dump it here so that it might please
others too.

Basically, /etc/init.d/iptables parses the ruleset defined in

Into that ruleset, you can define variables, configure some sysctl values,
load kernel modules, and, obviously, declare some filtering rules using
defined variables..

Not tested with other shells than bash.

Script and sample ruleset file are attached.

Hope this can be usefull.


Attachment: iptables
Description: Binary data

Attachment: ruleset
Description: Binary data

Reply to: