All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Penz <robert.penz@outertech.com>
To: lartc@vger.kernel.org
Subject: [LARTC] iptables post/pre rountig problem
Date: Mon, 05 Aug 2002 00:00:35 +0000	[thread overview]
Message-ID: <marc-lartc-102850599916363@msgid-missing> (raw)

-----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

- -- 
Regards,
Robert
- ----------------
Robert Penz
robert.penz@outertech.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9TcAj8tTsQqJDUBMRAoSfAKCDG3rDZsegmeR9HlvsnNptPIyiMwCdH/An
af69+Ymez7VxWqBtX8I40Yg=
=k0pV
-----END PGP SIGNATURE-----

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

             reply	other threads:[~2002-08-05  0:00 UTC|newest]

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

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-102850599916363@msgid-missing \
    --to=robert.penz@outertech.com \
    --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 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.