Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
17.7 Legacy Series
»
[SOLVED] Filter params when searching logs
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Filter params when searching logs (Read 4855 times)
rabievdm
Newbie
Posts: 30
Karma: 2
[SOLVED] Filter params when searching logs
«
on:
October 25, 2017, 04:51:13 pm »
Hi,
Am I just being stupid, is there a way to specify and explicit value when using the WUI to search the firewall logs?
eg: Going to Firewall>Logs>Normal View and searching for an ip of "192.168.0.1" and it would return 192.168.0.1* ie .1 and any combination of .1
....
I have found that a $ at the end seems to terminate the search so I have my answer, but now I am wondering are there any other permissable wildcards? "*" doesn't seem to work?
«
Last Edit: October 27, 2017, 09:20:42 am by rabievdm
»
Logged
franco
Administrator
Hero Member
Posts: 17668
Karma: 1611
Re: Filter params when searching logs
«
Reply #1 on:
October 25, 2017, 08:58:48 pm »
Hi there,
It's a full regex. Didn't even know that.
".*" is short for 0-n characters of anything. "1*" is short for 0-n characters of 1. So you need "1.*".
For the full thing see e.g.
https://www.debuggex.com/cheatsheet/regex/pcre
Cheers,
Franco
Logged
franco
Administrator
Hero Member
Posts: 17668
Karma: 1611
Re: Filter params when searching logs
«
Reply #2 on:
October 25, 2017, 09:00:02 pm »
PS: On a somewhat silly note the "." in an IP address is actually matched by "\.", otherwise it can match more.
Logged
rabievdm
Newbie
Posts: 30
Karma: 2
Re: Filter params when searching logs
«
Reply #3 on:
October 27, 2017, 09:09:31 am »
Thanks Franco, I did try regex, but prob messed it up, I'm a little rusty
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
17.7 Legacy Series
»
[SOLVED] Filter params when searching logs