From: Enrico Demarin <enricod@videotron.ca>
To: lartc@vger.kernel.org
Subject: [LARTC] Fwmark and REDIRECT rules
Date: Mon, 22 Mar 2004 14:35:49 +0000 [thread overview]
Message-ID: <1079966148.4228.11.camel@localhost.localdomain> (raw)
Hi ,
this is the situation , I am using a Linux gateway to shape the outbound
traffic coming from a LAN, configured ( for example ) as following (
using htb ):
ETH0 ( public interface )
1 ROOT class rate 10240 kbit, ceil 10240
2 LEAF class rate 8192, ceil 8192
3 LEAF class rate 2048 , ceil 2048
ETH1 ( LAN )
Then i define the following rules :
tc filter add dev eth0 parent 1:0 protocol ip prio 0 handle 0x10 fw
flowid 1:2
tc filter add dev eth0 parent 1:0 protocol ip prio 0 handle 0x20 fw
flowid 1:3
And set the iptables rules to assign the fwmarks :
/sbin/iptables -t mangle -F mygroup
/sbin/iptables -t mangle -X mygroup
/sbin/iptables -t mangle -N mygroup
/sbin/iptables -t mangle -A FORWARD -i eth1 -o eth0 -j mygroup
/sbin/iptables -t mangle -A mygroup -p tcp -m tcp --dport 80 -j MARK
--set-mark 0x20
/sbin/iptables -t mangle -A mygroup -p tcp -m tcp --dport 80 -j
RETURN
/sbin/iptables -t mangle -A mygroup -j MARK --set-mark 0x10
/sbin/iptables -t mangle -A mygroup -j RETURN
In theory , this should assign all packets with dest port 80 forwarded
from eth1 to eth0 to the 0x20 class, and the rest to the 0x10 class.
And it works, until i do something like this :
iptables -t nat -A PREROUTING -p tcp --source 10.1.0.0/24 --dport 80 -j
REDIRECT --to-ports 3128
to set up transparent proxy redirection to the local squid ( 10.1.0.0/24
is the subnet of eth1 ).
The redirection works but no packets end up in the 0x20 class.
Any way to shape even transparent-proxied traffic ?
thanks,
Enrico
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next reply other threads:[~2004-03-22 14:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-22 14:35 Enrico Demarin [this message]
2004-03-22 17:18 ` [LARTC] Fwmark and REDIRECT rules Roy
2004-03-22 17:38 ` Enrico Demarin
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=1079966148.4228.11.camel@localhost.localdomain \
--to=enricod@videotron.ca \
--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.