Adding IPv6 to fail2ban sensor (#19457)
* Fixing fail2ban regex for ipv6 * Adding IPv6 tests for fail2ban * Formating code for hound * Formating again * Formating again 2
This commit is contained in:
1 parent
8ef2f1f67b
commit
14dd8791ec
2 files changed
+22
-1
No files matched your search
@@ -64,7 +64,7 @@ class BanSensor(Entity):
|
||||
self.last_ban = None
|
||||
self.log_parser = log_parser
|
||||
self.log_parser.ip_regex[self.jail] = re.compile(
|
||||
r"\[{}\].(Ban|Unban) ([\w+\.]{{3,}})".format(re.escape(self.jail))
|
||||
r"\[{}\]\s*(Ban|Unban) (.*)".format(re.escape(self.jail))
|
||||
)
|
||||
_LOGGER.debug("Setting up jail %s", self.jail)
|
||||
|
||||
|
||||
Reference in new issue
Block a user