tcpdump
tcpdump is useful command to track traffic on your network.
To see all traffic between your PC and a remote server, run
1 |
tcpdump -i any host google.com |
Here all traffic to google.com will be displayed.
To save the logs to a file, use
1 |
tcpdump -i any host google.com -w /tmp/test.pcap |
Monitor taffic to all ports other than a specific port.
1 2 |
tcpdump -c 100 port not 3333 tcpdump -w /tmp/test.pcap -c 100 port not ssh |