CBQ Traffic control not working
Indeed, I use transparent proxy, redirecting everything on port 80 to 3128, on the same machine. To make sure it's clear, the scenario is
simple: client enters eth1 on port 80, gets redirected to port 3128... I mark the packet depending on its source and than I apply a tc filter to direct it to the right tc class.
In this case how should I mark the packets in order to be able to aply filters by handle?
Mugur
Quoted 7 lines · Mugur TOMITA
The filters are there... if you take a closer look you'll that my copy/paste was falty...
But I can tell you I solved the problem. I attched my solution below. Stef, you are right, my filters are not working...
In fact I don't konow what I did wrong:
for marking packets depending on their source I used
Quoted 5 lines
ipchains -A output -p all -s 192.168.1.0/30 -m 1and the filters look like
tc filter add dev eth0 parent 1:0 protocol ip prio 1 handle 1 fw
classid 1:8 Could it be the fact that I made the marking on the output chains and not on the input chain?
Yes. If you nat, the source address is rewritten to the address of your firewall.
Stef
Signature · 8 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 8 lines · Mugur TOMITA
Indeed, I use transparent proxy, redirecting everything on port 80 to 3128, on the same machine. To make sure it's clear, the scenario is
simple: client enters eth1 on port 80, gets redirected to port 3128... I mark the packet depending on its source and than I apply a tc filter to direct it to the right tc class.In this case how should I mark the packets in order to be able to aply filters by handle?
If you mark packets when they enter eth1 and they are redirected to squid, the mark is lost and can't be used to filter with tc when they leave the box again.
Stef
Signature · 8 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 7 lines
Quoted 7 lines
Indeed, I use transparent proxy, redirecting everything on port 80 to 3128, on the same machine. To make sure it's clear, the scenario is
simple: client enters eth1 on port 80, gets redirected to port 3128... I mark the packet depending on its source and than I apply a tc filter to direct it to the right tc class.
Quoted 5 lines
Quoted 2 lines
In this case how should I mark the packets in order to be able to aply filters by handle?
If you mark packets when they enter eth1 and they are redirected to squid, the mark is lost and can't be used to filter with tc when they leave the box again.
Hi,
A solution to filter tcp packets by source address after packets go through squid could be to let squid mark the packets, for example, with the DSCP mark:
acl asdrubal src 192.168.1.2tcp_outgoing_dscp 0xb8 asdrubal
At the QoS egress, packets would be put in the wright traffic classes using dsmark.
Does this makes any sense? I am currently doing that, though I am still looking for a more generic approach ...
Regards,
Joana Urbano