Add ULOG Support - phase II

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@363 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2002-12-13 04:06:24 +00:00
parent b9891e08e2
commit 1220331e35
4 changed files with 56 additions and 1 deletions

View File

@ -29,6 +29,12 @@
# log message is generated. See syslog.conf(5) for a # log message is generated. See syslog.conf(5) for a
# description of log levels. # description of log levels.
# #
# Beginning with Shorewall version 1.3.12, you may
# also specify ULOG (must be in upper case). This will
# log to the ULOG target and sent to a separate log
# through use of ulogd
# q(http://www.gnumonks.org/projects/ulogd).
#
# If you don't want to log but need to specify the # If you don't want to log but need to specify the
# following column, place "_" here. # following column, place "_" here.
# #

View File

@ -31,6 +31,13 @@
# level (e.g, REJECT:info). This causes the packet to be # level (e.g, REJECT:info). This causes the packet to be
# logged at the specified level. # logged at the specified level.
# #
# Beginning with Shorewall version 1.3.12, you may
# also specify ULOG (must be in upper case) as a log level.\
# This will log to the ULOG target and sent to a separate log
# through use of ulogd
# q(http://www.gnumonks.org/projects/ulogd).
#
#
# SOURCE Source hosts to which the rule applies. May be a zone # SOURCE Source hosts to which the rule applies. May be a zone
# defined in /etc/shorewall/zones, $FW to indicate the # defined in /etc/shorewall/zones, $FW to indicate the
# firewall itself, or "all" If the ACTION is DNAT or # firewall itself, or "all" If the ACTION is DNAT or

View File

@ -259,7 +259,8 @@ packet_log() # $1 = number of messages
[ -n "$realtail" ] && options="-n$1" [ -n "$realtail" ] && options="-n$1"
grep 'Shorewall:\|ipt_unclean' $LOGFILE | \ grep 'Shorewall:\|ipt_unclean' $LOGFILE | \
sed s/" $host kernel: Shorewall:"/" "/ | \ sed s/" kernel:"// | \
sed s/" $host Shorewall:"/" "/ | \
sed s/" $host kernel: ipt_unclean: "/" "/ | \ sed s/" $host kernel: ipt_unclean: "/" "/ | \
sed 's/MAC=.*SRC=/SRC=/' | \ sed 's/MAC=.*SRC=/SRC=/' | \
tail $options tail $options

View File

@ -9,6 +9,35 @@
# (c) 1999,2000,2001,2002 - Tom Eastep (teastep@shorewall.net) # (c) 1999,2000,2001,2002 - Tom Eastep (teastep@shorewall.net)
############################################################################## ##############################################################################
# #
# General note about log levels. Log levels are a method of describing
# to syslog (8) the importance of a message and a number of parameters
# in this file have log levels as their value.
#
# Valid levels are:
#
# 7 debug
# 6 info
# 5 notice
# 4 warning
# 3 err
# 2 crit
# 1 alert
# 0 emerg
#
# For most Shorewall logging, a level of 6 (info) is appropriate. Shorewall
# log messages are generated by NetFilter and are logged using facility
# kernel and the level that you specifify. If you are unsure of the level
# to choose, 6 (info) is a safe bet. You may specify levels by name or by
# number.
#
# If you have build your kernel with ULOG target support, you may also
# specify a log level of ULOG (must be all caps). Rather than log its
# messages to syslogd, Shorewall will direct netfilter to log the messages
# via the ULOG target which will send them to a process called 'ulogd'.
# ulogd is available from http://www.gnumonks.org/projects/ulogd and can be
# configured to log all Shorewall message to their own log file
################################################################################
#
# PATH - Change this if you want to change the order in which Shorewall # PATH - Change this if you want to change the order in which Shorewall
# searches directories for executable files. # searches directories for executable files.
# #
@ -96,6 +125,8 @@ LOGBURST=
# packets are logged under the 'logunclean' interface option. If the variable # packets are logged under the 'logunclean' interface option. If the variable
# is empty, these packets will still be logged at the 'info' level. # is empty, these packets will still be logged at the 'info' level.
# #
# See the comment at the top of this file for a description of log levels
#
LOGUNCLEAN=info LOGUNCLEAN=info
@ -191,6 +222,8 @@ BLACKLIST_DISPOSITION=DROP
# (beward of DOS attacks resulting from such logging). If not set, no logging # (beward of DOS attacks resulting from such logging). If not set, no logging
# of blacklist packets occurs. # of blacklist packets occurs.
# #
# See the comment at the top of this file for a description of log levels
#
BLACKLIST_LOGLEVEL= BLACKLIST_LOGLEVEL=
# #
@ -353,6 +386,8 @@ MUTEX_TIMEOUT=60
# it will be rejected by the firewall. If you want these rejects logged, # it will be rejected by the firewall. If you want these rejects logged,
# then set LOGNEWNOTSYN to the syslog log level at which you want them logged. # then set LOGNEWNOTSYN to the syslog log level at which you want them logged.
# #
# See the comment at the top of this file for a description of log levels
#
# Example: LOGNEWNOTSYN=debug # Example: LOGNEWNOTSYN=debug
@ -400,6 +435,8 @@ MACLIST_DISPOSITION=REJECT
# Specifies the logging level for connection requests that fail MAC # Specifies the logging level for connection requests that fail MAC
# verification. If set to the empty value (MACLIST_LOG_LEVEL="") then # verification. If set to the empty value (MACLIST_LOG_LEVEL="") then
# such connection requests will not be logged. # such connection requests will not be logged.
#
# See the comment at the top of this file for a description of log levels
# #
MACLIST_LOG_LEVEL=info MACLIST_LOG_LEVEL=info
@ -420,6 +457,8 @@ TCP_FLAGS_DISPOSITION=DROP
# Specifies the logging level for packets that fail TCP Flags # Specifies the logging level for packets that fail TCP Flags
# verification. If set to the empty value (TCP_FLAGS_LOG_LEVEL="") then # verification. If set to the empty value (TCP_FLAGS_LOG_LEVEL="") then
# such packets will not be logged. # such packets will not be logged.
#
# See the comment at the top of this file for a description of log levels
# #
TCP_FLAGS_LOG_LEVEL=info TCP_FLAGS_LOG_LEVEL=info
@ -430,6 +469,8 @@ TCP_FLAGS_LOG_LEVEL=info
# Specifies the logging level for packets that fail RFC 1918 # Specifies the logging level for packets that fail RFC 1918
# verification. If set to the empty value (RFC1918_LOG_LEVEL="") then # verification. If set to the empty value (RFC1918_LOG_LEVEL="") then
# RFC1918_LOG_LEVEL=info is assumed. # RFC1918_LOG_LEVEL=info is assumed.
#
# See the comment at the top of this file for a description of log levels
# #
RFC1918_LOG_LEVEL=info RFC1918_LOG_LEVEL=info