All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Schuster <schuster.sven@gmx.de>
To: Chris Wilson <chris@netservers.co.uk>
Cc: Ruslan Spivak <alienoid@is.lg.ua>, netfilter@lists.netfilter.org
Subject: Re: MARK and ! question
Date: Thu, 26 Jun 2003 17:22:19 +0200	[thread overview]
Message-ID: <3EFB0FAB.2010105@gmx.de> (raw)
In-Reply-To: Pine.LNX.4.44.0306261611390.28942-100000@localhost

Chris Wilson wrote:

>I think the ruleset above is wrong: the '!' should not be present here. 
>Allow me to explain the packet traversal when the same rules are used, but 
>with "!" removed:
>
>
Yeah you're right, sorry...need more coffee ;-))

>iptables -t mangle -N setmark
>iptables -t mangle -A setmark -s 193.220.70.0/27 -d 193.220.70.32/27 \
>        -j RETURN
>iptables -t mangle -A setmark -s 193.108.240.0/22 -d 193.220.70.32/27 \
>        -j RETURN
>iptables -t mangle -A setmark -j MARK --set-mark 107
>iptables -t mangle -A POSTROUTING -j setmark
>
>1. Packet enters POSTROUTING
>2. Packet jumps to "setmark" chain
>3. Packets having source address matching "193.220.70.0/27" are RETURNed 
>   to POSTROUTING
>4. Packets having source address matching "193.108.240.0/22" are RETURNed 
>   to POSTROUTING
>5. (now ONLY packets which do NOT have either of these source addresses 
>   are still in the "setmark" chain)
>6. All packets (still in the "setmark" chain) are marked with 107
>7. Packets fall off the end of the "setmark" chain and return to 
>   POSTROUTING (but they are now marked)
>8. Packets fall of the end of POSTROUTING and continue through the kernel 
>   (presumably to be delivered to a network device)
>
>Cheers, Chris.
>

Sven




  reply	other threads:[~2003-06-26 15:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-26 13:28 MARK and ! question Ruslan Spivak
2003-06-26 14:51 ` Sven Schuster
2003-06-26 15:11   ` Ruslan Spivak
2003-06-26 15:17     ` Chris Wilson
2003-06-26 15:22       ` Sven Schuster [this message]
2003-06-26 15:39       ` Ruslan Spivak
2003-06-26 15:40         ` Chris Wilson
2003-06-26 15:19     ` Sven Schuster

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=3EFB0FAB.2010105@gmx.de \
    --to=schuster.sven@gmx.de \
    --cc=alienoid@is.lg.ua \
    --cc=chris@netservers.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 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.