![]() |
|
|
|
|
|||||||
| IP Networking Questions involving TCP/IP, Routers, Hubs, Network protocols, etc go here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| mail command woth Postfix | piltrafa | UNIX for Dummies Questions & Answers | 1 | 12-18-2007 04:34 AM |
| IPtables | 182x | IP Networking | 1 | 11-27-2006 10:03 PM |
| IPtables | Jody | UNIX for Dummies Questions & Answers | 3 | 05-31-2003 05:08 PM |
| Ftp'ing thru a Iptables NAT Masquerade | phrater | IP Networking | 2 | 09-04-2002 10:18 AM |
| iptables, ftp | sTorm | UNIX for Dummies Questions & Answers | 2 | 03-18-2002 11:18 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Need help woth iptables
Trying to create a whitelist to limit bandwidth. My sync speed is 1536/256 kbps.
Simple rules in order: 1. Do not limit (or set to 1536/256) MAC 00:00:00:00:00 (computer is in 192.168.1.0/24). 2. Do not limit (or set to 1536/256) MAC 00:00:00:00:01 (computer is in 192.168.1.0/24). 3. Do not limit (or set to 1536/256) MAC 00:00:00:00:02 (computer is in 192.168.1.0/24). 4. Do not limit (or set to 1536/256) MAC 00:00:00:00:03 (computer is in 192.168.1.0/24). 5. Limit IP range 192.168.1.2 -> 192.168.1.254 (or all MAC/IP's) to 500/60 kbps. This is the code which i was given and it doesnt work Code:
TCA="tc class add dev br0" TFA="tc filter add dev br0" TQA="tc qdisc add dev br0" SFQ="sfq perturb 10" tc qdisc del dev br0 root tc qdisc add dev br0 root handle 1: htb tc class add dev br0 parent 1: classid 1:1 htb rate 1500kbps $TCA parent 1:1 classid 1:99 htb rate 1kbps ceil 50kbps prio 2 $TQA parent 1:99 handle 99: $SFQ $TFA parent 1:0 prio 2 protocol ip handle 99 fw flowid 1:99 iptables -t mangle -A POSTROUTING -m iprange --dst-range 192.168.1.2-192.168.1.254 -j MARK --set-mark 99 TCAU="tc class add dev imq0" TFAU="tc filter add dev imq0" TQAU="tc qdisc add dev imq0" modprobe imq modprobe ipt_IMQ ip link set imq0 up tc qdisc del dev imq0 root tc qdisc add dev imq0 root handle 1: htb tc class add dev imq0 parent 1: classid 1:1 htb rate 250kbps $TCAU parent 1:1 classid 1:10 htb rate 1kbps ceil 250kbps prio 1 $TCAU parent 1:1 classid 1:11 htb rate 1kbps ceil 250kbps prio 1 $TCAU parent 1:1 classid 1:12 htb rate 1kbps ceil 250kbps prio 1 $TCAU parent 1:1 classid 1:13 htb rate 1kbps ceil 250kbps prio 1 $TCAU parent 1:1 classid 1:14 htb rate 1kbps ceil 250kbps prio 1 $TCAU parent 1:1 classid 1:99 htb rate 1kbps ceil 6kbps prio 2 $TQAU parent 1:10 handle 10: $SFQ $TQAU parent 1:11 handle 11: $SFQ $TQAU parent 1:12 handle 12: $SFQ $TQAU parent 1:13 handle 13: $SFQ $TQAU parent 1:14 handle 14: $SFQ $TQAU parent 1:99 handle 99: $SFQ $TFAU parent 1:0 prio 2 protocol ip handle 99 fw flowid 1:99 iptables -t mangle -A PREROUTING -m mac --mac-source 00:00:00:00:00:01 -j MARK --set-mark 10 iptables -t mangle -A PREROUTING -m mac --mac-source 00:00:00:00:00:02 -j MARK --set-mark 11 iptables -t mangle -A PREROUTING -m mac --mac-source 00:00:00:00:00:03 -j MARK --set-mark 12 iptables -t mangle -A PREROUTING -m mac --mac-source 00:00:00:00:00:04 -j MARK --set-mark 13 iptables -t mangle -A PREROUTING -m mac --mac-source 00:00:00:00:00:05 -j MARK --set-mark 14 iptables -t mangle -A PREROUTING -m iprange --src-range 192.168.1.2-192.168.1.254 -j MARK --set-mark 99 iptables -t mangle -A PREROUTING -j IMQ --todev 0 |
|||
| Google UNIX.COM |
| Forum Sponsor | ||
|
|