mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-28 12:07:10 +01:00
Display ipfw rules which have reached the log limit.
This commit is contained in:
parent
099975fa27
commit
4b7cf487fc
14
etc/security
14
etc/security
@ -1,7 +1,7 @@
|
||||
#!/bin/sh -
|
||||
#
|
||||
# @(#)security 5.3 (Berkeley) 5/28/91
|
||||
# $Id: security,v 1.21 1997/08/01 01:25:21 brian Exp $
|
||||
# $Id: security,v 1.22 1997/09/26 01:38:30 alex Exp $
|
||||
#
|
||||
PATH=/sbin:/bin:/usr/bin
|
||||
LC_ALL=C; export LC_ALL
|
||||
@ -68,6 +68,18 @@ if ipfw -a l 2>/dev/null | egrep "deny|reset|unreach" > $TMP; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# show ipfw rules which have reached the log limit
|
||||
IPFW_LOG_LIMIT=`sysctl -n net.inet.ip.fw.verbose_limit 2> /dev/null`
|
||||
if [ $? -eq 0 ] && [ $IPFW_LOG_LIMIT -ne 0 ]; then
|
||||
ipfw -a l | grep " log " | perl -n -e \
|
||||
'/^\d+\s+(\d+)/; print if ($1 >= '$IPFW_LOG_LIMIT')' > $TMP
|
||||
if [ -s $TMP ]; then
|
||||
separator
|
||||
echo "ipfw log limit reached:"
|
||||
cat $TMP
|
||||
fi
|
||||
fi
|
||||
|
||||
# show kernel log messages
|
||||
if dmesg 2>/dev/null > $TMP; then
|
||||
if [ ! -f $LOG/dmesg.today ] ; then
|
||||
|
Loading…
Reference in New Issue
Block a user