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!

Ogłoszenie

Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

#1  2012-01-20 17:41:39

  Pablik - Użytkownik

Pablik
Użytkownik
Zarejestrowany: 2010-10-21

iptables - brak jakichś pakietów

Witam mam problem z wykonaniem tego skrytu :

Kod:

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 "

Kod:

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"

Kod:

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

 

#2  2012-01-20 18:01:07

  Jacekalex - Podobno człowiek...;)

Jacekalex
Podobno człowiek...;)
Skąd: /dev/urandom
Zarejestrowany: 2008-01-07

Re: iptables - brak jakichś pakietów

Kod:

CLASSIFY target options:
--set-class MAJOR:MINOR    Set skb->priority value (always hexadecimal!)

Np:

Kod:

iptables -t mangle -I POSTROUTING -o eth0 -p TCP --sport 80 --j CLASSIFY --set-class 1:2

Wynik:

Kod:

iptables -t mangle -S | grep CLASSIFY
-A POSTROUTING -o eth0 -p tcp -m tcp --sport 80 -j CLASSIFY --set-class 0001:0002

Kod:

length match options:
[!] --length length[:length]    Match packet length against value or range
                                of values (inclusive)

Np:

Kod:

iptables -I INPUT -p icmp  -m length  --length  256:65535 -m state --state NEW  -j DROP

Wynik

Kod:

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ś?

Kod:

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)


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

#3  2012-01-20 18:15:28

  Pablik - Użytkownik

Pablik
Użytkownik
Zarejestrowany: 2010-10-21

Re: iptables - brak jakichś pakietów

ok już widzę błąd dzięki

Kod:

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

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
Możesz wyłączyć AdBlock — tu nie ma reklam ;-)

[ Generated in 0.011 seconds, 11 queries executed ]

Informacje debugowania

Time (s) Query
0.00015 SET CHARSET latin2
0.00004 SET NAMES latin2
0.00141 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.93.14' WHERE u.id=1
0.00091 REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '3.144.93.14', 1732596882)
0.00044 SELECT * FROM punbb_online WHERE logged<1732596582
0.00046 SELECT topic_id FROM punbb_posts WHERE id=191003
0.00087 SELECT id FROM punbb_posts WHERE topic_id=20448 ORDER BY posted
0.00069 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.00093 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.00108 UPDATE punbb_topics SET num_views=num_views+1 WHERE id=20448
Total query time: 0.00705 s