2014-08-26 17:33:55 +02:00
#!/bin/sh
#################################################################################
#
# Lynis
# ------------------
#
2016-03-13 16:00:39 +01:00
# Copyright 2007-2013, Michael Boelen
# Copyright 2013-2016, CISOfy
#
# Website : https://cisofy.com
# Blog : http://linux-audit.com
# GitHub : https://github.com/CISOfy/lynis
2014-08-26 17:33:55 +02:00
#
# Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
# welcome to redistribute it under the terms of the GNU General Public License.
# See LICENSE file for usage of this software.
#
#################################################################################
#
# Firewalls
#
#################################################################################
#
InsertSection "Software: firewalls"
#
#################################################################################
#
IPTABLES_ACTIVE=0
IPTABLES_INKERNEL_ACTIVE=0
IPTABLES_MODULE_ACTIVE=0
FIREWALL_ACTIVE=0
2015-12-30 14:33:50 +01:00
FIREWALL_EMPTY_RULESET=0
2014-08-26 17:33:55 +02:00
FIREWALL_SOFTWARE=""
2015-12-30 14:33:50 +01:00
NFTABLES_ACTIVE=0
2014-08-26 17:33:55 +02:00
#
#################################################################################
#
2015-12-30 14:33:50 +01:00
# Test : FIRE-4502
2014-08-26 17:33:55 +02:00
# Description : Check iptables kernel module
2015-12-30 14:33:50 +01:00
Register --test-no FIRE-4502 --os Linux --weight L --network NO --description "Check iptables kernel module"
2014-08-26 17:33:55 +02:00
if [ ${SKIPTEST} -eq 0 ]; then
FIND=`lsmod | awk '{ print $1 }' | grep "^ip*_tables"`
if [ ! "${FIND}" = "" ]; then
FIREWALL_ACTIVE=1
FIREWALL_SOFTWARE="iptables"
IPTABLES_ACTIVE=1
IPTABLES_MODULE_ACTIVE=1
Display --indent 2 --text "- Checking iptables kernel module" --result FOUND --color GREEN
2015-12-21 21:17:15 +01:00
LogText "Result: Found iptables in loaded kernel modules"
2014-08-26 17:33:55 +02:00
for I in ${FIND}; do
2015-12-21 21:17:15 +01:00
LogText "Found module: ${I}"
2014-08-26 17:33:55 +02:00
done
else
Display --indent 2 --text "- Checking iptables kernel module" --result "NOT FOUND" --color WHITE
# If we can't find an active module, try to find the Linux configuration file and check that
if [ -f /proc/config.gz ]; then
LINUXCONFIGFILE="/proc/config.gz"; tCATCMD="zcat";
fi
sLINUXCONFIGFILE="/boot/config-`uname -r`"
if [ -f ${sLINUXCONFIGFILE} ]; then
LINUXCONFIGFILE=${sLINUXCONFIGFILE}; tCATCMD="cat";
fi
# If we have a kernel configuration file, use it for testing
# Do not perform test if we already found it in kernel module list, to avoid triggered it in the upcoming
# tests, when using iptables --list
2014-10-30 18:09:47 +01:00
if [ ! "${LINUXCONFIGFILE}" = "" ]; then
if [ -f ${LINUXCONFIGFILE} -a ${IPTABLES_MODULE_ACTIVE} -eq 0 ]; then
2015-12-21 21:17:15 +01:00
LogText "Result: found kernel configuration file (${LINUXCONFIGFILE})"
2014-10-30 18:09:47 +01:00
FIND=`${tCATCMD} ${LINUXCONFIGFILE} | grep -v '^#' | grep "CONFIG_IP_NF_IPTABLES" | head -n 1`
if [ ! "${FIND}" = "" ]; then
HAVEMOD=`echo ${FIND} | cut -d '=' -f2`
# Do not use iptables if it's compiled as a module (=m), since we already tested for it in the
# active list.
if [ "${HAVEMOD}" = "y" ]; then
2015-12-21 21:17:15 +01:00
LogText "Result: iptables available as a module in the configuration"
2014-10-30 18:09:47 +01:00
IPTABLES_ACTIVE=1
IPTABLES_INKERNEL_ACTIVE=1
FIREWALL_ACTIVE=1
FIREWALL_SOFTWARE="iptables"
Display --indent 2 --text "- Checking iptables in config file" --result FOUND --color GREEN
else
2015-12-21 21:17:15 +01:00
LogText "Result: no iptables found in Linux kernel config file"
2014-10-30 18:09:47 +01:00
fi
2014-08-26 17:33:55 +02:00
else
2015-12-21 21:17:15 +01:00
LogText "Result: no Linux configuration file found"
2014-10-30 18:09:47 +01:00
Display --indent 2 --text "- Checking iptables in config file" --result "NOT FOUND" --color WHITE
2014-08-26 17:33:55 +02:00
fi
fi
fi
fi
fi
#
#################################################################################
2015-12-30 14:33:50 +01:00
#
# Test : FIRE-4508
# Description : Check iptables chain policies
# Notes : Suggestions are currently disabled, until related page and documentation is available
if [ ! "${IPTABLESBINARY}" = "" -a ${IPTABLES_ACTIVE} -eq 1 ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no FIRE-4508 --preqs-met ${PREQS_MET} --os Linux --weight L --network NO --root-only YES --description "Check used policies of iptables chains"
if [ ${SKIPTEST} -eq 0 ]; then
Display --indent 4 --text "- Checking iptables policies of chains" --result FOUND --color GREEN
TABLES="filter"
for TABLE in ${TABLES}; do
LogText "Test: gathering information from table ${TABLE}"
FIND="$FIND""\n"`${IPTABLESBINARY} -t ${TABLE} --numeric --list | egrep -z -o -w '[A-Z]+' | awk -v t=${TABLE} 'NR%2 {printf "%s %s ",t, $0 ; next;}1'`
done
echo "${FIND}" | while read line; do
table=`echo ${line} | awk '{ print $1 }'`
chainname=`echo ${line} | awk '{ print $2 }'`
policy=`echo ${line} | awk '{ print $3 }'`
LogText "Result: iptables ${table} -- ${chainname} policy is ${policy}."
LogText "Result: ${policy}"
if [ "${TABLE}" = "filter" ]; then
if [ "${chainname}" = "INPUT" ]; then
case ${policy} in
"ACCEPT")
LogText "Result: Found ACCEPT for ${chainname} (table: ${table})"
Display --indent 6 --text "- Checking chain ${chainname} (table: ${table}) policy" --result ${policy} --color YELLOW
#ReportSuggestion ${TEST_NO} "Consider settings default chain policy to DROP (iptables chain ${chainname}, table: ${table})"
AddHP 1 3
;;
"DROP")
LogText "Result: Found DROP for ${chainname} (table: ${table})"
Display --indent 6 --text "- Checking chain ${chainname} (table: ${table}) policy" --result ${policy} --color GREEN
AddHP 3 3
;;
*)
Display --indent 6 --text "- Checking chain ${chainname} (table: ${table}) policy" --result ${policy} --color YELLOW
LogText "Result: Unknown policy: ${policy}"
#ReportSuggestion ${TEST_NO} "Check iptables ${chainname} (table: ${table}) chain policy"
;;
esac
fi
fi
done
fi
#
#################################################################################
2014-08-26 17:33:55 +02:00
#
# Test : FIRE-4512
2015-12-02 16:55:41 +01:00
# Description : Check iptables for empty ruleset (should have at least 10 or more rules)
2014-08-26 17:33:55 +02:00
if [ ! "${IPTABLESBINARY}" = "" -a ${IPTABLES_ACTIVE} -eq 1 ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
2014-09-08 15:41:57 +02:00
Register --test-no FIRE-4512 --preqs-met ${PREQS_MET} --os Linux --weight L --network NO --root-only YES --description "Check iptables for empty ruleset"
2014-08-26 17:33:55 +02:00
if [ ${SKIPTEST} -eq 0 ]; then
2015-12-02 16:55:41 +01:00
FIND=`${IPTABLESBINARY} --list --numeric 2> /dev/null | egrep -v "^(Chain|target|$)" | wc -l | tr -d ' '`
if [ ! "${FIND}" = "" ]; then
2014-08-26 17:33:55 +02:00
FIREWALL_ACTIVE=1
2015-12-02 16:55:41 +01:00
if [ ${FIND} -le 10 ]; then
# Firewall is active, but clearly needs configuration
2015-12-30 14:33:50 +01:00
FIREWALL_EMPTY_RULESET=1
2015-12-21 21:17:15 +01:00
LogText "Result: iptables ruleset seems to be empty (found ${FIND} rules)"
2015-12-02 16:55:41 +01:00
Display --indent 4 --text "- Checking for empty ruleset" --result WARNING --color RED
ReportWarning ${TEST_NO} "L" "iptables module(s) loaded, but no rules active"
else
2015-12-21 21:17:15 +01:00
LogText "Result: one or more rules are available (${FIND} rules)"
2015-12-02 16:55:41 +01:00
Display --indent 4 --text "- Checking for empty ruleset" --result OK --color GREEN
fi
2014-08-26 17:33:55 +02:00
fi
fi
#
#################################################################################
#
# Test : FIRE-4513
# Description : Check iptables for unused rules
if [ ! "${IPTABLESBINARY}" = "" -a ${IPTABLES_ACTIVE} -eq 1 ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
2014-09-08 15:41:57 +02:00
Register --test-no FIRE-4513 --preqs-met ${PREQS_MET} --os Linux --weight L --network NO --root-only YES --description "Check iptables for unused rules"
2014-08-26 17:33:55 +02:00
if [ ${SKIPTEST} -eq 0 ]; then
FIND=`${IPTABLESBINARY} --list --numeric --line-numbers --verbose | awk '{ if ($2=="0") print $1 }' | xargs`
if [ "${FIND}" = "" ]; then
Display --indent 4 --text "- Checking for unused rules" --result OK --color GREEN
2015-12-21 21:17:15 +01:00
LogText "Result: There are no unused rules present"
2014-08-26 17:33:55 +02:00
else
2015-09-01 15:50:14 +02:00
Display --indent 4 --text "- Checking for unused rules" --result FOUND --color YELLOW
2015-12-21 21:17:15 +01:00
LogText "Result: Found one or more possible unused rules"
LogText "Description: Unused rules can be a sign that the firewall rules aren't optimized or up-to-date"
LogText "Note: Sometimes rules aren't triggered but still in use. Keep this in mind before cleaning up rules."
LogText "Output: iptables rule numbers: ${FIND}"
2014-08-26 17:33:55 +02:00
#ReportWarning ${TEST_NO} "L" "Found possible unused iptables rules ($FIND)"
ReportSuggestion ${TEST_NO} "Check iptables rules to see which rules are currently not used"
2015-12-21 21:17:15 +01:00
LogText "Tip: iptables --list --numeric --line-numbers --verbose"
2014-08-26 17:33:55 +02:00
fi
fi
#
#################################################################################
#
# Test : FIRE-4518
# Description : Checking status of pf firewall components
Register --test-no FIRE-4518 --weight L --network NO --description "Check pf firewall components"
if [ ${SKIPTEST} -eq 0 ]; then
PFFOUND=0; PFLOGDFOUND=0
# Check status with pfctl
2015-12-21 21:17:15 +01:00
LogText "Test: checking pf status via pfctl"
2015-04-07 17:19:49 +02:00
if [ ! "${PFCTLBINARY}" = "" ]; then
2014-08-26 17:33:55 +02:00
FIND=`${PFCTLBINARY} -sa 2>&1 | grep "^Status" | head -1 | awk '{ print $2 }'`
if [ "${FIND}" = "Enabled" ]; then
Display --indent 2 --text "- Checking pf status (pfctl)" --result ENABLED --color GREEN
2015-12-21 21:17:15 +01:00
LogText "Result: pf is enabled"
2014-08-26 17:33:55 +02:00
PFFOUND=1
AddHP 3 3
else
if [ "${FIND}" = "Disabled" ]; then
Display --indent 2 --text "- Checking pf status (pfctl)" --result DISABLED --color RED
2015-12-21 21:17:15 +01:00
LogText "Result: pf is disabled"
2014-08-26 17:33:55 +02:00
AddHP 0 3
else
Display --indent 2 --text "- Checking pf status (pfctl)" --result UNKNOWN --color YELLOW
ReportException ${TEST_NO} "Unknown status of pf firewall"
fi
fi
fi
# If we didn't find the status to be enabled, stop searching
2015-04-07 17:19:49 +02:00
if [ ${PFFOUND} -eq 0 ]; then
2014-08-26 17:33:55 +02:00
# Check for pf kernel module (FreeBSD and similar)
2015-12-21 21:17:15 +01:00
LogText "Test: searching for pf kernel module"
2014-08-26 17:33:55 +02:00
if [ ! "${KLDSTATBINARY}" = "" ]; then
FIND=`${KLDSTATBINARY} | grep 'pf.ko'`
if [ "${FIND}" = "" ]; then
2015-12-21 21:17:15 +01:00
LogText "Result: Can not find pf KLD"
2014-08-26 17:33:55 +02:00
else
2015-12-21 21:17:15 +01:00
LogText "Result: pf KLD loaded"
2014-08-26 17:33:55 +02:00
PFFOUND=1
fi
else
2015-12-21 21:17:15 +01:00
LogText "Result: no kldstat binary, skipping this part"
2014-08-26 17:33:55 +02:00
fi
IsRunning pflogd
if [ ${RUNNING} -eq 1 ]; then
2015-12-21 21:17:15 +01:00
LogText "Result: found pflog daemon in process list"
2014-08-26 17:33:55 +02:00
Display --indent 4 --text "- Checking pflogd status" --result ACTIVE --color GREEN
PFFOUND=1
PFLOGDFOUND=1
else
2015-12-21 21:17:15 +01:00
LogText "Result: pflog daemon not found in process list"
2014-08-26 17:33:55 +02:00
fi
fi
if [ ${PFFOUND} -eq 1 ]; then
FIREWALL_ACTIVE=1
FIREWALL_SOFTWARE="pf"
else
2015-12-21 21:17:15 +01:00
LogText "Result: pf not running on this system"
2014-08-26 17:33:55 +02:00
fi
fi
#
#################################################################################
#
# Test : FIRE-4520
# Description : Check pf configuration consistency
if [ ${PFFOUND} -eq 1 ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no FIRE-4520 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check pf configuration consistency"
if [ ${SKIPTEST} -eq 0 ]; then
2015-12-21 21:17:15 +01:00
LogText "Test: check /etc/pf.conf"
2014-08-26 17:33:55 +02:00
# Test for warnings (-n don't load the rules)
if [ -f /etc/pf.conf ]; then
2015-12-21 21:17:15 +01:00
LogText "Result: /etc/pf.conf exists"
2014-08-26 17:33:55 +02:00
# Check results from pfctl
PFWARNINGS=`pfctl -n -f /etc/pf.conf -vvv 2>&1 | grep -i 'warning'`
if [ "${PFWARNINGS}" = "" ]; then
Display --indent 4 --text "- Checking pf configuration consistency" --result OK --color GREEN
2015-12-21 21:17:15 +01:00
LogText "Result: no pf filter warnings found"
2014-08-26 17:33:55 +02:00
else
Display --indent 4 --text "- Checking pf configuration consistency" --result WARNING --color RED
2015-12-21 21:17:15 +01:00
LogText "Result: found one or more warnings in the pf filter rules"
2014-08-26 17:33:55 +02:00
ReportWarning ${TEST_NO} "H" "Found one or more warnings in pf configuration file"
ReportSuggestion ${TEST_NO} "Run 'pfctl -n -f /etc/pf.conf -vvv' to see available pf warnings"
fi
else
2015-12-21 21:17:15 +01:00
LogText "Result: /etc/pf.conf does NOT exist"
2014-08-26 17:33:55 +02:00
fi
fi
#
#################################################################################
#
# Test : FIRE-4522
# Description : Check ipchains
#
#################################################################################
2015-03-17 18:06:00 +01:00
#
# Test : FIRE-4524
# Description : Check for CSF (ConfigServer Security & Firewall)
Register --test-no FIRE-4524 --weight L --network NO --description "Check for CSF presence"
if [ ${SKIPTEST} -eq 0 ]; then
2015-03-18 10:40:59 +01:00
FILE="/etc/csf/csf.conf"
2015-12-21 21:17:15 +01:00
LogText "Test: check ${FILE}"
2015-03-18 10:40:59 +01:00
if [ -f ${FILE} ]; then
2015-12-21 21:17:15 +01:00
LogText "Result: ${FILE} exists"
2015-03-17 18:06:00 +01:00
FIREWALL_ACTIVE=1
FIREWALL_SOFTWARE="csf"
Display --indent 2 --text "- Checking CSF status (configuration file)" --result FOUND --color GREEN
else
2015-12-21 21:17:15 +01:00
LogText "Result: ${FILE} does NOT exist"
2015-03-17 18:06:00 +01:00
fi
fi
#
#################################################################################
2014-08-26 17:33:55 +02:00
#
# Test : FIRE-4526
# Description : Check ipf (Solaris)
if [ ! "${IPFBINARY}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no FIRE-4526 --os Solaris --preqs-met ${PREQS_MET} --weight L --network NO --description "Check ipf status"
if [ ${SKIPTEST} -eq 0 ]; then
FIND=`${IPFBINARY} -n -V | grep "^Running" | awk '{ print $2 }'`
if [ "${FIND}" = "yes" ]; then
Display --indent 4 --text "- Checking ipf status" --result RUNNING --color GREEN
2015-12-21 21:17:15 +01:00
LogText "Result: ipf is enabled and running"
2014-08-26 17:33:55 +02:00
FIREWALL_ACTIVE=1
FIREWALL_SOFTWARE="ipf"
else
Display --indent 4 --text "- Checking ipf status" --result "NOT RUNNING" --color YELLOW
2015-12-21 21:17:15 +01:00
LogText "Result: ipf is not running"
2014-08-26 17:33:55 +02:00
fi
fi
#
#################################################################################
#
# Test : FIRE-4530
2015-09-06 17:42:56 +02:00
# Description : Check IPFW (FreeBSD)
Register --test-no FIRE-4530 --os FreeBSD --weight L --network NO --description "Check IPFW status"
2015-04-27 18:26:39 +02:00
if [ ${SKIPTEST} -eq 0 ]; then
if [ ! "${SYSCTLBINARY}" = "" ]; then
# For now, only check for IPv4.
FIND=`${SYSCTLBINARY} net.inet.ip.fw.enable | awk '{ print $2 }'`
if [ "${FIND}" = "1" ]; then
2015-09-06 17:42:56 +02:00
Display --indent 2 --text "- Checking IPFW status" --result RUNNING --color GREEN
2015-12-21 21:17:15 +01:00
LogText "Result: IPFW is running for IPv4"
2015-04-27 18:26:39 +02:00
FIREWALL_ACTIVE=1
FIREWALL_SOFTWARE="ipfw"
IPFW_ENABLED=`service -e | grep -o ipfw`
if [ "${IPFW_ENABLED}" = "ipfw" ]; then
2015-09-06 17:42:56 +02:00
Display --indent 4 --text "- IPFW enabled in /etc/rc.conf" --result YES --color GREEN
2015-12-21 21:17:15 +01:00
LogText "Result: IPFW is enabled at start-up for IPv4"
2015-04-27 18:26:39 +02:00
else
Display --indent 4 --text "- ipfw enabled in /etc/rc.conf" --result NO --color YELLOW
2015-12-21 21:17:15 +01:00
LogText "Result: IPFW is disabled at start-up for IPv4"
2015-04-27 18:26:39 +02:00
fi
2015-04-27 12:00:58 +02:00
else
2015-09-06 17:42:56 +02:00
Display --indent 2 --text "- Checking IPFW status" --result "NOT RUNNING" --color YELLOW
2015-12-21 21:17:15 +01:00
LogText "Result: IPFW is not running for IPv4"
2015-04-27 12:00:58 +02:00
fi
2015-04-27 18:26:39 +02:00
else
2015-09-06 17:42:56 +02:00
Display --indent 2 --text "- Checking IPFW" --result SKIPPED --color YELLOW
ReportException "${TEST_NO}:1" "No IPFW test available (sysctl missing)"
2015-04-27 11:32:09 +02:00
fi
fi
2014-08-26 17:33:55 +02:00
#
#################################################################################
2015-12-02 17:37:58 +01:00
#
# Test : FIRE-4532
# Description : Check Application Firewall in Mac OS X
if [ -x /usr/libexec/ApplicationFirewall/socketfilterfw ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no FIRE-4532 --weight L --os "MacOS" --preqs-met ${PREQS_MET} --network NO --description "Check Mac OS X application firewall"
if [ ${SKIPTEST} -eq 0 ]; then
2015-12-02 17:50:35 +01:00
FIND=`/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate 2> /dev/null | grep "Firewall is enabled"`
2015-12-02 17:37:58 +01:00
if [ ! "${FIND}" = "" ]; then
Display --indent 2 --text "- Checking Mac OS X: Application Firewall" --result ENABLED --color GREEN
AddHP 3 3
2015-12-21 21:17:15 +01:00
LogText "Result: application firewall of Mac OS X is enabled"
2015-12-02 17:37:58 +01:00
APPLICATION_FIREWALL_ACTIVE=1
2015-12-21 21:17:15 +01:00
Report "app_fw[]=macosx-app-fw"
2015-12-02 17:37:58 +01:00
else
Display --indent 2 --text "- Checking IPFW" --result DISABLED --color YELLOW
AddHP 1 3
2015-12-21 21:17:15 +01:00
LogText "Result: application firewall of Mac OS X is disabled"
2015-12-02 17:37:58 +01:00
fi
fi
#
#################################################################################
2015-12-30 14:33:50 +01:00
#
# Test : FIRE-4536
# Description : Check nftables kernel module
if [ ! "${NFTBINARY}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no FIRE-4536 --os Linux --preqs-met ${PREQS_MET} --weight L --network NO --description "Check nftables status"
if [ ${SKIPTEST} -eq 0 ]; then
FIND=`lsmod | awk '{ print $1 }' | grep "^nf*_tables"`
if [ ! "${FIND}" = "" ]; then
FIREWALL_SOFTWARE="nftables"
NFTABLES_ACTIVE=1
fi
fi
#
#################################################################################
#
# Test : FIRE-4538
# Description : Check nftables configuration
if [ ! "${NFTBINARY}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no FIRE-4538 --os Linux --preqs-met ${PREQS_MET} --weight L --network NO --description "Check nftables basic configuration"
if [ ${SKIPTEST} -eq 0 ]; then
# Retrieve nft version
NFT_VERSION=`${NFTBINARY} --version 2> /dev/null | ${AWKBINARY} '{ if ($1=="nftables") { print $2 }}' | tr -d 'v'`
report "nft_version=${NFT_VERSION}"
# Check for empty ruleset
NFT_RULES_LENGTH=`${NFTBINARY} export json 2> /dev/null | wc -c`
if [ ${NFT_RULES_LENGTH} -le 16 ]; then
FIREWALL_EMPTY_RULESET=1
fi
# Ideas:
# Suggestion to disable iptables if nftables is enabled
# Check for specific features in nftables releases
fi
#
#################################################################################
2014-08-26 17:33:55 +02:00
#
# Test : FIRE-4590
# Description : Check if at least one firewall if active
Register --test-no FIRE-4590 --weight L --network NO --description "Check firewall status"
if [ ${SKIPTEST} -eq 0 ]; then
if [ ${FIREWALL_ACTIVE} -eq 1 ]; then
Display --indent 2 --text "- Checking host based firewall" --result ACTIVE --color GREEN
2015-12-21 21:17:15 +01:00
LogText "Result: host based firewall or packet filter is active"
Report "manual[]=Verify if there is a formal process for testing and applying firewall rules"
Report "manual[]=Verify all traffic is filtered the right way between the different security zones"
Report "manual[]=Verify if a list is available with all required services"
2014-08-26 17:33:55 +02:00
# YYY Solaris ipf (determine default policy)
2015-12-21 21:17:15 +01:00
Report "manual[]=Make sure an explicit deny all is the default policy for all unmatched traffic"
2014-08-26 17:33:55 +02:00
AddHP 5 5
else
Display --indent 2 --text "- Checking host based firewall" --result "NOT ACTIVE" --color YELLOW
2015-12-21 21:17:15 +01:00
LogText "Result: no host based firewall/packet filter found or configured"
2014-08-26 17:33:55 +02:00
ReportSuggestion ${TEST_NO} "Configure a firewall/packet filter to filter incoming and outgoing traffic"
AddHP 0 5
fi
fi
#
#################################################################################
#
# Report firewall installed for now, if we found one active. Next step would be determining binaries first and apply additional checks.
2015-12-21 21:17:15 +01:00
Report "firewall_active=${FIREWALL_ACTIVE}"
2015-12-30 14:33:50 +01:00
Report "firewall_empty_ruleset=${FIREWALL_EMPTY_RULESET}"
Report "firewall_installed=${FIREWALL_ACTIVE}"
2015-12-21 21:17:15 +01:00
Report "firewall_software=${FIREWALL_SOFTWARE}"
2014-08-26 17:33:55 +02:00
wait_for_keypress
#
#================================================================================
2015-12-21 21:17:15 +01:00
# Lynis - Copyright 2007-2016, Michael Boelen, CISOfy - https://cisofy.com