mirror of
https://github.com/vernu/vps-audit.git
synced 2025-01-23 05:24:58 +03:00
improve script speed with -n option to iptables command
This commit is contained in:
parent
52bbc23605
commit
a6bc186e95
@ -178,7 +178,7 @@ check_firewall_status() {
|
|||||||
check_security "Firewall Status (firewalld)" "FAIL" "Firewalld is not active - your system is exposed to network attacks"
|
check_security "Firewall Status (firewalld)" "FAIL" "Firewalld is not active - your system is exposed to network attacks"
|
||||||
fi
|
fi
|
||||||
elif command -v iptables >/dev/null 2>&1; then
|
elif command -v iptables >/dev/null 2>&1; then
|
||||||
if iptables -L | grep -q "Chain INPUT"; then
|
if iptables -L -n | grep -q "Chain INPUT"; then
|
||||||
check_security "Firewall Status (iptables)" "PASS" "iptables rules are active and protecting your system"
|
check_security "Firewall Status (iptables)" "PASS" "iptables rules are active and protecting your system"
|
||||||
else
|
else
|
||||||
check_security "Firewall Status (iptables)" "FAIL" "No active iptables rules found - your system may be exposed"
|
check_security "Firewall Status (iptables)" "FAIL" "No active iptables rules found - your system may be exposed"
|
||||||
|
Loading…
Reference in New Issue
Block a user