Trying to get iptables, and soon named logs to not show up in messages, but rather their own log files (on F10)
I set iptables logging to:
- Code: Select all
-A RH-Firewall-1-INPUT -m limit --limit 5/min --limit-burst 7 -j LOG --log-prefix "iptables denied: " --log-level 6
Then tried numerous syntax to get it to log to /var/log/iptables.
Here is current rsyslog.conf rules with mine in there.
- Code: Select all
#### RULES ####
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
:msg,!contains,"iptables" *.info;mail.none;authpriv.none;cron.none /var/log/messages
# The authpriv file has restricted access.
authpriv.* /var/log/secure
# Log all the mail messages in one place.
mail.* -/var/log/maillog
# Log cron stuff
cron.* /var/log/cron
# Everybody gets emergency messages
*.emerg *
# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler
# Save boot messages also to boot.log
local7.* /var/log/boot.log
# iptables la~
:msg,contains,"iptables" *.* /var/log/iptables
and here is an output of iptables in messages log file.
- Code: Select all
Feb 20 12:04:51 fedora kernel: iptables denied: IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:50:56:9f:68:af:08:00 RC=172.20.0.15 DST=172.20.0.255 LEN=78 TOS=0x00 PREC=0x00 TTL=128 ID=21864 PROTO=UDP SPT=137 DPT=137 LEN=58
Any examples on how to get the filtering to work that way?

