Skip to contentSkip to conversation

netfilter accounting problem

DISCUSSION Vincent Chen 2 participants 2 messages Feb 1, 2005

lore
Share & tools
lore
#0 lore raw

Hi, all

I tried to analyze log from netfilter to have a picture about my network's activity. I study and look around for days and found it's not easy. Here I what I found:

1. Most firewall use stateful inspection and log entry generated after connection terminated. Byte transfered included in log. It's easy for reporting. It seems that netfilter logging is based on packet header. If I want a connection information, I have to trace the log from 3 way tcp handshake until FIN ACK received. Is this true? If so, it's not friendly to reporting system.

2. The logging file will be very huge and hard to process. My network generated

Quoted 1 line

300M logfile in 1 day. And the log mixed with system entry. Can I send

netfilter log to local0~local7? If yes, how can I do that?

3. I can tell the whether the log come from accept rule or drop rule. Is there a column for this? I can't find more detailed information.

Thanks,

Vincent Chen

-----------------------------------------------------------------
Yahoo!奇摩造型精靈
最新的造型精靈簽名檔,讓信件獨具個人色彩!
http://tw.avatar.yahoo.com/

#1 lore raw
Quoted 6 lines · Vincent Chen

Hi, all

I tried to analyze log from netfilter to have a picture about my network's activity. I study and look around for days and found it's not easy. Here I what I found:

Quoted 6 lines

1. Most firewall use stateful inspection and log entry generated after connection terminated. Byte transfered included in log. It's easy for reporting. It seems that netfilter logging is based on packet header. If I want a connection information, I have to trace the log from 3 way tcp handshake until FIN ACK received. Is this true? If so, it's not friendly to reporting system.

if you're looking to do some accounting--look at the various patches for this in POM, such as: account, ACCOUNT, conntrack-acct.

Quoted 3 lines

2. The logging file will be very huge and hard to process. My network generated

Quoted 1 line

300M logfile in 1 day. And the log mixed with system entry. Can I send

netfilter log to local0~local7? If yes, how can I do that?

two options come to mind: 1) use ULOG which will allow you to send iptables logs to their own file or 2) replace your standard syslogd with syslog-ng which will allow you to filter the iptables messages into their own file.

Quoted 2 lines

3. I can tell the whether the log come from accept rule or drop rule. Is there a column for this? I can't find more detailed information.

yeah--use the "--log-prefix" option to add a comment to your log entries.

-j

--
"Man, you go through life, you try to be nice to people, you struggle
to resist the urge to punch 'em in the face, and for what?"
--The Simpsons