apps:tcpdump
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
apps:tcpdump [2024-09-20 22:22] – Manuel Frei | apps:tcpdump [2025-01-29 12:36] (current) – icmp Manuel Frei | ||
---|---|---|---|
Line 31: | Line 31: | ||
===== Filter Examples ===== | ===== Filter Examples ===== | ||
- | ==== Port include | + | ==== Specific |
<code bash> | <code bash> | ||
tcpdump -n -tttt -i rl0 dst port 221027 | tcpdump -n -tttt -i rl0 dst port 221027 | ||
</ | </ | ||
- | ==== Host include | + | ==== Specific |
<code bash> | <code bash> | ||
tcpdump -n -tttt -i rl0 host 192.168.10.2 | tcpdump -n -tttt -i rl0 host 192.168.10.2 | ||
</ | </ | ||
- | ==== SSH exclude | + | ==== Exclude |
<code bash> | <code bash> | ||
tcpdump -n -i rl0 'not port 22' | tcpdump -n -i rl0 'not port 22' | ||
</ | </ | ||
- | ==== Filter | + | ==== Specific |
<code bash> | <code bash> | ||
tcpdump -n 'net 2001: | tcpdump -n 'net 2001: | ||
</ | </ | ||
| | ||
- | ==== Show IPsec packets ==== | + | ==== IPsec packets ==== |
<code bash> | <code bash> | ||
tcpdump -i igb0 -n -p 'udp port 500 or udp port 4500 or ip proto 50' | tcpdump -i igb0 -n -p 'udp port 500 or udp port 4500 or ip proto 50' | ||
+ | </ | ||
+ | |||
+ | ==== TCP SYN packets ==== | ||
+ | |||
+ | === IPv4 === | ||
+ | |||
+ | <code bash> | ||
+ | tcpdump -i eth0 -nn " | ||
+ | </ | ||
+ | |||
+ | === IPv6 === | ||
+ | |||
+ | <code bash> | ||
+ | tcpdump -i eth0 -nn "ip6 and (ip6[6] == 0x06) and (ip6[53] == 0x02)" | ||
+ | </ | ||
+ | |||
+ | === IPv4 & IPv6 === | ||
+ | |||
+ | <code bash> | ||
+ | tcpdump -i eth0 -nn " | ||
+ | </ | ||
+ | |||
+ | ==== ICMP without echo request/ | ||
+ | |||
+ | <code bash> | ||
+ | tcpdump -ni eth0 ' | ||
</ | </ | ||
Line 70: | Line 96: | ||
==== Dump for Wireshark with rotation ==== | ==== Dump for Wireshark with rotation ==== | ||
<code bash> | <code bash> | ||
- | tcpdump -i lo -G $((10*60)) | + | tcpdump -i lo -G $((10*60)) -w / |
</ | </ | ||
Line 78: | Line 104: | ||
* -G < | * -G < | ||
* Rotate logs every 10 minutes. | * Rotate logs every 10 minutes. | ||
- | |||
- | * -s 65535 | ||
- | * Capture full package. | ||
* -w / | * -w / |
apps/tcpdump.1726863756.txt.gz · Last modified: 2024-09-20 22:22 by Manuel Frei