diff --git a/config/jail.conf b/config/jail.conf index cea9a06e..941737ff 100644 --- a/config/jail.conf +++ b/config/jail.conf @@ -94,6 +94,7 @@ backend = auto # but it will be logged as a warning. # no: if a hostname is encountered, will not be used for banning, # but it will be logged as info. +# raw: use raw value (no hostname), allow use it for no-host filters/actions (example user) usedns = warn # "logencoding" specifies the encoding of the log files handled by the jail diff --git a/fail2ban/server/filter.py b/fail2ban/server/filter.py index 1e751057..3901fae9 100644 --- a/fail2ban/server/filter.py +++ b/fail2ban/server/filter.py @@ -523,7 +523,7 @@ class Filter(JailThread): self.__lineBuffer = failRegex.getUnmatchedTupleLines() try: host = failRegex.getHost() - if returnRawHost or self.__useDns not in ("yes", "warn"): + if returnRawHost or self.__useDns == "raw": failList.append([failRegexIndex, host, date, failRegex.getMatchedLines()]) if not checkAllRegex: