Gentoo Archives: gentoo-security

From: Abhay Kedia <abhay.ilugd@×××××.com>
To: gentoo-security@l.g.o
Subject: [gentoo-security] How to make iptables log to a separate log file?
Date: Sun, 27 Nov 2005 15:14:21
Message-Id: 200511272040.02199.abhay.ilugd@gmail.com
Hello everyone,

I have installed iptables yesterday and currently using a basic script from 
web to enable firewall. The script logs the dropped packets using following 
entries

/sbin/iptables -A INPUT -j LOG --log-prefix "FIREWALL:INPUT "
/sbin/iptables -I INPUT 1 -p tcp -m state --state INVALID -j LOG --log-prefix 
"FIREWALL:INVALID "

iptables seem to be working fine but the problem is that it is logging 
everything in /var/log/messages but I want it to log it some other file. May 
be /var/log/iptables. I have googled and found that syslog-ng can do it and 
some entries in /etc/syslog-ng/syslog-ng.conf should work but I am not sure 
how to do it. "man syslog-ng.conf" is not making much sense for me either 
(newbie).

Can some one please give me any links where I can read about how to easily 
configure syslog-ng.conf and achieve what I desire. If you could give exact 
entries then I would be more than greatful.

TIA
Regards,
Abhay Kedia

Replies

Subject Author
Re: [gentoo-security] How to make iptables log to a separate log file? Lasse Birnbaum Jensen <gymer@××××××××××××××××××.dk>
Re: [gentoo-security] How to make iptables log to a separate log file? Tobias Sager <moixa@×××.ch>