From: Kenneth Kalmer <kenneth.kalmer@gmail.com>
To: lartc@vger.kernel.org
Subject: [LARTC] Shaping and forward
Date: Tue, 08 Feb 2005 09:13:30 +0000 [thread overview]
Message-ID: <fad9d48405020801133fd96d34@mail.gmail.com> (raw)
Lartc readers
I have a peculiar problem with shaping and firewalling.
My tc rules work great, below is a smaller version:
#Root
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1: htb default 100
#Root Class
tc class add dev eth0 parent 1: classid 1:1 htb rate 1024kbit quantum
20000 burst 15k
#Class for each user
tc class add dev eth0 parent 1:1 classid 1:2 htb rate 32kbit ceil
128kbit prio 0 quantum 20000 burst 15k
tc class add dev eth0 parent 1:1 classid 1:3 htb rate 32kbit ceil
128kbit prio 0 quantum 20000 burst 15k
...
# SFQ qdisc for each user class
tc qdisc add dev eth0 parent 1:2 handle 12: sfq perturb 10
tc qdisc add dev eth0 parent 1:3 handle 13: sfq perturb 10
...
#Filters
tc filter add dev eth0 protocol ip parent 1: prio 0 handle 2 fw classid 1:2
tc filter add dev eth0 protocol ip parent 1: prio 0 handle 3 fw classid 1:3
...
#iptables mangle rules
iptables -t mangle -A POSTROUTING -o eth1 -d 192.168.0.1 -j MARK --set-mark 2
iptables -t mangle -A POSTROUTING -o eth1 -d 192.168.0.2 -j MARK --set-mark 2
...
#iptables allow forwarding on MAC address
iptables -A FORWARD -o ppp0 -m mac --mac-source 00:0D:61:30:10:75 -j ACCEPT
iptables -A FORWARD -o eth1 -m mac --mac-source 00:10:B5:01:AA:D0 -j ACCEPT
...
Should note that the default policy of filter->forward is DROP. All
other chains are defaulting on ACCEPT
Now, no users can connect through the gateway. Our test traffic for
the shapping works perfectly, but no internet traffic works. iptables
-nvL output shows that the packets move through the forward chain in
filter, but it doesn't reach the mangle table for marking the packets.
It's as if the packets disappear...
Anybody got some ideas? I still have to test the shaping using u32
matching, using iptables to do forwarding.
Thanks in advance
--
Kenneth Kalmer
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next reply other threads:[~2005-02-08 9:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-08 9:13 Kenneth Kalmer [this message]
2005-02-08 12:15 ` [LARTC] Shaping and forward Andy Furniss
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=fad9d48405020801133fd96d34@mail.gmail.com \
--to=kenneth.kalmer@gmail.com \
--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.