Linux Netfilter discussions
 help / color / mirror / Atom feed
* managing LOG files
@ 2004-10-22 16:40 kate
  2004-10-22 18:15 ` Jason Opperisano
  0 siblings, 1 reply; 2+ messages in thread
From: kate @ 2004-10-22 16:40 UTC (permalink / raw)
  To: netfilter@lists.netfilter.org

I have a firewall script that only allows
pre-determined Ip addresses to attempt logon.
Allowable access gets logged in /var/log/secure while
TCP rules dump all other traffic, and get LOGGED in
/var/log/messages. - This is a Home LAN, and that's a
lotta data !

Is there a way of redirecting all this to a separate
file? Is there a better way to deal with all this?

my rules include-

# LOG rules go to /var/log/messages
iptables -A INPUT -m limit --limit 1/sec --limit-burst
3 -j \
	LOG --log-level 4 --log-prefix "FW DROP INPUT: "

thanks in advance
kate


		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 


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

* Re: managing LOG files
  2004-10-22 16:40 managing LOG files kate
@ 2004-10-22 18:15 ` Jason Opperisano
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Opperisano @ 2004-10-22 18:15 UTC (permalink / raw)
  To: netfilter@lists.netfilter.org

On Fri, Oct 22, 2004 at 09:40:33AM -0700, kate wrote:
> I have a firewall script that only allows
> pre-determined Ip addresses to attempt logon.
> Allowable access gets logged in /var/log/secure while
> TCP rules dump all other traffic, and get LOGGED in
> /var/log/messages. - This is a Home LAN, and that's a
> lotta data !
> 
> Is there a way of redirecting all this to a separate
> file? Is there a better way to deal with all this?
> 
> my rules include-
> 
> # LOG rules go to /var/log/messages
> iptables -A INPUT -m limit --limit 1/sec --limit-burst
> 3 -j \
> 	LOG --log-level 4 --log-prefix "FW DROP INPUT: "
> 
> thanks in advance
> kate

the most complete way to do this is to use syslog-ng as your system
logger and use its filter capabilities to send all the netfilter
messages to a dedicated file; i use something along the lines of:

source src {
        internal();
};
filter f_iptables {
	facility(kern) and match("IN=") and match("OUT=");
};
destination firewall { file("/var/log/firewall"); };
log { source(src); filter(f_iptables); destination(firewall); };

and yes--this is all completely stolen from SuSE's config files...

-j

-- 
Jason Opperisano <opie@817west.com>


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

end of thread, other threads:[~2004-10-22 18:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-22 16:40 managing LOG files kate
2004-10-22 18:15 ` Jason Opperisano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox