u32 filter and NAT
I want to limit each user in my network to have limited bandwidth (let's
say 256/128 kbit).
I use NAT (done with iptables).
Can I limit users on the outgoing interface using u32 using rules like:
tc filter add dev eth0 parent 1: protocol ip prio 17 u32 match ip src 10.10.10.10 flowid 1:10
It seem I made a mistake somewhere or NAT is done before routing and I must use iptables mangling. BTW what is the maximum for --set-mark ?
Thanks!
Szymon Miotk
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 10 lines · Szymon Miotk
I want to limit each user in my network to have limited bandwidth (let's
say 256/128 kbit).
I use NAT (done with iptables).
Can I limit users on the outgoing interface using u32 using rules like:tc filter add dev eth0 parent 1: protocol ip prio 17 u32 match ip src 10.10.10.10 flowid 1:10
It seem I made a mistake somewhere or NAT is done before routing and I must use iptables mangling.
The src address is indeed rewritten. So you have to mark the packets with iptables before natting and use that mark with the fw filter.
Quoted 1 line
BTW what is the maximum for --set-mark ?
Mark is 32 or so, so you can go pretty high.
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/