Skip to contentSkip to conversation

IMQ question

LARTC Ciprian Niculescu 4 participants 5 messages May 5, 2002 – Aug 24, 2004

lore
Share & tools
lore
#0 lore raw

whitch is the logic in this peace of code

iptables -t mangle -A PREROUTING -j IMQ
iptables -t mangle -A PREROUTING -s 1.2.3.4 -j MARK --set-mark 1

and in the imq0 i have a class that handle the pachets marked with 1

this works, the question is why?

beacouse i understand that:
the pachet first enter the IMQ table, and in the queue, after that he exit and continue with the next rule in the PREROUTING, witch is the mark.

i must got it wrong

C

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw

The first line only mark packet. After it leaves iptables it will enter IMQ because of the mark.
devik

Quoted 5 lines · Ciprian Niculescu

whitch is the logic in this peace of code

iptables -t mangle -A PREROUTING -j IMQ
iptables -t mangle -A PREROUTING -s 1.2.3.4 -j MARK --set-mark 1

Quoted 8 lines

and in the imq0 i have a class that handle the pachets marked with 1

this works, the question is why?

beacouse i understand that:
the pachet first enter the IMQ table, and in the queue, after that he exit and continue with the next rule in the PREROUTING, witch is the mark.

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#2 lore raw

[LARTC] imq question

In reply to Ciprian Niculescu

Hi

I've a stupid question. How can I shape upload using IMQ?
Instead of putting a rule in iptables in PREROUTING should i use POSTROUTING?
And another question is, can I make routing rule based on ip addresses assigned by iptables to an imq device? The idea is, let's say i have some rules in iptables like: -t mangle -A PREROUTING -s 192.168.0.0/16 -j IMQ --todev 0 Can i route this class thru another ip, something like fwmark is doing? with iptables marking the packets and ip rule fwmark?

Best regards,
Alin

#3 lore raw

Re: [LARTC] imq question

In reply to Ciprian Niculescu

You cant shape router upload or imq will crash.
also that imq will not be able to shape traffic per each loacal ip with filters, but you can easily mark packets with iptables in forward of prerouting chain.

----- Original Message -----
From: Alin Nonosel
To: [email protected]
Sent: Tuesday, August 24, 2004 1:32 AM
Subject: [LARTC] imq question

Hi

I've a stupid question. How can I shape upload using IMQ?
Instead of putting a rule in iptables in PREROUTING should i use POSTROUTING?
And another question is, can I make routing rule based on ip addresses assigned by iptables to an imq device? The idea is, let's say i have some rules in iptables like: -t mangle -A PREROUTING -s 192.168.0.0/16 -j IMQ --todev 0 Can i route this class thru another ip, something like fwmark is doing? with iptables marking the packets and ip rule fwmark?

Best regards,
Alin

#4 lore raw

Re: [LARTC] imq question

In reply to Ciprian Niculescu

Hmm.. After a few hour of reading and testing finally it's working. IMQ upload limiting and tc with ip filter. What do you mean by that? It is working.. And so far seems stable..

----- Original Message -----
From: Roy
To: Alin Nonosel ; [email protected]
Sent: Monday, August 23, 2004 6:45 AM
Subject: Re: [LARTC] imq question

You cant shape router upload or imq will crash.
also that imq will not be able to shape traffic per each loacal ip with filters, but you can easily mark packets with iptables in forward of prerouting chain.

----- Original Message -----
From: Alin Nonosel
To: [email protected]
Sent: Tuesday, August 24, 2004 1:32 AM
Subject: [LARTC] imq question

Hi

I've a stupid question. How can I shape upload using IMQ?
Instead of putting a rule in iptables in PREROUTING should i use POSTROUTING?
And another question is, can I make routing rule based on ip addresses assigned by iptables to an imq device? The idea is, let's say i have some rules in iptables like: -t mangle -A PREROUTING -s 192.168.0.0/16 -j IMQ --todev 0 Can i route this class thru another ip, something like fwmark is doing? with iptables marking the packets and ip rule fwmark?

Best regards,
Alin