Add Nginx Log to IPBan #147
-
Hello , How can I add nginx log to IPBan?. Here's the log.
I tried with this regex https://regex101.com/r/eZgTH3/1 but didn't work. It give me an error
How can I fix this? I don't understand anything about regex, but I tried it with regex101 the rule is work, but not with IPBan. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Nevermind, this is the correct regex
I just remove the |
Beta Was this translation helpful? Give feedback.
-
Hello, I'm trying to configure ipban for nginx file from recipes for windows. but the suggested regular expression does not pass the test into regex101 (pattern error)
|
Beta Was this translation helpful? Give feedback.
-
Change to Java regex or if you use .net you are forced to use double quotes.
…-- Jeff
On Thu, Oct 10, 2024 at 6:46 AM rozhkovets ***@***.***> wrote:
Hello, I'm trying to configure ipban for nginx file from recipes for
windows. but the suggested regular expression does not pass the test into
regex101 (pattern error)
^(?<timestamp>[^\[]+)\[.*\s(?:(?<log>system\scannot\sfind).*|user\s"(?<username>[^"]+)"\swas\s(?<log>not\sfound).*)\sclient:\s(?<ipaddress>[^\s,]+)[^\n]*$
(?<log> A subpattern name must be unique) A subpattern name must be unique
—
Reply to this email directly, view it on GitHub
<#147 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJWQGAW5PIPFOVQ3DFN753Z2ZLG7AVCNFSM6AAAAABPWPR2TKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOJQGI4DEMA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Nevermind, this is the correct regex
I just remove the
P
on?p<name>