1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-30 19:14:08 +02:00

tcpdump: add mnemonics and sudo (#17083)

This commit is contained in:
Managor 2025-07-03 03:50:06 +03:00 committed by GitHub
parent 9c7083310c
commit a9be97f390
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,13 +11,13 @@
`sudo tcpdump {{[-i|--interface]}} {{eth0}}`
- Capture all TCP traffic showing contents (ASCII) in console:
- Capture all TCP traffic showing contents ([A]SCII) in console:
`tcpdump -A tcp`
`sudo tcpdump -A tcp`
- Capture the traffic from or to a host:
`tcpdump host {{www.example.com}}`
`sudo tcpdump host {{www.example.com}}`
- Capture the traffic from a specific interface, source, destination and destination port:
@ -25,12 +25,12 @@
- Capture the traffic of a network:
`tcpdump net {{192.168.1.0/24}}`
`sudo tcpdump net {{192.168.1.0/24}}`
- Capture all traffic except traffic over port 22 and save to a dump file:
- Capture all traffic except traffic over port 22 and [w]rite to a dump file:
`tcpdump -w {{dumpfile.pcap}} port not {{22}}`
`sudo tcpdump -w {{dumpfile.pcap}} port not {{22}}`
- Read from a given dump file:
- [r]ead from a given dump file:
`tcpdump -r {{dumpfile.pcap}}`