Wireshark Tutorial | Filters

In last tutorial to wireshark we saw how to capture packets using wireshark. In this tutorial we will have our look on how to filter them according to need. As told earlier wireshark is not only a sniffing tool it can also be used for testing protocol implementation and network monitoring, it does have lots of filters which many of us hardly ever use. So here we will discus only those filters which are mostly used.
Filtering by IP address:
Now suppose you want to filter all those packets where IP address is present then you have to type following command in filters,
if you also want to filter packets holding IP address, then above command will be modified as,
ip.addr== && ip.addr==
where && means AND. If you want to list packets which holds any one IP address from above then the same filter will be written as follows,
ip.addr== or ip.addr==
You can use as many && and or, but keep in mind all commands in wireshark strictly follow mathematical set theory for filtering so you have to be accurate to filter packets.
If you want to filter packets where source IP is and destination IP is then you can specify filters as follows,
You can use && and or switches equally with any filter.
Filtering by ports and protocols:
To filter packets by protocols just type name of protocol in filter box. For example TCP, UDP, HTTP, SMTP etc. To add port to filter add name of protocol appended by port number, look at following example,
ip.dst== && tcp.port=443
Above filter will list all packets from TCP port 443 for destination
Filtering by MAC address:
You can use following filter to list packets with specified MAC address.
Lastly before you specify new filter you have to clear previous filter, to do so press clear button after filtering box.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s