Turning off console logging on RedHat/Fedora

If you’re like me and log nearly every violation of the firewall using iptables rules, you’ve probably seen these violations on the console. This can be annoying if you are trying to actually use the console for something productive :-)

Here’s how to turn up the severity level of logging on the console so that only more important messages get logged:

In /etc/sysconfig/syslog, change the following

KLOGD_OPTIONS=”-x”

to

KLOGD_OPTIONS=”-x -c 4″

This will drop the log level to 4 (from 7 I think) and will only log kernel mesages of this level or lower (higher severity). Presumably, you could turn off console logging entirely by using 0, but I haven’t tested this.