Skip to contentSkip to conversation

iptables logging

DISCUSSION Stephen Clark 2 participants 3 messages Nov 15, 2007 – Nov 16, 2007 netfilter

lore
Share & tools
lore
#0 lore raw

Hello,

Is there a way to have iptables LOG using a facility other than "kern". I would like to
segregate out the messages from iptables into a file separate from /var/log/messages.

Any advice would be appreciated.

Steve

Signature · 5 lines
"They that give up essential liberty to obtain temporary safety,
deserve neither liberty nor safety."  (Ben Franklin)

"The course of history shows that as a government grows, liberty
decreases."  (Thomas Jefferson)
#1 lore raw
Quoted 9 lines · Stephen Clark

Hello,

Is there a way to have iptables LOG using a facility other than "kern". I would like to
segregate out the messages from iptables into a file separate from /var/log/messages.

Any advice would be appreciated.

You should use syslog-ng, which allows text matching and filtering. This is from a regular openSUSE install:

	filter f_iptables   { facility(kern) and match("IN=") and match("OUT="); };

Or, you can use the ULOG target together with ulogd2.

#2 lore raw
Quoted 14 lines · Jan Engelhardt
Quoted 10 lines · Stephen Clark

Hello,

Is there a way to have iptables LOG using a facility other than "kern". I would like to
segregate out the messages from iptables into a file separate from /var/log/messages.

Any advice would be appreciated.

Quoted 10 lines

You should use syslog-ng, which allows text matching and filtering. This is from a regular openSUSE install:

	filter f_iptables   { facility(kern) and match("IN=") and match("OUT="); };

Or, you can use the ULOG target together with ulogd2.

Hi Jan,

Thanks for taking the time to reply. I'll check them both out.

Steve

Signature · 3 lines
"They that give up essential liberty to obtain temporary safety, deserve neither liberty nor safety."  (Ben Franklin)

"The course of history shows that as a government grows, liberty decreases."  (Thomas Jefferson)