Skip to contentSkip to conversation

I don't want the LOG be writed to /var/log/messages

DISCUSSION openbsd shen 3 participants 3 messages Feb 7, 2006

lore
Share & tools
lore
#0 lore raw

I write a line in /etc/syslog.conf:
kern.=info /var/log/iptables

Now the log of iptables write to /var/log/iptables, but I found that the log still write in /var/log/messages, now I have 2 copies of the log, how can I stop the write to /var/log/messages, and only write to /var/log/iptables?
Thanks.

#1 lore raw

Modify the following line in /etc/syslog.conf from *.info;mail.none;news.none;authpriv.none;cron.none /var/log/messages to
*.info;mail.none;news.none;authpriv.none;cron.none;kern.none /var/log/messages

Then no kern message will be written to /var/log/messages

thanks & regards
Sudhakar

Quoted 10 lines · openbsd shen

I write a line in /etc/syslog.conf:
kern.=info /var/log/iptables

Now the log of iptables write to /var/log/iptables, but I found that the log still write in /var/log/messages, now I have 2 copies of the log, how can I stop the write to /var/log/messages, and only write to /var/log/iptables?
Thanks.

#2 lore raw
In reply to openbsd shen
Quoted 8 lines

I write a line in /etc/syslog.conf:
kern.=info
/var/log/iptables

Now the log of iptables write to /var/log/iptables, but I found that the log still write in /var/log/messages, now I have 2 copies of the log, how can I stop the write to /var/log/messages, and only write to /var/log/iptables? Thanks.

If you want all iptables messages in one file, use ulogd and the ULOG target.
http://freshmeat.net/projects/ulogd/

Gr,
Rob