mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-27 15:54:09 +02:00
nftables empy ruleset test fix by reorder --stateless
This commit is contained in:
parent
4de41543e6
commit
7849965d98
@ -506,7 +506,7 @@
|
|||||||
Register --test-no FIRE-4540 --os Linux --preqs-met ${PREQS_MET} --weight L --network NO --root-only YES --category security --description "Check for empty nftables configuration"
|
Register --test-no FIRE-4540 --os Linux --preqs-met ${PREQS_MET} --weight L --network NO --root-only YES --category security --description "Check for empty nftables configuration"
|
||||||
if [ ${SKIPTEST} -eq 0 ]; then
|
if [ ${SKIPTEST} -eq 0 ]; then
|
||||||
# Check for empty ruleset
|
# Check for empty ruleset
|
||||||
NFT_RULES_LENGTH=$(${NFTBINARY} list ruleset --stateless 2> /dev/null | ${EGREPBINARY} -v "table|chain|;$|}$|^$" | ${WCBINARY} -l)
|
NFT_RULES_LENGTH=$(${NFTBINARY} --stateless list ruleset 2> /dev/null | ${EGREPBINARY} -v "table|chain|;$|}$|^$" | ${WCBINARY} -l)
|
||||||
if [ ${NFT_RULES_LENGTH} -le 3 ]; then
|
if [ ${NFT_RULES_LENGTH} -le 3 ]; then
|
||||||
FIREWALL_EMPTY_RULESET=1
|
FIREWALL_EMPTY_RULESET=1
|
||||||
LogText "Result: this firewall set has 3 rules or less and is considered to be empty"
|
LogText "Result: this firewall set has 3 rules or less and is considered to be empty"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user