tcpdump reminder note

Translation of the original in Catalan. Read it in: CatalàCastellano

I never remember the syntax to filter with tcpdump when I need it, so here it is:

tcpdump -i eth0 -n tcp port 1500
tcpdump host 10.0.1.12
tcpdump icmp and host 10.0.1.12
tcpdump -i eth1 host 10.0.1.11 and host 10.0.1.12

Some expressions for ethereal/wireshark that can also be used with tcpdump, of course:

ip.dst == 10.0.1.50 && frame.pkt_len > 400
ip.addr == 10.0.1.12 && icmp && frame.number > 15 && frame.number < 30
ip.addr == 10.0.1.12 && tcp.port == 23
host 10.0.1.12 and tcp port 23