1

For some reason I see the output from this iptables rule

$IPT -A FORWARD --jump LOG
$IPT -A FORWARD --jump ACCEPT

on the console eventhough I have disabled kern in /etc/syslog.conf

#kern.*                                                 /dev/console
*.info;mail.none;authpriv.none;cron.none                /var/log/messages
authpriv.*                                              /var/log/secure
mail.*                                                  -/var/log/maillog
cron.*                                                  /var/log/cron
*.emerg                                                 *
uucp,news.crit                                          /var/log/spooler
local7.*                                                /var/log/boot.log

But for some reason I still get the output on the console.

Does anyone know why that is?

Update

Could it have something to do with klogd?

# service syslog status
syslogd (pid  2099) is running...
klogd (pid  2102) is running...
9
  • You HUPed syslogd, right? – cjc Feb 2 '12 at 15:46
  • You probably have another line that is matching. Please paste your entire syslogd.conf. – Jeff Ferland Feb 2 '12 at 15:47
  • @JeffFerland The post is now updated with the enture syslogd.conf – Sandra Feb 2 '12 at 15:54
  • @cjc What does "HUPed" mean? I have just edited /etc/syslog.conf and then service syslog restart – Sandra Feb 2 '12 at 15:58
  • @Sandra: it means reloading the syslogd process by sending SIGHUP or calling service syslog reload. Restart should be OK also. – Khaled Feb 2 '12 at 15:59
4

I assume you're running a RHEL-derived linux.

Take a look at:

http://blog.marioandwindy.com/tag/klogd_options/

So, you will need to edit /etc/sysconfig/syslog and edit the KLOGD_OPTIONS line.

After that, you'll need to run service syslog restart (the options set in /etc/sysconfig/syslog are startup command line options for the syslogd and klogd processes, and are separate from the configuration file).

As a side note, I have this in my /etc/sysconfig/syslog file:

KLOGD_OPTIONS="-x -c 1"

Basically, we're setting level for the console message from the kernel to priority level 1.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.