Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Ruslan Spivak <alienoid@is.lg.ua>
To: Sven Schuster <schuster.sven@gmx.de>
Cc: netfilter@lists.netfilter.org
Subject: Re: MARK and ! question
Date: Thu, 26 Jun 2003 18:11:19 +0300	[thread overview]
Message-ID: <3EFB0D17.8030601@is.lg.ua> (raw)
In-Reply-To: <3EFB0886.9060000@gmx.de>

Sven Schuster wrote:

>
> What about using a user-defined chain like this:
>
> 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
>
> Hope this helps
>
> Sven

Thanks for your reply.
And can you describe how packet traverses such chain?
Thanks in advance,
Ruslan

>
>
> Ruslan Spivak wrote:
>
>> Hello.
>>
>> I need to mark with value 107 packets that are going NOT from the 
>> 193.220.70.0/27 network and NOT from the 193.108.240.0/22 network.
>> Is it possible?
>>
>> Below two lines seem not to work properly because second rule won't 
>> be reached.
>>
>> iptables -t mangle -A POSTROUTING -s ! 193.220.70.0/27 -d 
>> 193.220.70.32/27 -j MARK --set-mark 107
>>
>> iptables -t mangle -A POSTROUTING -s ! 193.108.240.0/22 -d 
>> 193.220.70.32/27 -j MARK --set-mark 107
>>
>> Your help is very, very appreciated.
>>
>> Best regards,
>> Ruslan
>>
>>
>>
>




  reply	other threads:[~2003-06-26 15:11 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 [this message]
2003-06-26 15:17     ` Chris Wilson
2003-06-26 15:22       ` Sven Schuster
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=3EFB0D17.8030601@is.lg.ua \
    --to=alienoid@is.lg.ua \
    --cc=netfilter@lists.netfilter.org \
    --cc=schuster.sven@gmx.de \
    /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