{"tool":"fail2ban","name":"Fail2ban","description":"Watches log files for repeated failures — SSH, web logins, mail — and bans offending IPs with firewall rules.","tags":["intrusion prevention","SSH","firewall"],"homepage":"https://github.com/fail2ban/fail2ban","docs":"https://github.com/fail2ban/fail2ban/wiki","install":{"apt":"sudo apt install fail2ban","dnf":"sudo dnf install fail2ban"},"related":["journalctl","auditd"],"total_commands":105,"commands":[{"id":1,"category":"Service Management","command":"systemctl start fail2ban","example":"systemctl start fail2ban","explanation":"Starts the Fail2Ban intrusion prevention service daemon."},{"id":2,"category":"Service Management","command":"systemctl stop fail2ban","example":"systemctl stop fail2ban","explanation":"Stops the running Fail2Ban service daemon."},{"id":3,"category":"Service Management","command":"systemctl restart fail2ban","example":"systemctl restart fail2ban","explanation":"Restarts the Fail2Ban service to apply new configurations."},{"id":4,"category":"Service Management","command":"systemctl status fail2ban","example":"systemctl status fail2ban","explanation":"Displays the current operational status and recent logs of the Fail2Ban service."},{"id":5,"category":"Service Management","command":"fail2ban-server --version","example":"fail2ban-server --version","explanation":"Outputs the installed version of the Fail2Ban server."},{"id":6,"category":"Service Management","command":"fail2ban-server -t","example":"fail2ban-server -t","explanation":"Tests the configuration files for syntax errors without starting the server."},{"id":7,"category":"Client Connectivity","command":"fail2ban-client ping","example":"fail2ban-client ping","explanation":"Checks if the Fail2Ban server process is alive and responsive."},{"id":8,"category":"Client Connectivity","command":"fail2ban-client echo 'test'","example":"fail2ban-client echo 'connectivity check'","explanation":"Sends an echo message to the server to verify communication channels."},{"id":9,"category":"Global Status","command":"fail2ban-client status","example":"fail2ban-client status","explanation":"Displays the global status including the number of currently active jails."},{"id":10,"category":"Global Operations","command":"fail2ban-client reload","example":"fail2ban-client reload","explanation":"Reloads the complete configuration and all jails without restarting the process."},{"id":11,"category":"Global Operations","command":"fail2ban-client reload --all","example":"fail2ban-client reload --all","explanation":"Explicitly reloads all configuration files and jails."},{"id":12,"category":"Jail Inspection","command":"fail2ban-client status <JAIL>","example":"fail2ban-client status sshd","explanation":"Shows detailed statistics for a specific jail including current ban count and list."},{"id":13,"category":"Jail Management","command":"fail2ban-client start <JAIL>","example":"fail2ban-client start nginx-http-auth","explanation":"Manually starts a specific jail that is currently stopped."},{"id":14,"category":"Jail Management","command":"fail2ban-client stop <JAIL>","example":"fail2ban-client stop postfix","explanation":"Manually stops a running jail without stopping the entire service."},{"id":15,"category":"Jail Management","command":"fail2ban-client reload <JAIL>","example":"fail2ban-client reload sshd","explanation":"Reloads the configuration for a single specific jail."},{"id":16,"category":"Logging Configuration","command":"fail2ban-client get loglevel","example":"fail2ban-client get loglevel","explanation":"Retrieves the current logging verbosity level of the server."},{"id":17,"category":"Logging Configuration","command":"fail2ban-client set loglevel <LEVEL>","example":"fail2ban-client set loglevel DEBUG","explanation":"Sets the logging verbosity to a specific level (CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG)."},{"id":18,"category":"Logging Configuration","command":"fail2ban-client get logtarget","example":"fail2ban-client get logtarget","explanation":"Displays the current file path or target where Fail2Ban writes its logs."},{"id":19,"category":"Logging Configuration","command":"fail2ban-client set logtarget <TARGET>","example":"fail2ban-client set logtarget /var/log/fail2ban-trace.log","explanation":"Changes the log output destination to a specified file path."},{"id":20,"category":"Logging Configuration","command":"fail2ban-client set logtarget STDOUT","example":"fail2ban-client set logtarget STDOUT","explanation":"Redirects log output to standard output for debugging purposes."},{"id":21,"category":"Database Operations","command":"fail2ban-client get dbfile","example":"fail2ban-client get dbfile","explanation":"Shows the location of the SQLite database used for persistent ban storage."},{"id":22,"category":"Database Operations","command":"fail2ban-client flushlogs","example":"fail2ban-client flushlogs","explanation":"Flushes the internal logs to the disk."},{"id":23,"category":"Manual Banning","command":"fail2ban-client set <JAIL> banip <IP>","example":"fail2ban-client set sshd banip 192.168.1.50","explanation":"Manually bans a specific IP address in the specified jail immediately."},{"id":24,"category":"Manual Banning","command":"fail2ban-client set <JAIL> banip <CIDR>","example":"fail2ban-client set sshd banip 10.0.0.0/24","explanation":"Manually bans an entire CIDR block in the specified jail."},{"id":25,"category":"Manual Unbanning","command":"fail2ban-client set <JAIL> unbanip <IP>","example":"fail2ban-client set sshd unbanip 192.168.1.50","explanation":"Manually unbans a specific IP address from the specified jail."},{"id":26,"category":"Manual Unbanning","command":"fail2ban-client unban <IP>","example":"fail2ban-client unban 192.168.1.50","explanation":"Unbans a specific IP address across all jails (requires version 0.11+)."},{"id":27,"category":"Manual Unbanning","command":"fail2ban-client unban --all","example":"fail2ban-client unban --all","explanation":"Removes all active bans across all jails immediately."},{"id":28,"category":"Configuration Inspection","command":"fail2ban-client get <JAIL> logpath","example":"fail2ban-client get sshd logpath","explanation":"Retrieves the log file path currently being monitored by a specific jail."},{"id":29,"category":"Configuration Inspection","command":"fail2ban-client get <JAIL> failregex","example":"fail2ban-client get sshd failregex","explanation":"Displays the list of failure regexes currently loaded for the jail."},{"id":30,"category":"Configuration Inspection","command":"fail2ban-client get <JAIL> ignoreregex","example":"fail2ban-client get sshd ignoreregex","explanation":"Displays the list of ignore regexes currently loaded for the jail."},{"id":31,"category":"Configuration Inspection","command":"fail2ban-client get <JAIL> maxretry","example":"fail2ban-client get sshd maxretry","explanation":"Shows the number of failures required to trigger a ban for the jail."},{"id":32,"category":"Configuration Inspection","command":"fail2ban-client get <JAIL> findtime","example":"fail2ban-client get sshd findtime","explanation":"Shows the time window in seconds during which failures are counted."},{"id":33,"category":"Configuration Inspection","command":"fail2ban-client get <JAIL> bantime","example":"fail2ban-client get sshd bantime","explanation":"Shows the duration in seconds for which an IP is banned."},{"id":34,"category":"Configuration Inspection","command":"fail2ban-client get <JAIL> usedns","example":"fail2ban-client get sshd usedns","explanation":"Checks if DNS resolution is enabled (yes, warn, no, raw) for the jail."},{"id":35,"category":"Runtime Tuning","command":"fail2ban-client set <JAIL> maxretry <N>","example":"fail2ban-client set sshd maxretry 5","explanation":"Updates the maximum retry threshold for a running jail dynamically."},{"id":36,"category":"Runtime Tuning","command":"fail2ban-client set <JAIL> findtime <SECONDS>","example":"fail2ban-client set sshd findtime 600","explanation":"Updates the lookback window duration for a running jail dynamically."},{"id":37,"category":"Runtime Tuning","command":"fail2ban-client set <JAIL> bantime <SECONDS>","example":"fail2ban-client set sshd bantime 3600","explanation":"Updates the ban duration for a running jail dynamically."},{"id":38,"category":"Whitelist Management","command":"fail2ban-client get <JAIL> ignoreip","example":"fail2ban-client get sshd ignoreip","explanation":"Lists all IP addresses and CIDR blocks currently ignored (whitelisted) by the jail."},{"id":39,"category":"Whitelist Management","command":"fail2ban-client set <JAIL> addignoreip <IP>","example":"fail2ban-client set sshd addignoreip 192.168.10.5","explanation":"Adds a specific IP address to the ignore list of a running jail."},{"id":40,"category":"Whitelist Management","command":"fail2ban-client set <JAIL> delignoreip <IP>","example":"fail2ban-client set sshd delignoreip 192.168.10.5","explanation":"Removes a specific IP address from the ignore list of a running jail."},{"id":41,"category":"Action Management","command":"fail2ban-client get <JAIL> actions","example":"fail2ban-client get sshd actions","explanation":"Lists the names of the actions configured for the specified jail."},{"id":42,"category":"Filter Validation","command":"fail2ban-regex <LOGLINE> <FILTER>","example":"fail2ban-regex 'Failed password for root from 1.2.3.4' sshd","explanation":"Tests a single log line string against a specific filter configuration."},{"id":43,"category":"Filter Validation","command":"fail2ban-regex <LOGFILE> <FILTER>","example":"fail2ban-regex /var/log/auth.log sshd","explanation":"Tests an entire log file against a specific filter and reports match statistics."},{"id":44,"category":"Filter Validation","command":"fail2ban-regex --print-all-missed <LOGFILE> <FILTER>","example":"fail2ban-regex --print-all-missed /var/log/auth.log sshd","explanation":"Runs a regex test and prints all log lines that did NOT match the filter."},{"id":45,"category":"Filter Validation","command":"fail2ban-regex --print-all-matched <LOGFILE> <FILTER>","example":"fail2ban-regex --print-all-matched /var/log/auth.log sshd","explanation":"Runs a regex test and prints only the log lines that successfully matched the filter."},{"id":46,"category":"Filter Validation","command":"fail2ban-regex --print-all-ignored <LOGFILE> <FILTER>","example":"fail2ban-regex --print-all-ignored /var/log/auth.log sshd","explanation":"Runs a regex test and prints lines that matched but were ignored due to ignoreregex."},{"id":47,"category":"Filter Validation","command":"fail2ban-regex -D <LOGFILE> <FILTER>","example":"fail2ban-regex -D /var/log/auth.log sshd","explanation":"Runs regex testing in debug mode, showing detailed internal processing logic."},{"id":48,"category":"Filter Validation","command":"fail2ban-regex -v <LOGFILE> <FILTER>","example":"fail2ban-regex -v /var/log/nginx/error.log nginx-botsearch","explanation":"Runs regex testing with verbose output to analyze processing speed and stats."},{"id":49,"category":"Advanced Configuration","command":"fail2ban-client -d","example":"fail2ban-client -d","explanation":"Dumps the current configuration in a readable format for debugging start-up issues."},{"id":50,"category":"Advanced Configuration","command":"fail2ban-client -i","example":"fail2ban-client -i","explanation":"Enters the interactive Fail2Ban shell mode."},{"id":51,"category":"Log Inspection","command":"grep 'Ban' /var/log/fail2ban.log","example":"grep 'Ban' /var/log/fail2ban.log","explanation":"Searches the primary Fail2Ban log file for all ban events."},{"id":52,"category":"Log Inspection","command":"grep 'Unban' /var/log/fail2ban.log","example":"grep 'Unban' /var/log/fail2ban.log","explanation":"Searches the primary Fail2Ban log file for all unban events."},{"id":53,"category":"Log Inspection","command":"tail -f /var/log/fail2ban.log","example":"tail -f /var/log/fail2ban.log","explanation":"Follows the Fail2Ban log file in real-time to monitor activity."},{"id":54,"category":"Log Inspection","command":"zgrep 'Ban' /var/log/fail2ban.log*","example":"zgrep 'Ban' /var/log/fail2ban.log*","explanation":"Searches for ban events in both current and rotated (gzipped) Fail2Ban logs."},{"id":55,"category":"Log Inspection","command":"grep 'Found' /var/log/fail2ban.log","example":"grep 'Found' /var/log/fail2ban.log","explanation":"Searches logs for 'Found' entries indicating a filter match before a ban threshold is reached."},{"id":56,"category":"Runtime Action Tuning","command":"fail2ban-client set <JAIL> action <ACTION> actionstart <CMD>","example":"fail2ban-client set sshd action iptables-multiport actionstart 'echo starting'","explanation":"Dynamically overrides the 'actionstart' command for a specific action in a running jail."},{"id":57,"category":"Runtime Action Tuning","command":"fail2ban-client set <JAIL> action <ACTION> actionban <CMD>","example":"fail2ban-client set sshd action iptables-multiport actionban 'echo banning <ip>'","explanation":"Dynamically overrides the 'actionban' command for a specific action in a running jail."},{"id":58,"category":"Runtime Action Tuning","command":"fail2ban-client set <JAIL> action <ACTION> actionunban <CMD>","example":"fail2ban-client set sshd action iptables-multiport actionunban 'echo unbanning <ip>'","explanation":"Dynamically overrides the 'actionunban' command for a specific action in a running jail."},{"id":59,"category":"Python API","command":"fail2ban-python --version","example":"fail2ban-python --version","explanation":"Checks the version of the embedded Python interpreter used by Fail2Ban."},{"id":60,"category":"Configuration Validation","command":"fail2ban-client --test","example":"fail2ban-client --test","explanation":"Runs a basic test to verify that the client can load the configuration modules."},{"id":61,"category":"Database Analysis","command":"sqlite3 /var/lib/fail2ban/fail2ban.sqlite3 'SELECT * FROM bans LIMIT 5;'","example":"sqlite3 /var/lib/fail2ban/fail2ban.sqlite3 'SELECT * FROM bans LIMIT 5;'","explanation":"Directly queries the persistent Fail2Ban database to view the first 5 bans."},{"id":62,"category":"Database Analysis","command":"sqlite3 /var/lib/fail2ban/fail2ban.sqlite3 'SELECT count(*) FROM bans;'","example":"sqlite3 /var/lib/fail2ban/fail2ban.sqlite3 'SELECT count(*) FROM bans;'","explanation":"Counts the total number of bans recorded in the persistent database history."},{"id":63,"category":"Database Analysis","command":"sqlite3 /var/lib/fail2ban/fail2ban.sqlite3 'SELECT ip FROM bans WHERE jail=\"sshd\";'","example":"sqlite3 /var/lib/fail2ban/fail2ban.sqlite3 'SELECT ip FROM bans WHERE jail=\"sshd\";'","explanation":"Retrieves all IPs ever banned by the sshd jail from the database."},{"id":64,"category":"Backend Tuning","command":"fail2ban-client set <JAIL> backend <BACKEND>","example":"fail2ban-client set sshd backend pyinotify","explanation":"Changes the log monitoring backend (polling, pyinotify, systemd, auto) for a running jail."},{"id":65,"category":"Backend Tuning","command":"fail2ban-client get <JAIL> backend","example":"fail2ban-client get sshd backend","explanation":"Displays the current log monitoring backend method being used by the jail."},{"id":66,"category":"Log Maintenance","command":"truncate -s 0 /var/log/fail2ban.log","example":"truncate -s 0 /var/log/fail2ban.log","explanation":"Clears the Fail2Ban log file content without deleting the file (useful during testing)."},{"id":67,"category":"SOC Monitoring","command":"fail2ban-client set <JAIL> addlogpath <FILE>","example":"fail2ban-client set sshd addlogpath /var/log/auth.log.1","explanation":"Dynamically adds an additional log file to be monitored by a running jail."},{"id":68,"category":"SOC Monitoring","command":"fail2ban-client set <JAIL> dellogpath <FILE>","example":"fail2ban-client set sshd dellogpath /var/log/auth.log.1","explanation":"Dynamically removes a log file from being monitored by a running jail."},{"id":69,"category":"SOC Monitoring","command":"awk '($(NF-1) == \"Ban\"){print $NF}' /var/log/fail2ban.log | sort | uniq -c | sort -n","example":"awk '($(NF-1) == \"Ban\"){print $NF}' /var/log/fail2ban.log | sort | uniq -c | sort -n","explanation":"Extracts banned IPs from logs and displays frequency counts for threat analysis."},{"id":70,"category":"SOC Monitoring","command":"fail2ban-client set <JAIL> addfailregex <REGEX>","example":"fail2ban-client set sshd addfailregex '^Failed publickey for .* from <HOST>$'","explanation":"Injects a new failure regex into a running jail without reloading config files."},{"id":71,"category":"SOC Monitoring","command":"fail2ban-client set <JAIL> delfailregex <INDEX>","example":"fail2ban-client set sshd delfailregex 1","explanation":"Removes a failure regex from a running jail by its index."},{"id":72,"category":"Blue Team Validation","command":"fail2ban-client set <JAIL> banip <TEST_IP>","example":"fail2ban-client set sshd banip 192.0.2.100","explanation":"Tests the ban action mechanism by banning a reserved test IP address."},{"id":73,"category":"Blue Team Validation","command":"iptables -L -n | grep f2b","example":"iptables -L -n | grep f2b","explanation":"Verifies that Fail2Ban has correctly inserted its chains into the iptables firewall."},{"id":74,"category":"Blue Team Validation","command":"ipset list","example":"ipset list","explanation":"Lists IP sets if Fail2Ban is configured to use ipset for higher performance banning."},{"id":75,"category":"Blue Team Validation","command":"nft list ruleset | grep f2b","example":"nft list ruleset | grep f2b","explanation":"Verifies Fail2Ban rules in the nftables ruleset if using nftables backend."},{"id":76,"category":"Blue Team Validation","command":"logger -p auth.warn -t sshd 'Failed password for root from 192.0.2.200 port 22 ssh2'","example":"logger -p auth.warn -t sshd 'Failed password for root from 192.0.2.200 port 22 ssh2'","explanation":"Injects a fake log entry into syslog to trigger Fail2Ban detection logic."},{"id":77,"category":"Blue Team Validation","command":"fail2ban-regex --print-all-matched <LOG> <FILTER> | wc -l","example":"fail2ban-regex --print-all-matched /var/log/auth.log sshd | wc -l","explanation":"Counts the total number of historical matches for a specific filter in a log file."},{"id":78,"category":"System Maintenance","command":"rm /var/lib/fail2ban/fail2ban.sqlite3","example":"rm /var/lib/fail2ban/fail2ban.sqlite3","explanation":"Deletes the persistent database to reset all historical ban data (requires service stop)."},{"id":79,"category":"Automation & Scripting","command":"fail2ban-client status | grep 'Jail list' | sed 's/.*: //g' | tr ',' '\\n'","example":"fail2ban-client status | grep 'Jail list' | sed 's/.*: //g' | tr ',' '\\n'","explanation":"Parses the status output to generate a clean, newline-separated list of active jails."},{"id":80,"category":"Automation & Scripting","command":"fail2ban-client set <JAIL> idle on","example":"fail2ban-client set sshd idle on","explanation":"Sets the jail to idle mode, effectively pausing it without stopping the service."},{"id":81,"category":"Automation & Scripting","command":"fail2ban-client set <JAIL> idle off","example":"fail2ban-client set sshd idle off","explanation":"Resumes the jail from idle mode to active monitoring."},{"id":82,"category":"Incident Response","command":"fail2ban-client get <JAIL> banip --with-time","example":"fail2ban-client get sshd banip --with-time","explanation":"Retrieves the list of banned IPs along with the timestamp of when they were banned."},{"id":83,"category":"Incident Response","command":"fail2ban-client -v -v start","example":"fail2ban-client -v -v start","explanation":"Starts the Fail2Ban client in high verbosity mode for troubleshooting startup failures."},{"id":84,"category":"Incident Response","command":"grep 'restore ban' /var/log/fail2ban.log","example":"grep 'restore ban' /var/log/fail2ban.log","explanation":"Checks logs to verify if bans were successfully restored from the database after a restart."},{"id":85,"category":"Incident Response","command":"fail2ban-client set <JAIL> action <ACTION> actioncheck","example":"fail2ban-client set sshd action iptables-multiport actioncheck","explanation":"Manually triggers the 'actioncheck' command to verify firewall chain integrity."},{"id":86,"category":"Compliance & Policy","command":"fail2ban-client set <JAIL> banaction <ACTION>","example":"fail2ban-client set sshd banaction iptables-allports","explanation":"Dynamically changes the banning action used by a jail (e.g., switching from multiport to allports)."},{"id":87,"category":"Compliance & Policy","command":"fail2ban-client get <JAIL> action <ACTION> actionban","example":"fail2ban-client get sshd action iptables-multiport actionban","explanation":"Inspects the exact command string that will be executed when a ban occurs."},{"id":88,"category":"Advanced Troubleshooting","command":"fail2ban-client --str2sec <TIME_STRING>","example":"fail2ban-client --str2sec 1d12h","explanation":"Converts a time string (e.g., 1d12h) into seconds to verify configuration parsing logic."},{"id":89,"category":"Advanced Troubleshooting","command":"fail2ban-client -x start","example":"fail2ban-client -x start","explanation":"Starts the server and forces the removal of the socket file if it exists (socket cleanup)."},{"id":90,"category":"Advanced Troubleshooting","command":"fail2ban-client set <JAIL> usedns no","example":"fail2ban-client set sshd usedns no","explanation":"Disables DNS resolution for a jail to improve performance and prevent DNS timeouts."},{"id":91,"category":"Advanced Troubleshooting","command":"fail2ban-client set <JAIL> usedns raw","example":"fail2ban-client set sshd usedns raw","explanation":"Sets DNS mode to raw, processing IPs exactly as they appear in logs without resolution."},{"id":92,"category":"Advanced Troubleshooting","command":"python3 -c 'import fail2ban.server.failmanager; print(fail2ban.server.failmanager)'","example":"python3 -c 'import fail2ban.server.failmanager; print(fail2ban.server.failmanager)'","explanation":"Verifies that the Fail2Ban python modules are correctly installed and importable."},{"id":93,"category":"Recidive Handling","command":"fail2ban-client set recidive banip <IP>","example":"fail2ban-client set recidive banip 192.168.1.50","explanation":"Manually adds an IP to the recidive jail (long-term ban) usually reserved for repeat offenders."},{"id":94,"category":"Recidive Handling","command":"fail2ban-regex /var/log/fail2ban.log /etc/fail2ban/filter.d/recidive.conf","example":"fail2ban-regex /var/log/fail2ban.log /etc/fail2ban/filter.d/recidive.conf","explanation":"Tests the recidive filter against the Fail2Ban log itself to verify repeat offender detection."},{"id":95,"category":"Advanced Regex","command":"fail2ban-regex 'Dec 10 10:00:00 server sshd[123]: Invalid user test from 1.2.3.4' '<HOST>'","example":"fail2ban-regex 'Dec 10 10:00:00 server sshd[123]: Invalid user test from 1.2.3.4' '<HOST>'","explanation":"Tests the built-in <HOST> macro against a log line to ensure it extracts the IP 1.2.3.4."},{"id":96,"category":"Performance Tuning","command":"nice -n -10 fail2ban-server -b","example":"nice -n -10 fail2ban-server -b","explanation":"Starts the Fail2Ban server in the background with high CPU priority."},{"id":97,"category":"System Integration","command":"fail2ban-client get <JAIL> action <ACTION> actionstop","example":"fail2ban-client get sshd action iptables-multiport actionstop","explanation":"Displays the command executed when the jail stops, useful for checking cleanup logic."},{"id":98,"category":"State Management","command":"fail2ban-client set <JAIL> addignoreip <DNS_NAME>","example":"fail2ban-client set sshd addignoreip googlebot.com","explanation":"Adds a DNS hostname to the ignore list (requires usedns to be enabled)."},{"id":99,"category":"Visual Monitoring","command":"watch -n 1 'fail2ban-client status sshd'","example":"watch -n 1 'fail2ban-client status sshd'","explanation":"Runs the status command every second to create a real-time dashboard of the sshd jail."},{"id":100,"category":"Bulk Operations","command":"for jail in $(fail2ban-client status | grep 'Jail list' | sed 's/.*: //g' | tr ',' ' '); do fail2ban-client status $jail; done","example":"for jail in $(fail2ban-client status | grep 'Jail list' | sed 's/.*: //g' | tr ',' ' '); do fail2ban-client status $jail; done","explanation":"Loops through all active jails and prints the detailed status for each one."},{"id":101,"category":"Log Rotation Support","command":"fail2ban-client set <JAIL> logpath <NEW_LOG_FILE>","example":"fail2ban-client set sshd logpath /var/log/auth.log","explanation":"Updates the log file path for a running jail, useful during complex log rotation schemes."},{"id":102,"category":"Advanced Config Dump","command":"fail2ban-client --dump-pretty","example":"fail2ban-client --dump-pretty","explanation":"Dumps the current configuration in a human-readable, indented format (requires newer versions)."},{"id":103,"category":"Version Compatibility","command":"fail2ban-client -V","example":"fail2ban-client -V","explanation":"Short flag to display the version of the client."},{"id":104,"category":"Process Management","command":"pgrep -a fail2ban","example":"pgrep -a fail2ban","explanation":"Lists the process ID and full command line of the running Fail2Ban server."},{"id":105,"category":"Cleanup","command":"fail2ban-client stop && rm -f /var/run/fail2ban/fail2ban.sock","example":"fail2ban-client stop && rm -f /var/run/fail2ban/fail2ban.sock","explanation":"Stops the client and forcefully removes the socket file to resolve connection refused errors."}],"slug":"fail2ban","category":"monitoring","url":"https://terminal.rokibulroni.com/tool/monitoring/fail2ban","markdown":"https://terminal.rokibulroni.com/api/v1/tools/monitoring/fail2ban.md"}