Merge pull request #20 from aafmj/fix-check-ufw-activeness

fix check status of ufw
This commit is contained in:
Israel Abebe 2025-01-10 22:54:39 +03:00 committed by GitHub
commit 6ae89e1bdd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -166,7 +166,7 @@ fi
# Check Firewall Status
check_firewall_status() {
if command -v ufw >/dev/null 2>&1; then
if ufw status | grep -q "active"; then
if ufw status | grep -qw "active"; then
check_security "Firewall Status (UFW)" "PASS" "UFW firewall is active and protecting your system"
else
check_security "Firewall Status (UFW)" "FAIL" "UFW firewall is not active - your system is exposed to network attacks"