{
    "mode": "man",
    "parameter": "fail2ban-regex",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/fail2ban-regex/1/json",
    "generated": "2026-06-03T01:48:49Z",
    "synopsis": "fail2ban-regex [OPTIONS] <LOG> <REGEX> [IGNOREREGEX]",
    "sections": {
        "NAME": {
            "content": "fail2ban-regex - test Fail2ban \"failregex\" option\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "fail2ban-regex [OPTIONS] <LOG> <REGEX> [IGNOREREGEX]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Fail2Ban   reads log file that contains password failure report and bans the corresponding IP\naddresses using firewall rules.\n\nThis tools can test regular expressions for \"fail2ban\".\n",
            "subsections": [
                {
                    "name": "LOG:",
                    "content": "string a string representing a log line\n\nfilename\npath to a log file (/var/log/auth.log)\n\nsystemd-journal\nsearch systemd journal (systemd-python required), optionally with backend  parameters,\nsee `man jail.conf` for usage and examples (systemd-journal[journalflags=1]).\n"
                },
                {
                    "name": "REGEX:",
                    "content": "string a string representing a 'failregex'\n\nfilter name of filter, optionally with options (sshd[mode=aggressive])\n\nfilename\npath to a filter file (filter.d/sshd.conf)\n"
                },
                {
                    "name": "IGNOREREGEX:",
                    "content": "string a string representing an 'ignoreregex'\n\nfilename\npath to a filter file (filter.d/sshd.conf)\n"
                }
            ]
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "--version",
                    "content": "show program's version number and exit\n",
                    "long": "--version"
                },
                {
                    "name": "-h --help",
                    "content": "show this help message and exit\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-c --config",
                    "content": "set alternate config directory\n",
                    "flag": "-c",
                    "long": "--config"
                },
                {
                    "name": "-d --datepattern",
                    "content": "set custom pattern used to match date/times\n\n--timezone=TIMEZONE, --TZ=TIMEZONE\nset time-zone used by convert time format\n",
                    "flag": "-d",
                    "long": "--datepattern"
                },
                {
                    "name": "-e --encoding",
                    "content": "File encoding. Default: system locale\n",
                    "flag": "-e",
                    "long": "--encoding"
                },
                {
                    "name": "-r --raw",
                    "content": "Raw hosts, don't resolve dns\n\n--usedns=USEDNS\nDNS specified replacement of tags <HOST> in regexp ('yes' - matches all form of hosts,\n'no' - IP addresses only)\n",
                    "flag": "-r",
                    "long": "--raw"
                },
                {
                    "name": "-L --maxlines",
                    "content": "maxlines for multi-line regex.\n",
                    "flag": "-L",
                    "long": "--maxlines"
                },
                {
                    "name": "-m --journalmatch",
                    "content": "journalctl style matches overriding filter file.  \"systemd-journal\" only\n",
                    "flag": "-m",
                    "long": "--journalmatch"
                },
                {
                    "name": "-l --log-level",
                    "content": "Log level for the Fail2Ban logger to use\n",
                    "flag": "-l",
                    "long": "--log-level"
                },
                {
                    "name": "-V",
                    "content": "",
                    "flag": "-V"
                },
                {
                    "name": "-v --verbose",
                    "content": "Increase verbosity\n\n--verbosity=VERBOSE\nSet numerical level of verbosity (0..4)\n\n--verbose-date, --VD\nVerbose date patterns/regex in output\n",
                    "flag": "-v",
                    "long": "--verbose"
                },
                {
                    "name": "-D --debuggex",
                    "content": "Produce debuggex.com urls for debugging there\n",
                    "flag": "-D",
                    "long": "--debuggex"
                },
                {
                    "name": "--no-check-all",
                    "content": "Disable check for all regex's\n",
                    "long": "--no-check-all"
                },
                {
                    "name": "-o --out",
                    "content": "Set token to print failure information only (row, id, ip, msg, host,  ip4,  ip6,  dns,\nmatches, ...)\n",
                    "flag": "-o",
                    "long": "--out"
                },
                {
                    "name": "--print-no-missed",
                    "content": "Do not print any missed lines\n",
                    "long": "--print-no-missed"
                },
                {
                    "name": "--print-no-ignored",
                    "content": "Do not print any ignored lines\n",
                    "long": "--print-no-ignored"
                },
                {
                    "name": "--print-all-matched",
                    "content": "Print all matched lines\n",
                    "long": "--print-all-matched"
                },
                {
                    "name": "--print-all-missed",
                    "content": "Print all missed lines, no matter how many\n",
                    "long": "--print-all-missed"
                },
                {
                    "name": "--print-all-ignored",
                    "content": "Print all ignored lines, no matter how many\n",
                    "long": "--print-all-ignored"
                },
                {
                    "name": "-t --log-traceback",
                    "content": "Enrich log-messages with compressed tracebacks\n",
                    "flag": "-t",
                    "long": "--log-traceback"
                },
                {
                    "name": "--full-traceback",
                    "content": "Either to make the tracebacks full, not compressed (as by default)\n",
                    "long": "--full-traceback"
                }
            ]
        },
        "AUTHOR": {
            "content": "Written  by  Cyril  Jaquier  <cyril.jaquier@fail2ban.org>.  Many contributions by Yaroslav O.\nHalchenko, Steven Hiscocks, Sergey G. Brester (sebres).\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "Report bugs to https://github.com/fail2ban/fail2ban/issues\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright © 2004-2008 Cyril Jaquier, 2008- Fail2Ban Contributors\nCopyright of modifications held by their respective authors.  Licensed under the GNU  General\nPublic License v2 (GPL).\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "fail2ban-client(1) fail2ban-server(1) jail.conf(5)\n\n\n\nfail2ban-regex 0.11.2                       November 2020                          FAIL2BAN-REGEX(1)",
            "subsections": []
        }
    },
    "summary": "fail2ban-regex - test Fail2ban \"failregex\" option",
    "flags": [
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "show program's version number and exit"
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "show this help message and exit"
        },
        {
            "flag": "-c",
            "long": "--config",
            "arg": null,
            "description": "set alternate config directory"
        },
        {
            "flag": "-d",
            "long": "--datepattern",
            "arg": null,
            "description": "set custom pattern used to match date/times --timezone=TIMEZONE, --TZ=TIMEZONE set time-zone used by convert time format"
        },
        {
            "flag": "-e",
            "long": "--encoding",
            "arg": null,
            "description": "File encoding. Default: system locale"
        },
        {
            "flag": "-r",
            "long": "--raw",
            "arg": null,
            "description": "Raw hosts, don't resolve dns --usedns=USEDNS DNS specified replacement of tags <HOST> in regexp ('yes' - matches all form of hosts, 'no' - IP addresses only)"
        },
        {
            "flag": "-L",
            "long": "--maxlines",
            "arg": null,
            "description": "maxlines for multi-line regex."
        },
        {
            "flag": "-m",
            "long": "--journalmatch",
            "arg": null,
            "description": "journalctl style matches overriding filter file. \"systemd-journal\" only"
        },
        {
            "flag": "-l",
            "long": "--log-level",
            "arg": null,
            "description": "Log level for the Fail2Ban logger to use"
        },
        {
            "flag": "-V",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-v",
            "long": "--verbose",
            "arg": null,
            "description": "Increase verbosity --verbosity=VERBOSE Set numerical level of verbosity (0..4) --verbose-date, --VD Verbose date patterns/regex in output"
        },
        {
            "flag": "-D",
            "long": "--debuggex",
            "arg": null,
            "description": "Produce debuggex.com urls for debugging there"
        },
        {
            "flag": "",
            "long": "--no-check-all",
            "arg": null,
            "description": "Disable check for all regex's"
        },
        {
            "flag": "-o",
            "long": "--out",
            "arg": null,
            "description": "Set token to print failure information only (row, id, ip, msg, host, ip4, ip6, dns, matches, ...)"
        },
        {
            "flag": "",
            "long": "--print-no-missed",
            "arg": null,
            "description": "Do not print any missed lines"
        },
        {
            "flag": "",
            "long": "--print-no-ignored",
            "arg": null,
            "description": "Do not print any ignored lines"
        },
        {
            "flag": "",
            "long": "--print-all-matched",
            "arg": null,
            "description": "Print all matched lines"
        },
        {
            "flag": "",
            "long": "--print-all-missed",
            "arg": null,
            "description": "Print all missed lines, no matter how many"
        },
        {
            "flag": "",
            "long": "--print-all-ignored",
            "arg": null,
            "description": "Print all ignored lines, no matter how many"
        },
        {
            "flag": "-t",
            "long": "--log-traceback",
            "arg": null,
            "description": "Enrich log-messages with compressed tracebacks"
        },
        {
            "flag": "",
            "long": "--full-traceback",
            "arg": null,
            "description": "Either to make the tracebacks full, not compressed (as by default)"
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "fail2ban-client",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/fail2ban-client/1/json"
        },
        {
            "name": "fail2ban-server",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/fail2ban-server/1/json"
        },
        {
            "name": "jail.conf",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/jail.conf/5/json"
        },
        {
            "name": "FAIL2BAN-REGEX",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/FAIL2BAN-REGEX/1/json"
        }
    ]
}