mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-27 07:44:14 +02:00
Update tests_firewalls
This commit is contained in:
parent
2d4ec42696
commit
d64f480823
@ -112,7 +112,7 @@
|
|||||||
tables="filter nat mangle raw security"
|
tables="filter nat mangle raw security"
|
||||||
for t in ${tables}
|
for t in ${tables}
|
||||||
do
|
do
|
||||||
${iptables_binary} -t "${t}" -S -v -w 1 2>/dev/zero | while read -r line
|
${IPTABLESBINARY} -t "${t}" -S -v -w 1 2>/dev/zero | while read -r line
|
||||||
do
|
do
|
||||||
set -- ${line}
|
set -- ${line}
|
||||||
while [ $# -gt 0 ]
|
while [ $# -gt 0 ]
|
||||||
@ -199,16 +199,25 @@
|
|||||||
# logics
|
# logics
|
||||||
if [ "${t}" = "filter" ] || [ "${t}" = "security" ]
|
if [ "${t}" = "filter" ] || [ "${t}" = "security" ]
|
||||||
then
|
then
|
||||||
if [ "${c}" = "INPUT" ] && [ "${j}" = "ACCEPT" ]
|
if [ "${c}" = "INPUT" ]
|
||||||
|
then
|
||||||
|
if [ "${j}" = "ACCEPT" ]
|
||||||
then
|
then
|
||||||
LogText "Result: Found ${j} for ${c} (table: ${t})"
|
LogText "Result: Found ${j} for ${c} (table: ${t})"
|
||||||
Display --indent 6 --text "- Checking chain ${c} (table: ${t}, chain ${c})" --result "${j}" --color YELLOW
|
Display --indent 6 --text "- Checking chain ${c} (table: ${t}, chain ${c})" --result "${j}" --color YELLOW
|
||||||
AddHP 1 3
|
AddHP 1 3
|
||||||
elif [ "${c}" = "INPUT" ] && [ "${j}" = "DROP" ]
|
elif [ "${j}" = "DROP" ]
|
||||||
then
|
then
|
||||||
LogText "Result: Found ${j} for ${c} (table: ${t})"
|
LogText "Result: Found ${j} for ${c} (table: ${t})"
|
||||||
Display --indent 6 --text "- Checking chain ${c} (table: ${t}, chain ${c})" --result "${j}" --color GREEN
|
Display --indent 6 --text "- Checking chain ${c} (table: ${t}, chain ${c})" --result "${j}" --color GREEN
|
||||||
AddHP 3 3
|
AddHP 3 3
|
||||||
|
fi
|
||||||
|
elif [ "${c}" = "FORWARD" ]
|
||||||
|
then
|
||||||
|
:
|
||||||
|
elif [ "${c}" = "OUTPUT" ]
|
||||||
|
then
|
||||||
|
:
|
||||||
elif [ "${c}" = "INPUT" ] || [ "${c}" = "FORWARD" ] || [ "${c}" = "OUTPUT" ]
|
elif [ "${c}" = "INPUT" ] || [ "${c}" = "FORWARD" ] || [ "${c}" = "OUTPUT" ]
|
||||||
then
|
then
|
||||||
if [ "${j}" = "NFQUEUE" ]
|
if [ "${j}" = "NFQUEUE" ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user