From: "Andrew Hall" <temp02@bluereef.com.au>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] IMQ and fwmark
Date: Tue, 29 Jul 2003 09:19:46 +0000 [thread overview]
Message-ID: <marc-lartc-105947044627400@msgid-missing> (raw)
In-Reply-To: <marc-lartc-105946919126185@msgid-missing>
Access to the IMQ interface sits between the mangle and DNAT tables in the
PREROUTING chain and after the connection tracking table in the POSTROUTING
chain. There isn't much point in setting marks for the IMQ from the INPUT
and FORWARD chains as these are traversed AFTER the IMQ interface
(PREROUTE). To correctly set the marks then you would need to set them in
the mangle table of the PREROUTE chain and do it based on address. Hope this
helps.
Andrew.
----- Original Message -----
From: "Daniel Brahneborg" <basic@chello.se>
To: "Linux Advanced Router & Traffic Control" <lartc@mailman.ds9a.nl>
Sent: Tuesday, July 29, 2003 6:55 PM
Subject: [LARTC] IMQ and fwmark
> Hi all,
>
> I want to divide the incoming traffic between what should go to
> the firewall and what should be forwarded to the local network
> behind it. I started with the IMQ example config, but added an
> extra htb class right below "10:1" to get the two sfq's to borrow
> each other's bandwidth.
>
> However, I can't figure out how to set the two marks. According to
> this picture, taken from http://lartc.org/lartc.html, I thought I could
> set the marks in FORWARD and INPUT, but that didn't work at all. The
> traffic ends up in imq0 as it should, but only goes to the default
> class. Moving the '-j IMQ' to the INPUT and FORWARD tables didn't
> work either. What have I done wrong?
>
> +------------+ +---------+
+-------------+
> Packet -| PREROUTING |--- routing-----| FORWARD |-------+-------|
POSTROUTING |- Packets
> input +------------+ decision +---------+ |
+-------------+ out
> | |
> +-------+ +--------+
> | INPUT |---- Local process -| OUTPUT |
> +-------+ +--------+
>
> iptables -t mangle -A INPUT -i $EXTERNAL_INTERFACE -p tcp -j
MARK --set-mark 0x1
> iptables -t mangle -A FORWARD -i $EXTERNAL_INTERFACE -p tcp -j
MARK --set-mark 0x2
> iptables -t mangle -A PREROUTING -i $EXTERNAL_INTERFACE -j IMQ
>
> /Basic
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
prev parent reply other threads:[~2003-07-29 9:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-29 8:55 [LARTC] IMQ and fwmark Daniel Brahneborg
2003-07-29 9:19 ` Andrew Hall [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-105947044627400@msgid-missing \
--to=temp02@bluereef.com.au \
--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.