Advanced Log Filter - Specify EXACT Port number
-
I would like to apply a (destination port) filter to the Firewall logs.
Is it possible to specify an exact port number? Right now I am getting port values that are not an exact match.
Example:
Destination Port #: 19
Results: 1900, 3190, 19, 51419, etc.Thanks!
-
As the help text under the Apply Filter button says, the fields accept regular expressions. So if you only want to match port
19
then you would anchor the regex with the start and end of string like so:^19$
-
@jimp That works! Thank you very much.
This is the external resource that I need to bookmark. ;)
https://www.php.net/manual/en/function.preg-match.php#105924 -
@anengelsen
Hi
you can also use a regular expression like this
(19) -
That matches the string anywhere in the port number, same as leaving it as
19
which isn't what OP wanted. They wanted it to only match port19
and no others, so using^19$
is the way to do it.