TCPdump udp sur ip specifique

Résolu/Fermé
Utilisateur anonyme - 25 juil. 2019 à 14:50
mamiemando Messages postés 33079 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 23 avril 2024 - 10 sept. 2019 à 09:05
Bonjour,

J'ai beau chercher sur le google, je ne trouve pas..
-quelle est la commande tcpdump qui permet de capturer tout les flux udp, sur n'importe quel port, entre ma machine locale, et un adresse ip spécifique? (sans faire de | grep --line-buffered ip_spe)

merci.

Configuration: Windows / Chrome 75.0.3770.142

3 réponses

mamiemando Messages postés 33079 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 23 avril 2024 7 749
25 juil. 2019 à 14:57
Bonjour,

Lis ce tutoriel section "Filtrage" et "Cumulation des filtres".

Bonne chance
0
gigi_dsss Messages postés 121 Date d'inscription dimanche 26 mai 2019 Statut Membre Dernière intervention 3 août 2020 12
27 juil. 2019 à 21:46
Essai:
man tcpdump

Il y a pas meilleur outil que MAN

B.A.T.
0
gigi_dsss Messages postés 121 Date d'inscription dimanche 26 mai 2019 Statut Membre Dernière intervention 3 août 2020 12
7 sept. 2019 à 21:32
Bonsoir, est-ce que t'as trouvé ce dont tu avais besoin ?
0
Utilisateur anonyme
7 sept. 2019 à 21:57
Nop
0
gigi_dsss Messages postés 121 Date d'inscription dimanche 26 mai 2019 Statut Membre Dernière intervention 3 août 2020 12
Modifié le 7 sept. 2019 à 22:06
Voilà la page MAN (site) qui parle de tcpdump: https://www.tcpdump.org/manpages/tcpdump.1.html

Malheureusement je n'utilise pas TCPdump, pourquoi n'utilise tu pas WireShark ?

C'est plus complet et simple
0
Utilisateur anonyme
7 sept. 2019 à 22:02
Je n'ai pas de server graphique, je suis en full console.
0
gigi_dsss Messages postés 121 Date d'inscription dimanche 26 mai 2019 Statut Membre Dernière intervention 3 août 2020 12
Modifié le 7 sept. 2019 à 22:05
Cependant regarde ici:
EXAMPLES

To print all packets arriving at or departing from sundown:

tcpdump host sundown

To print traffic between helios and either hot or ace:

tcpdump host helios and \( hot or ace \)

To print all IP packets between ace and any host except helios:

tcpdump ip host ace and not helios

To print all traffic between local hosts and hosts at Berkeley:

tcpdump net ucb-ether

To print all ftp traffic through internet gateway snup: (note that the expression is quoted to prevent the shell from (mis-)interpreting the parentheses):

tcpdump 'gateway snup and (port ftp or ftp-data)'

To print traffic neither sourced from nor destined for local hosts (if you gateway to one other net, this stuff should never make it onto your local net).

tcpdump ip and not net localnet

To print the start and end packets (the SYN and FIN packets) of each TCP conversation that involves a non-local host.

tcpdump 'tcp[tcpflags] & (tcp-syn|tcp-fin) != 0 and not src and dst net localnet'

To print all IPv4 HTTP packets to and from port 80, i.e. print only packets that contain data, not, for example, SYN and FIN packets and ACK-only packets. (IPv6 is left as an exercise for the reader.)

tcpdump 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'

To print IP packets longer than 576 bytes sent through gateway snup:

tcpdump 'gateway snup and ip[2:2] > 576'

To print IP broadcast or multicast packets that were not sent via Ethernet broadcast or multicast:

tcpdump 'ether[0] & 1 = 0 and ip[16] >= 224'

To print all ICMP packets that are not echo requests/replies (i.e., not ping packets):

tcpdump 'icmp[icmptype] != icmp-echo and icmp[icmptype] != icmp-echoreply'

0
Utilisateur anonyme
7 sept. 2019 à 22:08
Effectivement je connais bien tout ça.mais ce que je voudrais c'est la commande tcpdump udp all port ipdest.
Sauf que je n'en connais pas la syntaxe et bizzarement je ne l'a trouve nulle part sur le web. Il n'y a que le tcpdump udp de port de dispo mais pas le tcpdump udp d'ip
0