Doesn't work with Linux Kernel >= 3.0
This tool locks down Linux and UNIX systems.
Brought to you by:
jay
You check if you should use ipchains or netfilter by looking up at the kernel version. Here's your code:
if [ -n "$(uname -r | awk -F. ' $1 == 2 && $2 > 2 {print}')" ]; then
# We are using Linux 2.3 or newer; use the netfilter script if available
The idea would be "if version >= 2.3", but you're actually doing "if verstion >= 2.3 && version is 2.x", so bastille doesn't work with kernel >= 3.0...
Here's a patch to fix this:
--- bastille-firewall 2005-04-06 00:18:11.000000000 +0100
+++ bastille-firewall-new 2011-10-19 12:33:30.000000000 +0100
@@ -64,7 +64,7 @@
exit 1
fi
-if [ -n "$(uname -r | awk -F. ' $1 == 2 && $2 > 2 {print}')" ]; then
+if [ -n "$(uname -r | awk -F. ' $1$2 > 22 {print}')" ]; then
# We are using Linux 2.3 or newer; use the netfilter script if available
if [ -x /sbin/bastille-netfilter ]; then
REALSCRIPT=/sbin/bastille-netfilter