#155 Doesn't work with Linux Kernel >= 3.0

open
nobody
None
9
2011-10-19
2011-10-19
No

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...

Discussion

    • priority: 5 --> 9
     
  • 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