Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
router na iptables -- detekcja markowanych pakietów
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Polish OTW
View previous topic :: View next topic  
Author Message
barthoosh
n00b
n00b


Joined: 17 Nov 2005
Posts: 13

PostPosted: Wed Aug 22, 2007 10:42 pm    Post subject: router na iptables -- detekcja markowanych pakietów Reply with quote

Witam,
szukam sposobu na sprawdzenie, czy dane połączenie (pakiet) jest markowane(y). Google wypluły małosensowne rady o tcpdump i innych sniferach. Pozdrawiam
Back to top
View user's profile Send private message
wrobeleczek
n00b
n00b


Joined: 23 Mar 2007
Posts: 9
Location: zaścianek

PostPosted: Thu Aug 23, 2007 11:52 am    Post subject: Reply with quote

Moim zdaniem google mają rację... zobacz np tu.. -> http://niceshaper.jedwabny.net/page/pl/zph
Jest tam wprawdzie opis o podziale pasma ale część dotycząca markowania również jest. Jako że interesował mnie ten squid i markowanie pakietów więc osobiście sprawdziłem to i co najważniejsze działało !! :) (markowanie oczywiście).
Back to top
View user's profile Send private message
barthoosh
n00b
n00b


Joined: 17 Nov 2005
Posts: 13

PostPosted: Thu Aug 23, 2007 12:18 pm    Post subject: router iptables -- detekcja markowanych pakietów Reply with quote

Witam,
jeśli google mają rację, dlaczego nie można znaleźć składni tcpdumpa, dzięki której można by to zobaczyć? Innymi słowy które pole w nagłówku, lub która część pakietu/ramki/datagramu jest zmieniana podczas operacji --set-mark ?
Rady nt. tcpdumpa tudzież snifferów wydają mi się mało sensowne, po lekturze:
http://iptables-tutorial.frozentux.net/iptables-tutorial.html#MARKTARGET
Chodzi konkretnie o zdania:
Quote:

Note that the mark value is not set within the actual packet, but is a value that is associated within the kernel with the packet. In other words, you can not set a MARK for a packet and then expect the MARK still to be there on another host. If this is what you want, you will be better off with the TOS target which will mangle the TOS value in the IP header.

O ile dobrze rozumiem pakiet nie jest zmieniany, a mark zmienia jakieś dodatkowe pole istniejące tylko przy podróży pakietu przez jądro. Jeśli się mylę proszę o sprostowanie i oświecenie. Jeśli dobrze rozumiem, to czy jakikolwiek snifer zapuszczony lokalnie może odczytać takie pole ?
Back to top
View user's profile Send private message
tokoloshe
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2003
Posts: 116

PostPosted: Thu Aug 23, 2007 4:19 pm    Post subject: Reply with quote

Musialby to byc sniffer, ktory korzysta jakos z netfilter, bo to w nim sa markowane pakiety (za pomoca set-mark). tcpdump i ethereal/wireshark korzystaja z libpcapa, niejako obok. Mozesz poszukac sobie na sieci, jest kilka poradnikow, jak napisac samemu sniiferek na poziomie netfilter. Pytanie czy nie da sie Twojego celu osiagnac w sposob inny-prostszy. Mozesz jakos dokladniej opisac co chcesz zrobic/osiagnac?
Back to top
View user's profile Send private message
barthoosh
n00b
n00b


Joined: 17 Nov 2005
Posts: 13

PostPosted: Thu Aug 23, 2007 6:04 pm    Post subject: Reply with quote

Ano chcę sprawdzić które połączenia P2P i SIP nie są markowane, a w związku z tym trafiają do klasy default. Pozdrawiam
Back to top
View user's profile Send private message
tokoloshe
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2003
Posts: 116

PostPosted: Thu Aug 23, 2007 6:45 pm    Post subject: Reply with quote

a takie cos nie wystarczy, umiesczone pod koniec (albo gdzie jest stosowne) regul?:
-A FORWARD -m connmark --mark 0 -j LOG --log-prefix "[firewall] niemarkowane"
mozesz do tego dorzucic -m state --state NEW, zeby widziec tylko inicjowane
Back to top
View user's profile Send private message
sir KAT
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2005
Posts: 118
Location: Kraków

PostPosted: Thu Aug 23, 2007 7:00 pm    Post subject: Reply with quote

Code:
cat /proc/net/ip_conntrack

o ile save'ujesz marki dla połączeń
_________________
Pozdrawiam!
Krzysiek
Back to top
View user's profile Send private message
Raku
Bodhisattva
Bodhisattva


Joined: 28 Feb 2004
Posts: 2374
Location: Poland

PostPosted: Fri Aug 24, 2007 8:46 am    Post subject: Reply with quote

Moved from Polish to Polish OTW.
_________________
raku

Powered by Archlinux ;-)
Back to top
View user's profile Send private message
barthoosh
n00b
n00b


Joined: 17 Nov 2005
Posts: 13

PostPosted: Fri Aug 24, 2007 2:50 pm    Post subject: Reply with quote

tokoloshe: Twoje rozwiązanie jest hm... kłopotliwe. Ten router nie ma za dużo miejsca na logi.
sir KAT: to działa! Dzięki.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Polish OTW All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum