All of lore.kernel.org
 help / color / mirror / Atom feed
* logging to console
@ 2003-12-16 15:59 Hurley, Michael
  2003-12-16 16:23 ` Antony Stone
  2003-12-16 16:29 ` James Pattie
  0 siblings, 2 replies; 8+ messages in thread
From: Hurley, Michael @ 2003-12-16 15:59 UTC (permalink / raw)
  To: Netfilter (E-mail)

Using iptables 1.2.8-8.72.3 on Red Hat Linux 7.3, kernel 2.4.20-20.7.

Haven't found a solution to this so far: iptables LOG is logging to console.
This only occurs on the consoles directly connected to the machine. Logging
in remotely does not have this problem.

Here's what I've tried so far, w/o success:
set log-level to notice, added kern.=notice /var/log/firewall to
syslog.conf, restarted syslogd.
set log-level to warning, added kern.=warning /var/log/firewall to
syslog.conf, restarted syslogd.

Still keeps on logging to local consoles. (BTW, kern.* is not accounted for
in syslog.conf).

I haven't tried setting the printk values yet (at present, the values are 6
4 1 7)--unsure of what the consequences might be of tinkering with that.

What is the best way to stop this irritating behavior? Thanks,


Michael Hurley
mhurley@law.uconn.edu 


^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: logging to console
@ 2003-12-16 16:45 Hurley, Michael
  2003-12-16 17:10 ` Ben
  0 siblings, 1 reply; 8+ messages in thread
From: Hurley, Michael @ 2003-12-16 16:45 UTC (permalink / raw)
  To: Netfilter (E-mail)

Thanks for your reply, Antony. Changing the log-level to 7 seems to have
done the trick. 

The question then is:
How do I now capture iptables messages to their own log (/var/log/firewall)?

I suppose I could grep for the log-prefix and redirect the output into
/var/log/firewall, but if there's a simpler way, that'd be swell.

Thanks!


-----Original Message-----
From: Antony Stone [mailto:Antony@Soft-Solutions.co.uk]
Sent: Tuesday, December 16, 2003 11:23 AM
To: Netfilter (E-mail)
Subject: Re: logging to console


On Tuesday 16 December 2003 3:59 pm, Hurley, Michael wrote:

> Using iptables 1.2.8-8.72.3 on Red Hat Linux 7.3, kernel 2.4.20-20.7.
>
> Haven't found a solution to this so far: iptables LOG is logging to
> console. This only occurs on the consoles directly connected to the
> machine. Logging in remotely does not have this problem.

Try using the numeric values in your netfilter LOG rules instead of the
words 
notice and warning for the log-level.

Antony.

-- 
"Note: Windows 98, Windows 98SE and Windows 95 are not affected by [MS
Blaster].   However, these products are no longer supported.   Users of
these
products are strongly encouraged to upgrade to later versions."

(which *are* affected by MS Blaster...)

http://www.microsoft.com/security/security_bulletins/ms03-026.asp

                                                     Please reply to the
list;
                                                           please don't CC
me.



^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: logging to console
@ 2003-12-17 18:14 Hurley, Michael
  0 siblings, 0 replies; 8+ messages in thread
From: Hurley, Michael @ 2003-12-17 18:14 UTC (permalink / raw)
  To: netfilter

Actually, I got a response directly to me that solved the problem. This is
effectively dumping all my iptables messages to their own log:

>I set my logging in my firewall script to
>iptables -A FORWARD -j LOG --log-level 7 --log-prefix "FORWARD: "
>
>Then in /etc/syslog.conf:
>
>kern.7	-/var/log/firewall
>
>On a side note in /etc/sysconfig/syslog I modified the -c parameter, this
>controls the console logging level.
>KLOGD_OPTIONS="-x -c 4" 

I didn't bother tinkering with klogd, but I thought I'd reproduce the
message I got in full for anyone else who might find this as useful as I
did. 

- Michael Hurley


-----Original Message-----
From: Laurence J. Lane [mailto:ljlane@nontoxic.org]
Sent: Tuesday, December 16, 2003 6:34 PM
To: netfilter@lists.netfilter.org
Subject: Re: logging to console


On Tue, Dec 16, 2003 at 05:19:31PM +0000, Antony Stone wrote:

[ re sending netfilter logs to a separate file ]

> I thik several people would. It's come up a few times before on
> this list. Short of delving into the netfilter source code, I
> don't know of a way to do it.

syslog-ng may interest you.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-12-17 18:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-16 15:59 logging to console Hurley, Michael
2003-12-16 16:23 ` Antony Stone
2003-12-16 16:29 ` James Pattie
  -- strict thread matches above, loose matches on Subject: below --
2003-12-16 16:45 Hurley, Michael
2003-12-16 17:10 ` Ben
2003-12-16 17:19   ` Antony Stone
2003-12-16 23:33     ` Laurence J. Lane
2003-12-17 18:14 Hurley, Michael

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.