從 google 查到 Debian-firewall 設定法,/etc/syslog.conf
# /etc/syslog.conf Example configuration file for syslogd on Debian (you can optionally use this as a replacement).
# This will redirect all kernel-debug logging to file /var/log/firewall.
# Don't forget to touch(create) /var/log/firewall first & set "LOGLEVEL=debug" in the
# configuration file (iptables-firewall.conf)!
#
# First some standard logfiles. Log by facility.
#
auth,authpriv.* /var/log/auth.log
*.*;auth,authpriv,local7,daemon,lpr.none;\
kern.!=debug;\
cron.!=info -/var/log/syslog
cron.* -/var/log/cron.log
daemon.* -/var/log/daemon.log
#kern.* -/var/log/kern.log
kern.*;kern.!=debug -/var/log/kern.log
lpr.* -/var/log/lpr.log
mail.* -/var/log/mail/mail.log
user.* -/var/log/user.log
uucp.* /var/log/uucp.log
#
# Logging for the mail system. Split it up so that
# it is easy to write scripts to parse these files.
#
mail.info -/var/log/mail/mail.info
mail.warn -/var/log/mail/mail.warn
mail.err /var/log/mail/mail.err
# Logging for INN news system
#
news.crit /var/log/news/news.crit
news.err /var/log/news/news.err
news.notice -/var/log/news/news.notice
# Logging for DHCP system
local7.* -/var/log/dhcpd
# Logging for iptables
kern.=debug -/var/log/firewall
#
# Some `catch-all' logfiles.
#
*.=debug;\
kern.!=debug;\
local7.none;\
auth,authpriv.none;\
news.none;mail.none -/var/log/debug
*.=info;*.=notice;*.=warn;\
local7.none;\
auth,authpriv.none;\
cron,daemon,lpr.none;\
mark.none;\
mail,news.none /var/log/messages
#
# Emergencies are sent to everybody logged in.
#
*.emerg *
#
# I like to have messages displayed on the console, but only on a virtual
# console I usually leave idle.
#
#daemon,mail.*;\
# news.=crit;news.=err;news.=notice;\
# *.=debug;*.=info;\
# *.=notice;*.=warn /dev/tty8
# The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
# you must invoke `xconsole' with the `-file' option:
#
# $ xconsole -file /dev/xconsole [...]
#
# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
# busy site..
#
#daemon.*;mail.*;\
# news.crit;news.err;news.notice;\
# *.=debug;*.=info;\
# *.=notice;*.=warn |/dev/xconsole
這樣即可將 iptables LOG 檔單獨寫入 /var/log/firewall
但 /var/log/kern.log 有個訊息:
Cannot find map file
Error querying loaded modules. Function not implemented.
然而 syslog 還是正常運作。
提供給各位參考!
PS: 原 /etc/syslog.conf 的 default 設定太簡化了...