In this recipe, we will present layer 4 TCP/UDP port filters and how we can use them with capture filters.
Configuring TCP/UDP and port filters
Getting ready
The basic layer 4 filters are:
- port <port>: When the packet is a layer 4 protocol, such as TCP or UDP, this filter will capture packets to/from the port indicated in the identifier field
- dst port <port>: When the packet is a layer 4 protocol, such as TCP or UDP, this filter will capture packets to the destination port indicated in the identifier field
- src port <port>: When the packet is a layer 4 protocol, such as TCP or UDP, this filter will capture packets to the source port indicated in the identifier field
The port range matching filters are:
- ...