FROM sk30583
fw monitor -F "{src IP}, {src port}, {dst IP}, {dst port}, {protocol num}"
Filtering the packets based on IP/port/protocol.
Notes:
- Value 0 is used as "any".
- Up to 5 filters are supported. Multiple filters are applied on packets in OR logical manner.
Note: Relevant for R80.20 from Jumbo Hotfix Accumulator for R80.20 (Take 73)
examples using fw monitor -F "{src IP}, {src port}, {dst IP}, {dst port}, {protocol num}":
fw monitor -F "0, 0, 0, 443, 0"
fw monitor -F "0, 0, 2.2.2.2, 0, 0"
fw monitor -F "1.1.1.1, 0, 2.2.2.2, 443, 0"
example for all DNS traffic which also captures all return traffic from DNS
fw monitor -F "0, 0, 0, 53, 0" -F "0, 53, 0, 0, 0" -w
I believe you need -w for full packet length capture and can still use -o to output files.
There is also a fw monitor -U to set fw monitor back to defaults. It appears to unload the monitor but not really sure what that does - I'm still testing the syntax and searching for more detailed documentation.