From a6bc186e9556fecf8f191c44c7eab4594cfecd8a Mon Sep 17 00:00:00 2001 From: alvarosaavedrau Date: Sat, 11 Jan 2025 19:29:15 +0100 Subject: [PATCH] improve script speed with -n option to iptables command --- vps-audit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vps-audit.sh b/vps-audit.sh index b86c5c3..5971817 100755 --- a/vps-audit.sh +++ b/vps-audit.sh @@ -178,7 +178,7 @@ check_firewall_status() { check_security "Firewall Status (firewalld)" "FAIL" "Firewalld is not active - your system is exposed to network attacks" fi 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" else check_security "Firewall Status (iptables)" "FAIL" "No active iptables rules found - your system may be exposed"