
This is the syntax that Wireshark implements for filters it is not the same syntax that libpcap/WinPcap/Npcap implements.

Those filters can be specified as a parameter when capturing network traffic in Wireshark.ĭisplay filters are implemented by Wireshark they can perform complex tests on any "named field" in any protocol supported by Wireshark. This is the syntax that those libraries implement for filters this describes the filter of current versions of libpcap - older versions may not support all those features, and WinPcap is built on an older version of libpcap that doesn't support all those features. Port filter will make your analysis easy to show all packets to the selected port.There are two types of filters in Wireshark - capture filters and display filters.Ĭapture filters are implemented by the software that Wireshark uses to capture network traffic, namely the libpcap/WinPcap/Npcap library and the kernel-mode code they run on top of. In case there is no fixed port then system uses registered or public ports. Now we put “udp.dstport = 67 || udp.dstport = 68” as Wireshark filter and see only DHCP related packets.įor port filtering in Wireshark you should know the port number. When we run only UDP through Iperf we can see both source and destination ports are used from registered/public ports.ĥ. Now we put “tcp.port = 443” as Wireshark filter and see only HTTPS packets. Now we put “udp.port = 53” as Wireshark filter and see only packets where port is 53.ģ. Here 192.168.1.6 is trying to send DNS query. Now we put “tcp.port = 80” as Wireshark filter and see only packets where port is 80.Ģ. Here 192.168.1.6 is trying to access web server where HTTP server is running. Ports 1024 to 49151 are Registered Ports.īefore we use filter in Wireshark we should know what port is used for which protocol.In this article we will try to understand some well know ports through Wireshark analysis. To know more about filter by IP in Wireshark, please follow below link:

Port filtering is the way of filtering packets based on port number.
