Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] iptables post/pre rountig problem
Date: Tue, 06 Aug 2002 15:42:10 +0000	[thread overview]
Message-ID: <marc-lartc-102864855906276@msgid-missing> (raw)
In-Reply-To: <marc-lartc-102850599916363@msgid-missing>

Hi Robert,

Robert Penz wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi!
> 
> I'm trying to exclude some ip ranges from my traffic filter, for that I mark 
> the packets in PRE-/POST-ROUTING.
> 
> If I mark them straight ahead it works, but if I want to do that in a user 
> chain I get the message that userchain.so can't beloaded.
> 
> iptables -N capped_in
> iptables -N capped_out
> 
> # put all incoming traffic to IMQ
> iptables -t mangle -A PREROUTING -i eth0 -j IMQ
> # mark all packets which need to be capped
> iptables -t mangle -A PREROUTING -i eth0 -d xxx.xxx.xxx.141 -s ! 
> xxx.xxx.xxx.0/24 -j capped_in
>        iptables -A capped_in -s yyy.yyy.yyy.0/27 -j RETURN
>        iptables -A capped_in -j MARK --set-mark 2
> 
> # now the outgoing traffic
> iptables -t mangle -A POSTROUTING -o eth0 -s xxx.xxx.xxx.141 -d ! 
> xxx.xxx.xxx.0/24 -j capped_out
>        iptables -A capped_out -s yyy.yyy.yyy.0/27 -j RETURN
>        iptables -A capped_out -j MARK --set-mark 1
> 
> Can anyone tell me how I can achieve? thx


Did you try -t mangle -A capped_in/out ?
Your chains were created in the mangle table, so they can only be called 
from within mangle.

Bye,

Patrick



_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

      reply	other threads:[~2002-08-06 15:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-05  0:00 [LARTC] iptables post/pre rountig problem Robert Penz
2002-08-06 15:42 ` Patrick McHardy [this message]

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=marc-lartc-102864855906276@msgid-missing \
    --to=kaber@trash.net \
    --cc=lartc@vger.kernel.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