Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: how can i combine these 2 iprules
Date: Fri, 5 Mar 2004 20:24:34 +0000	[thread overview]
Message-ID: <200403052024.34953.Antony@Soft-Solutions.co.uk> (raw)
In-Reply-To: <3698.128.59.176.161.1078517044.squirrel@sojourn.dyndns.org>

On Friday 05 March 2004 8:04 pm, Technical wrote:

> Ok I got that but i am confused about how true iptables' sequential
> execution of rules is.
>
> Say for example that my I ping this machine from a host other than
> cnnp1.com and cnnp2.com. The packet should be logged by >> > iptables -A
> mychain -j LOG --log-prefix "IPTABLES: "
>
> My question is should not the execution of the rest of the rules in
> RH-Firewall-1-INPUT not happen

Once a packet RETURNs from a user-defined chain, or gets to the end of a 
user-defined chain (as it will if it matches the LOG target - this target 
does not terminate processing), it continues to be processed through the rest 
of the rules in the built-in chain which called it.

The two rules which you posted in your question only LOGged the packets - did 
not ACCEPT or DROP them, therefore the version I suggested to you in my 
answer did exactly the same - LOG without ACCEPTing or DROPping.

If you want to ACCEPT or DROP the packets and thereby avoid further processing 
in the INPUT chain, do so at the end of the user-defined "mychain".

Antony.

-- 
If you can't find an Open Source solution for it, then it isn't a real 
problem.

                                                     Please reply to the list;
                                                           please don't CC me.



  reply	other threads:[~2004-03-05 20:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-05 18:27 how can i combine these 2 iprules Technical
2004-03-05 18:33 ` Antony Stone
2004-03-05 18:53   ` Technical
2004-03-05 19:17     ` Rob Sterenborg
2004-03-05 20:04       ` Technical
2004-03-05 20:24         ` Antony Stone [this message]
2004-03-05 23:16 ` Luciano Miguel Ferreira Rocha

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=200403052024.34953.Antony@Soft-Solutions.co.uk \
    --to=antony@soft-solutions.co.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox