File: //opt/BCLinux/bse/secure_check/c05_icmpLimit
#!/bin/sh
#=======================================================
InsertSection "check icmp redirect limit"
IS_EXIST=`egrep -v '^#|^$' /etc/sysctl.conf | grep -w net.ipv4.conf.all.accept_redirects=0 |wc -l`
if [ "${IS_EXIST}" = "0" ] ; then
#echo "no icmp redirects, adding..."
#echo -e "net.ipv4.conf.all.accept_redirects=0" >> /etc/sysctl.conf
echo "c05" >> $RESULT_FILE
echo "" >> $RESULT_FILE
logtext "WRN_C05: $(loadtext TXT_WRN_C05)"
logtext "Suggestion: $(loadtext TXT_SUG_C05)"
Display --indent 2 --text "- Wrong icmp limit set... " --result WARNING --color RED
AddHP 0 1
else
#echo "exist icmp redirect, passing..."
logtext "Has icmp redirect limit set, checking ok"
Display --indent 2 --text "- Has icmp redirect limit set... " --result OK --color GREEN
AddHP 1 1
fi