manuels Advocate
Joined: 22 Nov 2003 Posts: 2146 Location: Europe
|
Posted: Wed Aug 04, 2004 10:55 am Post subject: Bandbreitenlimitierung |
|
|
Hi,
ich will mir Shorewall die Bandbreite der einzelnen User/Ports regulieren, aber irgendwie lahmt ftp und http trotzdem (wenn mldonkey läuft [ports>4000]).
Hier meine /etc/shorewall/tcrules:
Code: | #MARK SOURCE DEST PROTO PORT(S) CLIENT USER
# PORT(S)
# DNS (domain) (wird dem Server angerechnet)
50 0.0.0.0/0 0.0.0.0/0 udp domain
50 0.0.0.0/0 0.0.0.0/0 tcp domain
50 0.0.0.0/0 0.0.0.0/0 tcp - domain
50 0.0.0.0/0 0.0.0.0/0 udp - domain
50 0.0.0.0/0 0.0.0.0/0 icmp
# for kilinho (1)
11 192.168.6.1 0.0.0.0/0 tcp www,https,ssh,smtp
12 192.168.6.1 0.0.0.0/0 udp :1024
12 192.168.6.1 0.0.0.0/0 tcp ftp,ftp-data,:1024
13 192.168.6.1 0.0.0.0/0 all
# counterstrike
11 192.168.6.1 0.0.0.0/0 tcp 6003,7006
11 192.168.6.1 0.0.0.0/0 udp 27005,27010,27011,27015
# for praxis (2)
21 192.168.7.1 0.0.0.0/0 tcp www,https,ssh,smtp
22 192.168.7.1 0.0.0.0/0 tcp ftp,ftp-data,:1024
22 192.168.7.1 0.0.0.0/0 udp :1024
23 192.168.7.1 0.0.0.0/0 all
# for manuel (3)
31 192.168.6.2 0.0.0.0/0 tcp www,https,ssh,smtp
32 192.168.6.2 0.0.0.0/0 tcp ftp,ftp-data,rsync,:1024
32 192.168.6.2 0.0.0.0/0 udp rsync,:1024
33 192.168.6.2 0.0.0.0/0 all
# for firewall (4)
41 127.0.0.1/24,192.168.6.200,192.168.7.200 0.0.0.0/0 tcp www,https,ssh,smtp
42 127.0.0.1/24,192.168.6.200,192.168.7.200 0.0.0.0/0 tcp ftp,ftp-data,rsync,:1024
42 127.0.0.1/24,192.168.6.200,192.168.7.200 0.0.0.0/0 udp :1024
43 127.0.0.1/24,192.168.6.200,192.168.7.200 0.0.0.0/0 all
|
und hier meine /etc/shorewall/tcstart:
Code: | #!/bin/bash
# alte rules verwerfen
ct=`tc qdisc show dev ppp0|wc -l`
[ ! `expr $ct` == 0 ] && tc qdisc del dev ppp0 root
# root disc erstellen, unclassified traffic kriegt fw.2 marke
tc qdisc add dev ppp0 root handle 1: htb default 42
# root class erstellen
tc class add dev ppp0 parent 1: classid 1:1 htb rate 786kbit ceil 786kbit #bounded
# fuer alle rechner classes erstellen
tc class add dev ppp0 parent 1:1 classid 1:10 htb rate 197kbit burst 5k ceil 786kbit prio 100 # kilinho (1)
tc class add dev ppp0 parent 1:1 classid 1:20 htb rate 196kbit burst 5k ceil 786kbit prio 100 # praxis (2)
tc class add dev ppp0 parent 1:1 classid 1:30 htb rate 197kbit burst 5k ceil 786kbit prio 100 # manuel (3)
tc class add dev ppp0 parent 1:1 classid 1:40 htb rate 196kbit burst 5k ceil 786kbit prio 100 # fw (4)
# ---------------------------- classes der nutzer -----------------------------
# classes fuer kilinho erstellen
tc class add dev ppp0 parent 1:10 classid 1:11 htb rate 90kbit burst 5k ceil 786kbit prio 1 # x1 Gruppe
tc class add dev ppp0 parent 1:10 classid 1:12 htb rate 75kbit burst 5k ceil 786kbit prio 10 # x2 Gruppe
tc class add dev ppp0 parent 1:10 classid 1:13 htb rate 31kbit burst 5k ceil 86kbit prio 40 # x3 Gruppe
# classes fuer praxis erstellen
tc class add dev ppp0 parent 1:20 classid 1:21 htb rate 90kbit burst 5k ceil 786kbit prio 1 # x1 Gruppe
tc class add dev ppp0 parent 1:20 classid 1:22 htb rate 75kbit burst 5k ceil 786kbit prio 10 # x2 Gruppe
tc class add dev ppp0 parent 1:20 classid 1:23 htb rate 31kbit burst 5k ceil 86kbit prio 40 # x3 Gruppe
# classes fuer manuel erstellen
tc class add dev ppp0 parent 1:30 classid 1:31 htb rate 90kbit burst 5k ceil 786kbit prio 1 # x1 Gruppe
tc class add dev ppp0 parent 1:30 classid 1:32 htb rate 75kbit burst 5k ceil 786kbit prio 10 # x2 Gruppe
tc class add dev ppp0 parent 1:30 classid 1:33 htb rate 31kbit burst 5k ceil 86kbit prio 40 # x3 Gruppe
# classes fuer fw erstellen
tc class add dev ppp0 parent 1:40 classid 1:41 htb rate 90kbit burst 5k ceil 786kbit prio 1 # x1 Gruppe
tc class add dev ppp0 parent 1:40 classid 1:42 htb rate 75kbit burst 5k ceil 786kbit prio 10 # x2 Gruppe
tc class add dev ppp0 parent 1:40 classid 1:43 htb rate 31kbit burst 5k ceil 86kbit prio 40 # x3 Gruppe
tc class add dev ppp0 parent 1:40 classid 1:50 htb rate 90kbit burst 5k ceil 786kbit prio 1 # hi prio
# ----------------- zuordnung
# fuer kilinho
tc filter add dev ppp0 protocol ip parent 1: prio 1 handle 11 fw flowid 1:11 # 11 Gruppe
tc filter add dev ppp0 protocol ip parent 1: prio 1 handle 12 fw flowid 1:12 # 12 Gruppe
tc filter add dev ppp0 protocol ip parent 1: prio 1 handle 13 fw flowid 1:13 # 13 Gruppe
# fuer praxis
tc filter add dev ppp0 protocol ip parent 1: prio 1 handle 21 fw flowid 1:21 # 21 Gruppe
tc filter add dev ppp0 protocol ip parent 1: prio 1 handle 22 fw flowid 1:22 # 22 Gruppe
tc filter add dev ppp0 protocol ip parent 1: prio 1 handle 23 fw flowid 1:23 # 23 Gruppe
# fuer fuckup
tc filter add dev ppp0 protocol ip parent 1: prio 1 handle 31 fw flowid 1:31 # 31 Gruppe
tc filter add dev ppp0 protocol ip parent 1: prio 1 handle 32 fw flowid 1:32 # 32 Gruppe
tc filter add dev ppp0 protocol ip parent 1: prio 1 handle 33 fw flowid 1:33 # 33 Gruppe
# fuer fw
tc filter add dev ppp0 protocol ip parent 1: prio 1 handle 41 fw flowid 1:41 # 41 Gruppe
tc filter add dev ppp0 protocol ip parent 1: prio 1 handle 42 fw flowid 1:42 # 42 Gruppe
tc filter add dev ppp0 protocol ip parent 1: prio 1 handle 43 fw flowid 1:43 # 43 Gruppe
tc filter add dev ppp0 protocol ip parent 1: prio 1 handle 50 fw flowid 1:50 # 50 Gruppe (hi priority)
|
Kann mir jemand von euch helfen?
Danke
Manuel |
|