Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: Netfilter Mailing List <netfilter@lists.samba.org>
Subject: Re: debugging rc.firewall
Date: Tue, 18 Jun 2002 19:02:45 +0100	[thread overview]
Message-ID: <200206181802.g5II2pA29007@Networker.rockstone.co.uk> (raw)
In-Reply-To: <20020618130639.2ec22286.mt@open2web.com>

On Tuesday 18 June 2002 6:06 pm, Mark Tessier wrote:

> In trying to debug rc.firewall on a gateway/firewall between a LAN subnet
> and DMZ subnet, I've put in the following
>
> iptables -A INPUT -i eth1 -j LOG
>
> immediately after iptables --policy INPUT DROP
>
> As mentioned my log messages are not registering in /var/log/messages and
> I'm not sure why.

You need to specify the "logging level" so that syslogd.conf knows what 
category the messages are are can send them to the appropriate file.

Depending on what version of iptables you have, you need to say:

iptables -A INPUT -i eth1 -j LOG --log-level=<level>

where <level> is either a number or a word (some versions of iptables don't 
accept the word variant, but it is more intuitive if you can use that, so try 
it first and see if it is accepted - if not, use the number instead).

I use --log-level=info and this logs quite happily into /var/log/messages

I believe the corresponding numeric value for this is 6, so you would say:

iptables -A INPUT -i eth1 -j LOG --log-level=6

Note that you can also specify --log-prefix as an option to the LOG target, 
which puts a fixed message into the log entry - this can be useful for 
indicating which one of your LOG rules was responsible for generating a given 
logfile line.

eg: iptables -A INPUT -i eth1 -j LOG --log-level=info --log-prefix="Input"
iptables -A FORWARD -i eth1 -j LOG --log-level=info --log-prefix="Forward"

etc....

 

Antony,


  parent reply	other threads:[~2002-06-18 18:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-18 17:06 debugging rc.firewall Mark Tessier
2002-06-18 17:30 ` Nathan Cassano
2002-06-18 18:02 ` Antony Stone [this message]
2002-06-18 18:31   ` --set-mark limit Luiz Fernando T. Campos
2002-06-18 18:45     ` Antony Stone
2002-06-18 18:56       ` Luiz Fernando T. Campos
2002-06-18 18:52     ` Patrick Schaaf

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=200206181802.g5II2pA29007@Networker.rockstone.co.uk \
    --to=antony@soft-solutions.co.uk \
    --cc=netfilter@lists.samba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox