All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alistair Tonner <Alistair@nerdnet.ca>
To: Deshwal Chand <CDD@kampsax.co.in>,
	"Netfilter (E-mail)" <netfilter@lists.netfilter.org>
Subject: Re: How can I view detailed log of IPTABLES
Date: Wed, 18 Jun 2003 09:30:09 -0400	[thread overview]
Message-ID: <200306180930.09690.Alistair@nerdnet.ca> (raw)
In-Reply-To: <88116A11E9DFD411870900508BEC3831803B62@CPQ01>

On June 18, 2003 08:27 am, Deshwal Chand wrote:
> Hi
>
> I have IPTABLES 1.2.5 at Redhat 2.4.7-10. I am not able to see the logs
> generated by IPTABLES. May I haven't enalbed logging for iptables. How can
> I enable logging?
>
>
> Chand

	By default iptables logs nothing.  You must create specific rules to log 
anything.	
	Generally you only want to see certain things logged.  Thus just as you would
	craft rules to handle specific packets, one must craft rules to log, just use
	the -j LOG target.

	The best logging rules should be the last rule in a chain, and trap
	 everything, just before the chain's policy (often drop) kicks in.

	e.g  this is the last line in my INPUT chain.  Logging, with limits.
$IPTABLES -A INPUT -m limit --limit 3/minute --limit-burst 3 -j LOG \
--log-level DEBUG --log-prefix "IPT INPUT packet died: "

	note that I don't filter *any* packets here ..the policy in INPUT is drop.
	thus I now see all packets dropped by my INPUT chain.

	Alistair Tonner
	nerdnet.ca
	Senior Systems Analyst - RSS
	
     Any sufficiently advanced technology will have the appearance of magic.
	Lets get magical!


  reply	other threads:[~2003-06-18 13:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-18 12:27 How can I view detailed log of IPTABLES Deshwal Chand
2003-06-18 13:30 ` Alistair Tonner [this message]
2003-06-18 13:41 ` Volker Augustin
  -- strict thread matches above, loose matches on Subject: below --
2003-06-19  5:25 Deshwal Chand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200306180930.09690.Alistair@nerdnet.ca \
    --to=alistair@nerdnet.ca \
    --cc=CDD@kampsax.co.in \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.