0
votes

HTTP uses port 80. I found this on the internet and used -f "tcp port 80" as the capture filter for capturing only HTTP traffic:

tshark -i Ethernet -f "tcp port 80"

But since I am a newbie, searching for port used by TCP and that used by UDP has confused me, since they both appear to have so so many ports.

So what capture filter do I use to capture only TCP and UDP traffic.

Thank you in advance.

1

1 Answers

0
votes

To capture all tcp or udp traffic, you would use:

tshark -i Ethernet -f "tcp or udp"

Refer to the pcap-filter man page for more information about capture filters.