<div><div><div class="gmail_quote">On Wed, Jul 20, 2011 at 9:40 AM, <a href="mailto:cbulist@gmail.com">cbulist@gmail.com</a> <span dir="ltr"><<a href="mailto:cbulist@gmail.com">cbulist@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5"><br>
<br>
On 7/20/2011 10:18 AM, Keith Roberts wrote:<br>
> On Wed, 20 Jul 2011, <a href="mailto:cbulist@gmail.com">cbulist@gmail.com</a> wrote:<br>
><br>
>> To: <a href="mailto:centos@centos.org">centos@centos.org</a><br>
>> From: "<a href="mailto:cbulist@gmail.com">cbulist@gmail.com</a>"<<a href="mailto:cbulist@gmail.com">cbulist@gmail.com</a>><br>
>> Subject: [CentOS] Iptables - flooding console<br>
>><br>
>> Hi,<br>
>><br>
>> We are trying to track some specific rules using  LOG as target.<br>
>> Everything is working well but the problem is that iptables is flooding<br>
>> the console with LOG messages.<br>
>> We tried --log level 4 on iptables rules but it didn't work.<br>
>> We fixed the problem changing KLOGD_OPTIONS value in<br>
>> /etc/sysconfig/syslog to:<br>
>> KLOG_OPTIONS="-c 4"<br>
>><br>
>> Is it the best option or we are missing something?<br>
>><br>
>> Thanks in advance<br>
> I had this problem as well. The firewall logs were being<br>
> sent (tailed/tee'd ?) to the console, which is a pain if you<br>
> are using mc or any other console application.<br>
><br>
> To fix it on Centos 5.5/6 I just added the following<br>
> to the top of the /etc/syslog.conf file.<br>
><br>
> Deleted these lines as not in use:<br>
><br>
> # Log all kernel messages to the console.<br>
> # Logging much else clutters up the screen.<br>
> #kern.*                       /dev/console<br>
><br>
><br>
> Replaced with:<br>
> # Log all firewall messages to a file.<br>
> kern.=debug      /var/log/firewall-log<br>
><br>
> Obviously you need to make sure the firewall log file<br>
> exists<br>
><br>
> -rw-r--r--  keith  users    39039 Jul 20 15:24 firewall-log<br>
><br>
> Kind Regards,<br>
><br>
</div></div>Thanks  Keith,<br>
<br>
I tried your solution but it didn't work. (man 8 syslogd describes what<br>
you said)<br>
First I returned the default value on KLOG_OPTIONS, I restarted the<br>
syslog service but the iptables still continuous sending the log to console.<br>
I forget mention the info system:<br>
<br>
CentOS 5.6<br>
<br>
[root@server_56 ~]# uname -r<br>
2.6.18-238.el5<br>
[root@server_56 ~]# iptables -V<br>
iptables v1.3.5<br>
<br>
Sincerely,<br>
<br>
Julio<br>
<div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
CentOS mailing list<br>
<a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br>
<a href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">http://lists.centos.org/mailman/listinfo/centos</a><br>
</div></div></blockquote></div><br></div></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">We prevent firewall messages from being logged to the console by setting kernel.printk in sysctl.conf.<div>
<br><div><div>kernel.printk = 3 4 1 7</div><div><br></div><div>Daniel</div></div></div></div><div><br></div>