{
    "mode": "man",
    "parameter": "fail2ban-client",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/fail2ban-client/1/json",
    "generated": "2026-05-30T06:07:17Z",
    "synopsis": "fail2ban-client [OPTIONS] <COMMAND>",
    "sections": {
        "NAME": {
            "content": "fail2ban-client - configure and control the server\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "fail2ban-client [OPTIONS] <COMMAND>\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Fail2Ban  v0.11.2  reads  log  file that contains password failure report and bans the corre‐\nsponding IP addresses using firewall rules.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-c --conf",
                    "content": "configuration directory\n",
                    "flag": "-c",
                    "long": "--conf"
                },
                {
                    "name": "-s --socket",
                    "content": "socket path\n",
                    "flag": "-s",
                    "long": "--socket"
                },
                {
                    "name": "-p --pidfile",
                    "content": "pidfile path\n\n--pname <NAME>\nname of the process (main thread) to identify instance (default fail2ban-server)\n\n--loglevel <LEVEL>\nlogging level\n\n--logtarget <TARGET>\nlogging target, use file-name or stdout, stderr, syslog or sysout.\n\n--syslogsocket auto|<FILE>\n",
                    "flag": "-p",
                    "long": "--pidfile"
                },
                {
                    "name": "-d",
                    "content": "--dp, --dump-pretty\ndump the configuration using more human readable representation\n",
                    "flag": "-d"
                },
                {
                    "name": "-t --test",
                    "content": "test configuration (can be also specified with start parameters)\n",
                    "flag": "-t",
                    "long": "--test"
                },
                {
                    "name": "-i",
                    "content": "",
                    "flag": "-i"
                },
                {
                    "name": "-v",
                    "content": "",
                    "flag": "-v"
                },
                {
                    "name": "-q",
                    "content": "",
                    "flag": "-q"
                },
                {
                    "name": "-x",
                    "content": "",
                    "flag": "-x"
                },
                {
                    "name": "-b",
                    "content": "",
                    "flag": "-b"
                },
                {
                    "name": "-f",
                    "content": "",
                    "flag": "-f"
                },
                {
                    "name": "--async",
                    "content": "start server in async mode (for internal usage only, don't read configuration)\n",
                    "long": "--async"
                },
                {
                    "name": "--timeout",
                    "content": "timeout to wait for the server (for internal usage only, don't read configuration)\n\n--str2sec <STRING>\nconvert time abbreviation format to seconds\n",
                    "long": "--timeout"
                },
                {
                    "name": "-h --help",
                    "content": "display this help message\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-V --version",
                    "content": "print the version (-V returns machine-readable short format)\n",
                    "flag": "-V",
                    "long": "--version"
                }
            ]
        },
        "COMMAND": {
            "content": "BASIC\n\nstart  starts the server and the jails\n",
            "subsections": [
                {
                    "name": "restart",
                    "content": "restarts the server\n"
                },
                {
                    "name": "restart [--unban] [--if-exists] <JAIL>",
                    "content": "restarts the jail <JAIL> (alias for 'reload --restart ... <JAIL>')\n"
                },
                {
                    "name": "reload [--restart] [--unban] [--all]",
                    "content": "reloads the configuration without restarting of the server, the option '--restart' ac‐\ntivates  completely  restarting  of affected jails, thereby can unban IP addresses (if\noption '--unban' specified)\n"
                },
                {
                    "name": "reload [--restart] [--unban] [--if-exists] <JAIL>",
                    "content": "reloads the jail <JAIL>, or restarts it (if option '--restart' specified)\n\nstop   stops all jails and terminate the server\n"
                },
                {
                    "name": "unban --all",
                    "content": "unbans all IP addresses (in all jails and database)\n"
                },
                {
                    "name": "unban <IP> ... <IP>",
                    "content": "unbans <IP> (in all jails and database)\n\nbanned return jails with banned IPs as dictionary\n"
                },
                {
                    "name": "banned <IP> ... <IP>]",
                    "content": "return list(s) of jails where given IP(s) are banned\n\nstatus gets the current status of the server\n\nping   tests if the server is alive\n\necho   for internal usage, returns back and outputs a given string\n\nhelp   return this output\n"
                },
                {
                    "name": "version",
                    "content": "return the server version\n\nLOGGING\n"
                },
                {
                    "name": "set loglevel <LEVEL>",
                    "content": "sets logging level to <LEVEL>.  Levels: CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG,\nTRACEDEBUG, HEAVYDEBUG or corresponding numeric value (50-5)\n"
                },
                {
                    "name": "get loglevel",
                    "content": "gets the logging level\n"
                },
                {
                    "name": "set logtarget <TARGET>",
                    "content": "sets logging target to <TARGET>.  Can be STDOUT, STDERR, SYSLOG or a file\n"
                },
                {
                    "name": "get logtarget",
                    "content": "gets logging target\n"
                },
                {
                    "name": "set syslogsocket auto|<SOCKET>",
                    "content": "sets the syslog socket path to auto or <SOCKET>. Only used if logtarget is SYSLOG\n"
                },
                {
                    "name": "get syslogsocket",
                    "content": "gets syslog socket path\n"
                },
                {
                    "name": "flushlogs",
                    "content": "flushes the logtarget if a file and reopens it. For log rotation.\n\nDATABASE\n"
                },
                {
                    "name": "set dbfile <FILE>",
                    "content": "set the location of fail2ban persistent datastore. Set to \"None\" to disable\n"
                },
                {
                    "name": "get dbfile",
                    "content": "get the location of fail2ban persistent datastore\n"
                },
                {
                    "name": "set dbmaxmatches <INT>",
                    "content": "sets the max number of matches stored in database per ticket\n"
                },
                {
                    "name": "get dbmaxmatches",
                    "content": "gets the max number of matches stored in database per ticket\n"
                },
                {
                    "name": "set dbpurgeage <SECONDS>",
                    "content": "sets the max age in <SECONDS> that history of bans will be kept\n"
                },
                {
                    "name": "get dbpurgeage",
                    "content": "gets the max age in seconds that history of bans will be kept\n\nJAIL CONTROL\n"
                },
                {
                    "name": "add <JAIL> <BACKEND>",
                    "content": "creates <JAIL> using <BACKEND>\n"
                },
                {
                    "name": "start <JAIL>",
                    "content": "starts the jail <JAIL>\n"
                },
                {
                    "name": "stop <JAIL>",
                    "content": "stops the jail <JAIL>. The jail is removed\n"
                },
                {
                    "name": "status <JAIL> [FLAVOR]",
                    "content": "gets the current status of <JAIL>, with optional flavor or extended info\n\nJAIL CONFIGURATION\n"
                },
                {
                    "name": "set <JAIL> idle on|off",
                    "content": "sets the idle state of <JAIL>\n"
                },
                {
                    "name": "set <JAIL> ignoreself true|false",
                    "content": "allows the ignoring of own IP addresses\n"
                },
                {
                    "name": "set <JAIL> addignoreip <IP>",
                    "content": "adds <IP> to the ignore list of <JAIL>\n"
                },
                {
                    "name": "set <JAIL> delignoreip <IP>",
                    "content": "removes <IP> from the ignore list of <JAIL>\n"
                },
                {
                    "name": "set <JAIL> ignorecommand <VALUE>",
                    "content": "sets ignorecommand of <JAIL>\n"
                },
                {
                    "name": "set <JAIL> ignorecache <VALUE>",
                    "content": "sets ignorecache of <JAIL>\n"
                },
                {
                    "name": "set <JAIL> addlogpath <FILE> ['tail']",
                    "content": "adds <FILE> to the monitoring list of <JAIL>, optionally starting at the 'tail' of the\nfile (default 'head').\n"
                },
                {
                    "name": "set <JAIL> dellogpath <FILE>",
                    "content": "removes <FILE> from the monitoring list of <JAIL>\n"
                },
                {
                    "name": "set <JAIL> logencoding <ENCODING>",
                    "content": "sets the <ENCODING> of the log files for <JAIL>\n"
                },
                {
                    "name": "set <JAIL> addjournalmatch <MATCH>",
                    "content": "adds <MATCH> to the journal filter of <JAIL>\n"
                },
                {
                    "name": "set <JAIL> deljournalmatch <MATCH>",
                    "content": "removes <MATCH> from the journal filter of <JAIL>\n"
                },
                {
                    "name": "set <JAIL> addfailregex <REGEX>",
                    "content": "adds the regular expression <REGEX> which must match failures for <JAIL>\n"
                },
                {
                    "name": "set <JAIL> delfailregex <INDEX>",
                    "content": "removes the regular expression at <INDEX> for failregex\n"
                },
                {
                    "name": "set <JAIL> addignoreregex <REGEX>",
                    "content": "adds the regular expression <REGEX> which should match pattern to exclude for <JAIL>\n"
                },
                {
                    "name": "set <JAIL> delignoreregex <INDEX>",
                    "content": "removes the regular expression at <INDEX> for ignoreregex\n"
                },
                {
                    "name": "set <JAIL> findtime <TIME>",
                    "content": "sets the number of seconds <TIME> for which the filter will look back for <JAIL>\n"
                },
                {
                    "name": "set <JAIL> bantime <TIME>",
                    "content": "sets the number of seconds <TIME> a host will be banned for <JAIL>\n"
                },
                {
                    "name": "set <JAIL> datepattern <PATTERN>",
                    "content": "sets the <PATTERN> used to match date/times for <JAIL>\n"
                },
                {
                    "name": "set <JAIL> usedns <VALUE>",
                    "content": "sets the usedns mode for <JAIL>\n"
                },
                {
                    "name": "set <JAIL> attempt <IP> [<failure1> ... <failureN>]",
                    "content": "manually notify about <IP> failure\n"
                },
                {
                    "name": "set <JAIL> banip <IP> ... <IP>",
                    "content": "manually Ban <IP> for <JAIL>\n"
                },
                {
                    "name": "set <JAIL> unbanip [--report-absent] <IP> ... <IP>",
                    "content": "manually Unban <IP> in <JAIL>\n"
                },
                {
                    "name": "set <JAIL> maxretry <RETRY>",
                    "content": "sets the number of failures <RETRY> before banning the host for <JAIL>\n"
                },
                {
                    "name": "set <JAIL> maxmatches <INT>",
                    "content": "sets the max number of matches stored in memory per ticket in <JAIL>\n"
                },
                {
                    "name": "set <JAIL> maxlines <LINES>",
                    "content": "sets the number of <LINES> to buffer for regex search for <JAIL>\n"
                },
                {
                    "name": "set <JAIL> addaction <ACT>[ <PYTHONFILE> <JSONKWARGS>]",
                    "content": "adds a new action named <ACT> for <JAIL>. Optionally for  a  Python  based  action,  a\n<PYTHONFILE> and <JSONKWARGS> can be specified, else will be a Command Action\n"
                },
                {
                    "name": "set <JAIL> delaction <ACT>",
                    "content": "removes the action <ACT> from <JAIL>\n\nCOMMAND ACTION CONFIGURATION\n"
                },
                {
                    "name": "set <JAIL> action <ACT> actionstart <CMD>",
                    "content": "sets the start command <CMD> of the action <ACT> for <JAIL>\n"
                },
                {
                    "name": "set <JAIL> action <ACT> actionstop <CMD> sets the stop command <CMD> of the",
                    "content": "action <ACT> for <JAIL>\n"
                },
                {
                    "name": "set <JAIL> action <ACT> actioncheck <CMD>",
                    "content": "sets the check command <CMD> of the action <ACT> for <JAIL>\n"
                },
                {
                    "name": "set <JAIL> action <ACT> actionban <CMD>",
                    "content": "sets the ban command <CMD> of the action <ACT> for <JAIL>\n"
                },
                {
                    "name": "set <JAIL> action <ACT> actionunban <CMD>",
                    "content": "sets the unban command <CMD> of the action <ACT> for <JAIL>\n"
                },
                {
                    "name": "set <JAIL> action <ACT> timeout <TIMEOUT>",
                    "content": "sets <TIMEOUT> as the command timeout in seconds for the action <ACT> for <JAIL>\n\nGENERAL ACTION CONFIGURATION\n"
                },
                {
                    "name": "set <JAIL> action <ACT> <PROPERTY> <VALUE>",
                    "content": "sets the <VALUE> of <PROPERTY> for the action <ACT> for <JAIL>\n"
                },
                {
                    "name": "set <JAIL> action <ACT> <METHOD>[ <JSONKWARGS>]",
                    "content": "calls the <METHOD> with <JSONKWARGS> for the action <ACT> for <JAIL>\n\nJAIL INFORMATION\n"
                },
                {
                    "name": "get <JAIL> banned",
                    "content": "return banned IPs of <JAIL>\n"
                },
                {
                    "name": "get <JAIL> banned <IP> ... <IP>]",
                    "content": "return 1 if IP is banned in <JAIL> otherwise 0, or a list of 1/0 for multiple IPs\n"
                },
                {
                    "name": "get <JAIL> logpath",
                    "content": "gets the list of the monitored files for <JAIL>\n"
                },
                {
                    "name": "get <JAIL> logencoding",
                    "content": "gets the encoding of the log files for <JAIL>\n"
                },
                {
                    "name": "get <JAIL> journalmatch",
                    "content": "gets the journal filter match for <JAIL>\n"
                },
                {
                    "name": "get <JAIL> ignoreself",
                    "content": "gets the current value of the ignoring the own IP addresses\n"
                },
                {
                    "name": "get <JAIL> ignoreip",
                    "content": "gets the list of ignored IP addresses for <JAIL>\n"
                },
                {
                    "name": "get <JAIL> ignorecommand",
                    "content": "gets ignorecommand of <JAIL>\n"
                },
                {
                    "name": "get <JAIL> failregex",
                    "content": "gets the list of regular expressions which matches the failures for <JAIL>\n"
                },
                {
                    "name": "get <JAIL> ignoreregex",
                    "content": "gets the list of regular expressions which matches patterns to ignore for <JAIL>\n"
                },
                {
                    "name": "get <JAIL> findtime",
                    "content": "gets the time for which the filter will look back for failures for <JAIL>\n"
                },
                {
                    "name": "get <JAIL> bantime",
                    "content": "gets the time a host is banned for <JAIL>\n"
                },
                {
                    "name": "get <JAIL> datepattern",
                    "content": "gets the pattern used to match date/times for <JAIL>\n"
                },
                {
                    "name": "get <JAIL> usedns",
                    "content": "gets the usedns setting for <JAIL>\n"
                },
                {
                    "name": "get <JAIL> banip [<SEP>|--with-time]",
                    "content": "gets the list of of banned IP addresses for <JAIL>. Optionally the separator character\n('<SEP>', default is space) or the option '--with-time' (printing the  times  of  ban)\nmay be specified. The IPs are ordered by end of ban.\n"
                },
                {
                    "name": "get <JAIL> maxretry",
                    "content": "gets the number of failures allowed for <JAIL>\n"
                },
                {
                    "name": "get <JAIL> maxmatches",
                    "content": "gets the max number of matches stored in memory per ticket in <JAIL>\n"
                },
                {
                    "name": "get <JAIL> maxlines",
                    "content": "gets the number of lines to buffer for <JAIL>\n"
                },
                {
                    "name": "get <JAIL> actions",
                    "content": "gets a list of actions for <JAIL>\n\nCOMMAND ACTION INFORMATION\n"
                },
                {
                    "name": "get <JAIL> action <ACT> actionstart",
                    "content": "gets the start command for the action <ACT> for <JAIL>\n"
                },
                {
                    "name": "get <JAIL> action <ACT> actionstop",
                    "content": "gets the stop command for the action <ACT> for <JAIL>\n"
                },
                {
                    "name": "get <JAIL> action <ACT> actioncheck",
                    "content": "gets the check command for the action <ACT> for <JAIL>\n"
                },
                {
                    "name": "get <JAIL> action <ACT> actionban",
                    "content": "gets the ban command for the action <ACT> for <JAIL>\n"
                },
                {
                    "name": "get <JAIL> action <ACT> actionunban",
                    "content": "gets the unban command for the action <ACT> for <JAIL>\n"
                },
                {
                    "name": "get <JAIL> action <ACT> timeout",
                    "content": "gets the command timeout in seconds for the action <ACT> for <JAIL>\n\nGENERAL ACTION INFORMATION\n"
                },
                {
                    "name": "get <JAIL> actionproperties <ACT>",
                    "content": "gets a list of properties for the action <ACT> for <JAIL>\n"
                },
                {
                    "name": "get <JAIL> actionmethods <ACT>",
                    "content": "gets a list of methods for the action <ACT> for <JAIL>\n"
                },
                {
                    "name": "get <JAIL> action <ACT> <PROPERTY>",
                    "content": "gets the value of <PROPERTY> for the action <ACT> for <JAIL>\n"
                }
            ]
        },
        "FILES": {
            "content": "/etc/fail2ban/*\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "Report bugs via Debian bug tracking system http://www.debian.org/Bugs/ .\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "fail2ban-server(1) jail.conf(5)\n\n\n\nfail2ban-client v0.11.2                     November 2020                         FAIL2BAN-CLIENT(1)",
            "subsections": []
        }
    },
    "summary": "fail2ban-client - configure and control the server",
    "flags": [
        {
            "flag": "-c",
            "long": "--conf",
            "arg": null,
            "description": "configuration directory"
        },
        {
            "flag": "-s",
            "long": "--socket",
            "arg": null,
            "description": "socket path"
        },
        {
            "flag": "-p",
            "long": "--pidfile",
            "arg": null,
            "description": "pidfile path --pname <NAME> name of the process (main thread) to identify instance (default fail2ban-server) --loglevel <LEVEL> logging level --logtarget <TARGET> logging target, use file-name or stdout, stderr, syslog or sysout. --syslogsocket auto|<FILE>"
        },
        {
            "flag": "-d",
            "long": null,
            "arg": null,
            "description": "--dp, --dump-pretty dump the configuration using more human readable representation"
        },
        {
            "flag": "-t",
            "long": "--test",
            "arg": null,
            "description": "test configuration (can be also specified with start parameters)"
        },
        {
            "flag": "-i",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-q",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-x",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-b",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-f",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": "--async",
            "arg": null,
            "description": "start server in async mode (for internal usage only, don't read configuration)"
        },
        {
            "flag": "",
            "long": "--timeout",
            "arg": null,
            "description": "timeout to wait for the server (for internal usage only, don't read configuration) --str2sec <STRING> convert time abbreviation format to seconds"
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "display this help message"
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "print the version (-V returns machine-readable short format)"
        }
    ],
    "examples": [],
    "see_also": [
        {
            "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-CLIENT",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/FAIL2BAN-CLIENT/1/json"
        }
    ]
}