All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tóth Nándor" <nug@sch.bme.hu>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] simple questions about imq
Date: Tue, 01 Feb 2005 05:44:17 +0000	[thread overview]
Message-ID: <41FF1731.70201@sch.bme.hu> (raw)
In-Reply-To: <41FD1304.1080305@sch.bme.hu>

Hi!

Andy Furniss wrote:
>  Can i put these rules to the POSTROUTING chain?
> 
>>
>> And i can still have my CLASSIFY targets in the POSTROUTING chain, 
>> because IMQ queing will happen after it according to 
>> http://lartc.org/howto/lartc.imq.html.
>> So for example:
>> $IPTABLES -t mangle -A POSTROUTING -o $eth2 ... -j CLASSIFY 
>> --set-class 1:30
>> $IPTABLES -t mangle -A POSTROUTING -o $eth3 ... -j CLASSIFY 
>> --set-class 1:30
>> $IPTABLES -t mangle -A POSTROUTING -o $eth2 ... -j RETURN
>> $IPTABLES -t mangle -A POSTROUTING -o $eth3 ... -j RETURN
>>
>> If i managed to do this, i promise, i will document it to the imq wiki.
>>
>> Any advice/help is appreciated!
>>
> 
> You need to jump to imq in postrouting, classify should be done first ok 
> try and see.

Ok will try it.

> If you only want to shape forwarded traffic you could mark/classify 
> using -i and -o in forward and then match on mark/class and -j IMQ in 
> postrouting, it will only really matter if you have shaper to lan 
> traffic you want to exclude from imq.
> 
> I don't see why you are classifying to the same class or need return. If 
> you have two seperate internet links you still need two nonsharing 
> queues added to the imq device.

Yes, i have two non-sharing queues(*) now, too. I mark the packets in 
PREROUTING, so i can classify them to the appropiate queue in postrouting.

The rules up there are just examples.

I need RETURN, because i have overlapping rules, so packets would be 
classified twice (the second classify will be the valid, isn't it?).
Like:
$IPTABLES -t mangle -A POSTROUTING -o $INTERNAL_INTERFACE -p tcp --syn 
-m length --length 40:68 -j CLASSIFY --set-class 1:9
$IPTABLES -t mangle -A POSTROUTING -o $INTERNAL_INTERFACE -p tcp --syn 
-m length --length 40:68 -j RETURN
$IPTABLES -t mangle -A POSTROUTING -o $INTERNAL_INTERFACE -p tcp --dport 
22 -j CLASSIFY --set-class 1:10
$IPTABLES -t mangle -A POSTROUTING -o $INTERNAL_INTERFACE -p tcp --dport 
22 -j RETURN

Is this a stupid way to do this? I get this from the LARTC howto :)
http://lartc.org/howto/lartc.cookbook.fullnat.intro.html
"We have done a -j RETURN so packets don't traverse all rules"

Thanks, for the clarifying!

-- 
Udv,
   Nandor

* If anyone is curious:

HTB main 5000+120+250kbps
  --- Child1 5000kbps for the DMZ
  --- Child2 120kbps first internet line
  --- Child3 250 kbps second internet line


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

      parent reply	other threads:[~2005-02-01  5:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-30 16:58 [LARTC] simple questions about imq Tóth Nándor
2005-01-31 13:55 ` Andre Correa
2005-01-31 16:59 ` Tóth Nándor
2005-01-31 17:10 ` Andre Correa
2005-01-31 23:39 ` Andy Furniss
2005-02-01  5:44 ` Tóth Nándor [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=41FF1731.70201@sch.bme.hu \
    --to=nug@sch.bme.hu \
    --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.