FAQ | Points | Add... | Recent posts | Search | Register | Log in


IPTABLES i statystyki skype


Post new topic  Reply to topic      Main Page -> Forum Index -> Network, Internet -> Computer Networks -> IPTABLES i statystyki skype
Author
Message
NeoX
Poziom 15
Poziom 15


Joined: 16 Oct 2004
Posts: 209
Location: Łódź

Post#1 Post from the author of the topic 18 Mar 2010 15:30   

IPTABLES i statystyki skype


Witajcie!

Dopiero uczę się obsługi IPTABLES, i próbuję znaleźć rozwiązanie jak zliczać ruch skype'a.
Do tej pory udało mi się zrobić statystyki dla zadanych adresów IP i MAC:
Quote:
iptables -A download -d 192.168.1.X
iptables -A upload -s 192.168.1.X

Próbuję teraz jednak zrobić to samo dla ruchu monitorowanego przez Layer7 (np. tytulowy skype) zgodnie z instrukcją do czego dane tabele sluza i nie idzie:
Quote:
#iptables -N skype
#iptables -t mangle -A FORWARD -m layer7 --l7proto skypetoskype -j skype

iptables v1.3.7: Couldn't load target `skype':File not found

Try `iptables -h' or 'iptables --help' for more information.
#

To mój pomysł.
ale nawet jak postąpie zgodnie z instrukcją podaną na oficjalnej stronie layer7:
Quote:
3. Accouting

If you just want to keep track of what's in use on your network, simply use the above command without any -j option. For example:

iptables -t mangle -A POSTROUTING -m layer7 --l7proto imap

#iptables -t mangle -A POSTROUTING -m layer7 --l7proto imap
iptables: No chain/target/match by that name

Czy ktoś może mi pomóc?
Dlaczego u mnie to nie działa?
Może nie na każdej dystrybucji to działa? (ja używam tomato dla routera WRT54GL)
Back to top
   
Alana
Poziom 23
Poziom 23


Joined: 28 Jul 2002
Posts: 2571
Location: Gdańsk

Post#2 18 Mar 2010 21:44   

Re: IPTABLES i statystyki skype


Code:
debian:/home/alana# iptables -N SKYPE -t mangle
debian:/home/alana# iptables -t mangle -A FORWARD -m layer7 --l7proto skypetoskype -j SKYPE

Tak poprawione u mnie dziala :D
Back to top
   
Google

Google Adsense


Post# 18 Mar 2010 21:44   





Back to top
   
Ciapol
Poziom 19
Poziom 19


Joined: 13 May 2003
Posts: 604
Location: Z-ja

Post#3 19 Mar 2010 08:29   

Re: IPTABLES i statystyki skype


U mnie na WRT54GL Twój sposób nie ruszył. Chyba związane jest to z konkretną dystrybucją.
Back to top
   
Alana
Poziom 23
Poziom 23


Joined: 28 Jul 2002
Posts: 2571
Location: Gdańsk

Post#4 19 Mar 2010 08:37   

Re: IPTABLES i statystyki skype


Mysle ze raczej od tego co masz wkompilowane w kernelu. W "duzych" PC nie ma problemu z kompilacja kernela po swojemu na wiekszosci dystrybucji wiec to nie problem, nie wiem jak w przypadku routera.
Inna sprawa - linux rozroznia duze i male litery, czy moze tu czegos nie pomieszales?
Back to top
   
Ciapol
Poziom 19
Poziom 19


Joined: 13 May 2003
Posts: 604
Location: Z-ja

Post#5 19 Mar 2010 08:39   

Re: IPTABLES i statystyki skype


Quote:
Inna sprawa - linux rozroznia duze i male litery, czy moze tu czegos nie pomieszales?

Tu na pewno nic nie pomieszałem.
Po
Code:
iptables -t mangle -A FORWARD -m layer7 --l7proto skypetoskype -j SKYPE

dostaję
Code:
iptables: No chain/target/match by that name
.
Back to top
   
Alana
Poziom 23
Poziom 23


Joined: 28 Jul 2002
Posts: 2571
Location: Gdańsk

Post#6 19 Mar 2010 08:43   

Re: IPTABLES i statystyki skype


Code:
debian:/home/alana# iptables -N SKYPE -t mangle

To jest wazne, musisz ten lancuch utworzyc tam gdzie go wykozystasz czyli w mangle. I dopiero potem layer7.
Back to top
   
Ciapol
Poziom 19
Poziom 19


Joined: 13 May 2003
Posts: 604
Location: Z-ja

Post#7 19 Mar 2010 08:44   

Re: IPTABLES i statystyki skype


To jak najbardziej dopisałem wcześniej. Problem jest tylko tam gdzie napisałem.
Back to top
   
Alana
Poziom 23
Poziom 23


Joined: 28 Jul 2002
Posts: 2571
Location: Gdańsk

Post#8 19 Mar 2010 08:56   

Re: IPTABLES i statystyki skype


Daj wynik iptables -L i iptables -t mangle -L po wpisaniu tych polecen.
Back to top
   
Google

Google Adsense


Post# 19 Mar 2010 08:56   





Back to top
   
Ciapol
Poziom 19
Poziom 19


Joined: 13 May 2003
Posts: 604
Location: Z-ja

Post#9 19 Mar 2010 09:01   

Re: IPTABLES i statystyki skype


iptables -L:
Code:
Chain INPUT (policy DROP)
target     prot opt source               destination
DROP       0    --  anywhere             10.10.8.184
DROP       0    --  anywhere             anywhere            state INVALID
ACCEPT     0    --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     0    --  anywhere             anywhere
ACCEPT     0    --  anywhere             anywhere

Chain FORWARD (policy DROP)
target     prot opt source               destination
download   0    --  anywhere             anywhere
upload     0    --  anywhere             anywhere
ACCEPT     0    --  anywhere             anywhere
DROP       0    --  anywhere             anywhere            state INVALID
TCPMSS     tcp  --  anywhere             anywhere            tcp flags:SYN,RST/SYN tcpmss match 1461:65535 TCPMSS set 1460
ACCEPT     0    --  anywhere             anywhere            state RELATED,ESTABLISHED
wanin      0    --  anywhere             anywhere
wanout     0    --  anywhere             anywhere
ACCEPT     0    --  anywhere             anywhere
upnp       0    --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain download (1 references)
target     prot opt source               destination
           0    --  anywhere             PS3
           0    --  anywhere             Marcin-LAP
           0    --  anywhere             Marcin
           0    --  anywhere             Jakub
           0    --  anywhere             Glowny_rout_Dersena

Chain upload (1 references)
target     prot opt source               destination
           0    --  PS3                  anywhere
           0    --  Marcin-LAP           anywhere
           0    --  Marcin               anywhere
           0    --  Jakub                anywhere
           0    --  Glowny_rout_Dersena  anywhere

Chain upnp (1 references)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             Marcin              tcp dpt:18981
ACCEPT     udp  --  anywhere             Marcin              udp dpt:18981
ACCEPT     udp  --  anywhere             Marcin              udp dpt:32923
ACCEPT     tcp  --  anywhere             Marcin              tcp dpt:32923

Chain wanin (1 references)
target     prot opt source               destination

Chain wanout (1 references)
target     prot opt source               destination


iptables -t mangle -L

Code:
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
TTL        0    --  anywhere             anywhere            TTL increment by 1
MARK       0    --  anywhere             anywhere            MAC xx:xx:xx:xx:xx:xx MARK set 0xa
MARK       0    --  anywhere             anywhere            MAC 00:16:xx:xx:xx:xx MARK set 0xb
MARK       0    --  anywhere             anywhere            MAC 00:22:xx:xx:xx:xx MARK set 0xc
MARK       0    --  anywhere             anywhere            MAC 00:19:xx:xx:xx:xx MARK set 0xd
IMQ        0    --  anywhere             anywhere            IMQ: todev 0

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
QOSO       0    --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
QOSO       0    --  anywhere             anywhere

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
TTL        0    --  anywhere             anywhere            TTL increment by 1

Chain QOSO (2 references)
target     prot opt source               destination
BCOUNT     0    --  anywhere             anywhere
CONNMARK   0    --  anywhere             anywhere            CONNMARK restore mask 0xff
RETURN     0    --  anywhere             anywhere            CONNMARK match !0x0/0xff00
CONNMARK   tcp  --  anywhere             anywhere            mport dports www,https bcount --range 0:524287 CONNMARK set-return 0x2/0xff
CONNMARK   tcp  --  anywhere             anywhere            mport dports www,https bcount --range 524288+ CONNMARK set-return 0x4/0xff
CONNMARK   udp  --  anywhere             anywhere            udp dpt:domain bcount --range 0:2047 CONNMARK set-return 0x1/0xff
CONNMARK   tcp  --  anywhere             anywhere            tcp dpt:domain bcount --range 0:2047 CONNMARK set-return 0x1/0xff
CONNMARK   udp  --  anywhere             anywhere            udp dpt:domain bcount --range 2048+ CONNMARK set-return 0x5/0xff
CONNMARK   tcp  --  anywhere             anywhere            tcp dpt:domain bcount --range 2048+ CONNMARK set-return 0x5/0xff
CONNMARK   udp  --  anywhere             anywhere            udp dpts:1024:65535 CONNMARK set-return 0x5/0xff
CONNMARK   tcp  --  anywhere             anywhere            tcp dpts:1024:65535 CONNMARK set-return 0x5/0xff
CONNMARK   0    --  anywhere             anywhere            CONNMARK set-return 0x4

Chain SKYPE (0 references)
target     prot opt source               destination

Back to top
   
Alana
Poziom 23
Poziom 23


Joined: 28 Jul 2002
Posts: 2571
Location: Gdańsk

Post#10 19 Mar 2010 09:19   

Re: IPTABLES i statystyki skype


Niby jest co ma byc, jedyne co mi przychodzi do glowy to zmiana nazwy lancucha SKYPE na cos innego, mozliwe ze w twoim kernelu ta nazwa sie z czyms gryzie.
Back to top
   
Google

Google Adsense


Post# 19 Mar 2010 09:19   





Back to top
   
Ciapol
Poziom 19
Poziom 19


Joined: 13 May 2003
Posts: 604
Location: Z-ja

Post#11 19 Mar 2010 09:22   

Re: IPTABLES i statystyki skype


Niestety to samo.
Back to top
   
Alana
Poziom 23
Poziom 23


Joined: 28 Jul 2002
Posts: 2571
Location: Gdańsk

Post#12 19 Mar 2010 09:26   

Re: IPTABLES i statystyki skype


Code:
iptables -t mangle -A FORWARD -m layer7 --l7proto skypetoskype -j ACCEPT
Jak i to odrzuci to masz cos z layer7.
Back to top
   
Ciapol
Poziom 19
Poziom 19


Joined: 13 May 2003
Posts: 604
Location: Z-ja

Post#13 19 Mar 2010 09:26   

Re: IPTABLES i statystyki skype


Tak już też próbowałem. Niestety odrzuca. Tak samo jak skypeout i skypein.
Back to top
   
Alana
Poziom 23
Poziom 23


Joined: 28 Jul 2002
Posts: 2571
Location: Gdańsk

Post#14 19 Mar 2010 10:16   

Re: IPTABLES i statystyki skype


Sprawdz czy kernel dla tej dystrybucji ma wkompilowane layer7, ja musialam do normalnego kernela dla PC dodawac poprawki zeby to dzialalo i przekompilowac.
Back to top
   
Post new topic  Reply to topic      Main Page -> Forum Index -> Network, Internet -> Computer Networks -> IPTABLES i statystyki skype
Page 1 of 1
Similar topics
iptables (8)
iptables (9)
Iptables. (6)
statystyki (1)
Skype - ostatnia wersja Skype ze starym interfejsem (1)
Skype brak obrazu pomimo że poza skype kamera działa. (3)
PHP, statystyki (2)
DI-604 - statystyki (1)
Neostrada z 2 mb na 10 mb - statystyki (4)
redhat 9...iptables... (5)

Page generation time: 0.124 seconds


FAQ || Administrator || Moderators || Widgets and banners || Contact
elektroda.pl topic RSS feed