mirror of
https://github.com/CISOfy/lynis.git
synced 2026-03-11 08:55:28 +00:00
Merge 1fed159568 into 54b813f4c0
This commit is contained in:
commit
8511ac4bec
1 changed files with 2 additions and 2 deletions
|
|
@ -276,11 +276,11 @@
|
|||
# Test : NETW-3001
|
||||
# Description : Find default gateway (route)
|
||||
# More info : BSD: ^default Linux: 0.0.0.0
|
||||
if [ -n "${NETSTATBINARY}" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
||||
if [ -n "${IPBINARY}" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
||||
Register --test-no NETW-3001 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Find default gateway (route)"
|
||||
if [ $SKIPTEST -eq 0 ]; then
|
||||
LogText "Test: Searching default gateway(s)"
|
||||
FIND=$(${NETSTATBINARY} -rn | ${GREPBINARY} -E "^0.0.0.0|default" | ${TRBINARY} -s ' ' | ${CUTBINARY} -d ' ' -f2)
|
||||
FIND=$(${IPBINARY} route show default | ${TRBINARY} -s ' ' | ${CUTBINARY} -d ' ' -f3)
|
||||
if [ -n "${FIND}" ]; then
|
||||
for I in ${FIND}; do
|
||||
LogText "Result: Found default gateway ${I}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue