Skip to contentSkip to conversation

How to log everything with iptables

DISCUSSION Sebastião Antônio Campos (GWA) 2 participants 2 messages Jun 15, 2005

lore
Share & tools
lore
#1 lore raw
Quoted 2 lines · Sebastião Antônio Campos (GWA)

How can I do to log everything is passing thru my firewall on eth0 and eth1 and lo?? Using iptables??

What did you try? Are you serious? What do you expect to do with all those logs?

Anyway, it's quite simple. Put a -j LOG rule before any ACCEPT rules which you may have in INPUT and FORWARD chains. If either default policy is ACCEPT, put a -j LOG rule at the end of that chain too. See "LOG" in the "TARGET EXTENSIONS" section of iptables(8) for options.

You might also find the ULOG target of interest as well as the "limit" match extension.

Signature · 2 lines
    mail to this address is discarded unless "/dev/rob0"
    or "not-spam" is in Subject: header