From 21e864132a9e900b7970eba1ae649469078426f3 Mon Sep 17 00:00:00 2001 From: bol-van Date: Sun, 12 Dec 2021 23:34:04 +0300 Subject: [PATCH] blockcheck: check ipfw disabled --- blockcheck.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/blockcheck.sh b/blockcheck.sh index e933594..1b1d95a 100755 --- a/blockcheck.sh +++ b/blockcheck.sh @@ -156,7 +156,7 @@ check_prerequisites() [ -x "$PKTWS" ] && [ -x "$TPWS" ] && [ -x "$MDIG" ] || { - echo $PKTWS or $TPWS or $MDIG is not available. run $ZAPRET_BASE/install_bin.sh or make -C \"$ZAPRET_BASE\" + echo $PKTWS or $TPWS or $MDIG is not available. run \"$ZAPRET_BASE/install_bin.sh\" or make -C \"$ZAPRET_BASE\" exitp 6 } @@ -171,6 +171,10 @@ check_prerequisites() echo ipfw or ipdivert kernel module not loaded exitp 6 } + [ "$(sysctl -qn net.inet.ip.fw.enable)" = 0 -o "$(sysctl -qn net.inet6.ip6.fw.enable)" = 0 ] && { + echo ipfw is disabled. use : ipfw enable firewall + exitp 6 + } ;; esac