Difference between revisions of "Tcpdump"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
Line 9: Line 9:
 
== SNMP ==
 
== SNMP ==
 
You can display incoming [[snmp]] traps using:
 
You can display incoming [[snmp]] traps using:
  tcpdump <abbr title="display all data">-A</abbr> <abbr title="SNMP trap port">port 162</abbr> <abbr title="print output with linefeeds and flushing to allow piping>-l</abbr> | [[hexdump]] -C
+
  tcpdump <abbr title="display all data">-A</abbr> <abbr title="SNMP trap port">port 162</abbr> <abbr title="print output with linefeeds and flushing to allow piping">-l</abbr> | [[hexdump]] -C
  
 
= See also =
 
= See also =

Revision as of 10:53, 6 May 2014

tcpdump is a command that allows you to monitor your network traffic.

Examples

dhcp

You can watch out for dhcp communication on your network using:

tcpdump -i eth1 port 67 and port 68

SNMP

You can display incoming snmp traps using:

tcpdump -A port 162 -l | hexdump -C

See also