Nowe posty

Autor Wątek: HTB filter - na porty nie działa?  (Przeczytany 377 razy)

renepl

  • Gość
HTB filter - na porty nie działa?
« dnia: 2006-12-21, 20:51:45 »
Witam mam problem wszystkie funkcje w htb chodzą oprucz tego ograniczenia transferu na poszczególny porty

Regułki --------------------------------------------
$tc qdisc add dev eth0 root handle 1:0 htb
$tc class add dev eth0 parent 1:0 classid 1:1 htb rate 480kbit ceil 480kbit

# Podzial na porty
$tc class add dev eth0 parent 1:1 classid 1:2 htb rate 256kbit ceil 256kbit
$tc class add dev eth0 parent 1:1 classid 1:3 htb rate 25kbit ceil 25kbit
$tc class add dev eth0 parent 1:1 classid 1:4 htb rate 5kbit ceil 5kbit
$tc class add dev eth0 parent 1:1 classid 1:5 htb rate 200kbit ceil 200kbit

# HTTPS
$tc filter add dev eth0 protocol ip parent 1:0 u32 match ip dst 192.168.0.10 match ip sport 443 0xffff flowid 1:2
# FTP
$tc filter add dev eth0 protocol ip parent 1:0 u32 match ip dst 192.168.0.10 match ip sport 20 0xffff flowid 1:3
$tc filter add dev eth0 protocol ip parent 1:0 u32 match ip dst 192.168.0.10 match ip sport 21 0xffff flowid 1:4

# WWW
$tc filter add dev eth0 protocol ip parent 1:0 u32 match ip dst 192.168.0.10 match ip sport 80 0xffff flowid 1:5

$tc qdisc add dev eth0 parent 1:2 handle 2:0 sfq perturb 10
$tc qdisc add dev eth0 parent 1:3 handle 3:0 sfq perturb 10
$tc qdisc add dev eth0 parent 1:4 handle 4:0 sfq perturb 10
$tc qdisc add dev eth0 parent 1:5 handle 5:0 sfq perturb 1

Po uruchomieniu htb system nie zwraca żadnuch błędów lecz nie ograncza transferów.

Jak wyrzuce z filtru "match ip sport 80 0xffff"  to wiadomo ograniczy wszystkie porty zgodnie z flowid

Próbwałem też ograniczyć
w sposób bez dst 192.168.0.10   / Myślałem że ograniczy wszystkim w sieci transfer na dany port lecz też nie działa!
$tc filter add dev eth0 protocol ip parent 1:0 u32 match ip sport 80 0xffff flowid 1:5

Co brakuje mi żeby ograniczenia działało na poszczególny port ?

moje iproute to ver 2-2.4.7   Proszę o pomoc