[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: iptables log target logs everything to tty*. Why?



On Fri, 2006-06-23 at 00:18 +0200, Erik Persson wrote:
> Hey!
> 
> I'm running a debian sarge as a router for a network, and I'm using 
> iptables. I need to log certain stuff from iptables, and I thus have 
> rules like:
> ${PROG} -A FORWARD -i eth1 -o eth0 -p tcp --dport 135 -m limit
>   --limit 1/s -j LOG --log-prefix "Blaster portscan "
> 
> This however has the not so desirable side effect of writing every log 
> message from iptables to all tty:s as well as to /var/log/messages. And 
> I can tell you it is very annoying!
> 
> First I just thought it had something to do with syslogd and checked 
> syslogd.conf. I could not find any rule that would generate this 
> behavior, but to be on the safe side I stopped syslogd.
> The messages kept on coming.
> 
> Then I thought it might be klogd and I killed it off as well. The 
> messages kept on coming on the ttys. Then I tried klogd -c 0 whithout 
> any luck.
> 
> Does anyone know how to get rid of this other than just removing the log 
> rules from iptables?
> 
> /Erik Persson.
> 
> 

Another option is to make the action in the rules ULOG and change
--log-prefix to --ulog-prefix. This needs the ulog-daemon for logging
though, but it's available on debian. Install it and all your messages
will be sent to ulog.

Philippe De Ryck



Reply to: