Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Witam mam problem z wykonaniem tego skrytu :
tc qdisc del root dev eth0 tc qdisc add dev eth0 root handle 2:0 htb default 5 tc class add dev eth0 parent 2:0 classid 2:1 htb rate 9mbit ceil 9mbit #Upload tc class add dev eth0 parent 2:1 classid 2:2 htb rate 70kbit ceil 70kbit #ack/syn/fin tc class add dev eth0 parent 2:2 classid 2:3 htb rate 10kbit ceil 35kbit prio 1 #ssh tc class add dev eth0 parent 2:2 classid 2:4 htb rate 10kbit ceil 18kbit prio 2 #else tc class add dev eth0 parent 2:2 classid 2:5 htb rate 35kbit ceil 70kbit prio 2 #disciplines tc qdisc add dev eth0 parent 2:3 sfq perturb 10 tc qdisc add dev eth0 parent 2:4 sfq perturb 10 tc qdisc add dev eth0 parent 2:5 sfq perturb 10 #Filter traffic iptables -t mangle -F POSTROUTING iptables -t mangle -A POSTROUTING -o eth0 -m lenght --lenght 0:128 -j CLASSIFY --set-Class 2:3 iptables -t mangle -A POSTROUTING -o eth0 -m lenght --lenght 0:128 -j RETURN iptables -t mangle -A POSTROUTING -o eth0 -p tcp --sport 22 -j CLASSIFY --set-calss 2:4 iptables -t mangle -A POSTROUTING -o eth0 -p tcp --dport 22 -j CLASSIFY --set-calss 2:4 iptables -t mangle -A POSTROUTING -o eth0 -p tcp --sport 22 -j RETURN iptables -t mangle -A POSTROUTING -o eth0 -p tcp --dport 22 -j RETURN iptables -t mangle -A POSTROUTING -o eth0 -j CLASSIFY --set-class 1:5 iptables -t mangle -A POSTROUTING -o eth0 -j RETURN
Iptables ma problemy z:
"-m lenght --lenght 0:128 "
iptables v1.4.8: Couldn't load match `lenght':/lib/xtables/libipt_lenght.so: cannot open shared object file: No such file or directory Try `iptables -h' or 'iptables --help' for more information.
"-j CLASSIFY --set-Class 2:3"
iptables v1.4.8: unknown option `--set-calss' Try `iptables -h' or 'iptables --help' for more information.
Debian wersja Stabilna, jajko 2.6.32-5-686
Offline
CLASSIFY target options: --set-class MAJOR:MINOR Set skb->priority value (always hexadecimal!)
Np:
iptables -t mangle -I POSTROUTING -o eth0 -p TCP --sport 80 --j CLASSIFY --set-class 1:2
Wynik:
iptables -t mangle -S | grep CLASSIFY -A POSTROUTING -o eth0 -p tcp -m tcp --sport 80 -j CLASSIFY --set-class 0001:0002
length match options: [!] --length length[:length] Match packet length against value or range of values (inclusive)
Np:
iptables -I INPUT -p icmp -m length --length 256:65535 -m state --state NEW -j DROP
Wynik
iptables -S | grep length -A INPUT -p icmp -m length --length 256:65535 -m state --state NEW -j DROP
[quote=Pablik]Iptables ma problemy z:
"-m lenght --lenght 0:128 "[/quote]
Pewien jesteś?
root # iptables -t mangle -A POSTROUTING -o eth0 -m length --length 0:128 -j CLASSIFY --set-class 2:3 root # root # iptables -t mangle -S | grep '0:128' -A POSTROUTING -o eth0 -m length --length 0:128 -j CLASSIFY --set-class 0002:0003
SOA#1
To by było na tyle
;-)
Ostatnio edytowany przez Jacekalex (2012-01-20 18:10:05)
Offline
ok już widzę błąd dzięki
tc qdisc del root dev eth0 tc qdisc add dev eth0 root handle 2:0 htb default 5 tc class add dev eth0 parent 2:0 classid 2:1 htb rate 9mbit ceil 9mbit #Upload tc class add dev eth0 parent 2:1 classid 2:2 htb rate 70kbit ceil 70kbit #ack/syn/fin tc class add dev eth0 parent 2:2 classid 2:3 htb rate 10kbit ceil 35kbit prio 1 #ssh tc class add dev eth0 parent 2:2 classid 2:4 htb rate 10kbit ceil 18kbit prio 2 #else tc class add dev eth0 parent 2:2 classid 2:5 htb rate 35kbit ceil 70kbit prio 2 #disciplines tc qdisc add dev eth0 parent 2:3 sfq perturb 10 tc qdisc add dev eth0 parent 2:4 sfq perturb 10 tc qdisc add dev eth0 parent 2:5 sfq perturb 10 #Filter traffic iptables -t mangle -F POSTROUTING iptables -t mangle -A POSTROUTING -o eth0 -m length --length 0:128 -j CLASSIFY --set-Class 2:3 iptables -t mangle -A POSTROUTING -o eth0 -m length --length 0:128 -j RETURN iptables -t mangle -A POSTROUTING -o eth0 -p TCP --sport 22 --j CLASSIFY --set-class 2:4 iptables -t mangle -A POSTROUTING -o eth0 -p TCP --dport 22 --j CLASSIFY --set-class 2:4 iptables -t mangle -A POSTROUTING -o eth0 -p TCP --sport 22 --j RETURN iptables -t mangle -A POSTROUTING -o eth0 -p TCP --dport 22 --j RETURN iptables -t mangle -A POSTROUTING -o eth0 -j CLASSIFY --set-class 1:5 iptables -t mangle -A POSTROUTING -o eth0 -j RETURN
Ostatnio edytowany przez Pablik (2012-01-20 18:24:20)
Offline
Time (s) | Query |
---|---|
0.00012 | SET CHARSET latin2 |
0.00006 | SET NAMES latin2 |
0.00143 | SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='3.144.82.128' WHERE u.id=1 |
0.00096 | REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '3.144.82.128', 1732301060) |
0.00060 | SELECT * FROM punbb_online WHERE logged<1732300760 |
0.00094 | SELECT topic_id FROM punbb_posts WHERE id=191007 |
0.00107 | SELECT id FROM punbb_posts WHERE topic_id=20448 ORDER BY posted |
0.00074 | SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=20448 AND t.moved_to IS NULL |
0.00007 | SELECT search_for, replace_with FROM punbb_censoring |
0.00100 | SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=20448 ORDER BY p.id LIMIT 0,25 |
0.00154 | UPDATE punbb_topics SET num_views=num_views+1 WHERE id=20448 |
Total query time: 0.00853 s |