Support » Plugin: WP fail2ban - Advanced Security Plugin » values for wp-config.php full current list

  • Resolved jseutens

    (@jseutens)


    // WP fail2ban configs setting that can be changed , just comment the ones you do not need/want
    //
    // possible values for the loggin LOG_AUTH,LOG_AUTHPRIV,LOG_CRON,LOG_DAEMON,LOG_KERN, LOG_LOCAL0, LOG_LOCAL1, LOG_LOCAL2,LOG_LOCAL3, LOG_LOCAL4, LOG_LOCAL5,LOG_LOCAL6, LOG_LOCAL7, LOG_LPR, LOG_MAIL, LOG_NEWS, LOG_SYSLOG, LOG_USER, LOG_UUCP,
    //
    // grouped per tab in wp fail 2 ban settings
    // Logging
    //Authentication
    define(‘WP_FAIL2BAN_AUTH_LOG’, LOG_AUTH);
    //Comments
    // this include is needed if you want comments logging
    include __DIR__.’/wp-content/plugins/wp-fail2ban/lib/constants.php’;
    define(‘WP_FAIL2BAN_LOG_COMMENTS’, true);
    define(‘DEFAULT_WP_FAIL2BAN_COMMENT_LOG’,LOG_USER);
    // full list
    // define(‘WP_FAIL2BAN_LOG_COMMENTS_EXTRA’, WPF2B_EVENT_COMMENT_NOT_FOUND | WPF2B_EVENT_COMMENT_CLOSED | WPF2B_EVENT_COMMENT_TRASH | WPF2B_EVENT_COMMENT_DRAFT | WPF2B_EVENT_COMMENT_PASSWORD);
    define(‘WP_FAIL2BAN_LOG_COMMENTS_EXTRA’, WPF2B_EVENT_COMMENT_NOT_FOUND | WPF2B_EVENT_COMMENT_CLOSED | WPF2B_EVENT_COMMENT_TRASH | WPF2B_EVENT_COMMENT_DRAFT | WPF2B_EVENT_COMMENT_PASSWORD);
    define(‘WP_FAIL2BAN_COMMENT_EXTRA_LOG’, LOG_AUTH);
    //spam
    define(‘WP_FAIL2BAN_LOG_SPAM’, true);
    define(‘DEFAULT_WP_FAIL2BAN_SPAM_LOG’,LOG_AUTH);
    //password requests
    define(‘WP_FAIL2BAN_LOG_PASSWORD_REQUEST’, true);
    define(‘DEFAULT_WP_FAIL2BAN_PASSWORD_REQUEST_LOG’,LOG_USER);
    //pingbacks
    define(‘WP_FAIL2BAN_LOG_PINGBACKS’, true);
    define(‘DEFAULT_WP_FAIL2BAN_PINGBACK_ERROR_LOG’,LOG_AUTH);
    //
    //syslog
    //Connection
    // define(‘WP_FAIL2BAN_OPENLOG_OPTIONS’,LOG_CONS|LOG_PERROR|LOG_PID|LOG_NDELAY|LOG_ODELAY); // last 2 pick one not both see next line
    // define(‘WP_FAIL2BAN_OPENLOG_OPTIONS’, LOG_CONS|LOG_PERROR|LOG_PID|LOG_NDELAY);
    // this is the default setting
    define(‘WP_FAIL2BAN_OPENLOG_OPTIONS’,LOG_PID|LOG_NDELAY);
    //Workarounds
    //disabled not needed , only for problematic systems
    //define(‘WP_FAIL2BAN_SYSLOG_SHORT_TAG’, true);
    //define(‘WP_FAIL2BAN_HTTP_HOST’, true);
    //define(‘WP_FAIL2BAN_TRUNCATE_HOST’, true);
    //
    //Block
    define(‘WP_FAIL2BAN_BLOCK_USER_ENUMERATION’, true);
    define(‘WP_FAIL2BAN_BLOCKED_USERS’, [‘admin’, ‘root’]);
    define(‘WP_FAIL2BAN_BLOCK_USERNAME_LOGIN’, true);
    //
    //Remote IP
    // white listed IPS , disabled by default
    //define(‘WP_FAIL2BAN_PROXIES’, [‘192.168.0.42′,’192.168.42.0/24’]);
    //
    // Plugins
    //
    define(‘WP_FAIL2BAN_PLUGIN_LOG_AUTH’, true);
    define(‘DEFAULT_WP_FAIL2BAN_PLUGIN_AUTH_LOG’,LOG_AUTH);
    define(‘WP_FAIL2BAN_PLUGIN_LOG_BLOCK’, true);
    define(‘DEFAULT_WP_FAIL2BAN_PLUGIN_BLOCK_LOG’,LOG_USER);
    define(‘WP_FAIL2BAN_PLUGIN_LOG_COMMENT’, true);
    define(‘DEFAULT_WP_FAIL2BAN_PLUGIN_COMMENT_LOG’,LOG_USER);
    define(‘WP_FAIL2BAN_PLUGIN_LOG_OTHER’, true);
    define(‘DEFAULT_WP_FAIL2BAN_PLUGIN_OTHER_LOG’,LOG_USER);
    define(‘WP_FAIL2BAN_PLUGIN_LOG_PASSWORD’, true);
    define(‘DEFAULT_WP_FAIL2BAN_PLUGIN_PASSWORD_LOG’,LOG_USER);
    define(‘WP_FAIL2BAN_PLUGIN_LOG_REST’, true);
    define(‘DEFAULT_WP_FAIL2BAN_PLUGIN_REST_LOG’,LOG_USER);
    define(‘WP_FAIL2BAN_PLUGIN_LOG_SPAM’, true);
    define(‘DEFAULT_WP_FAIL2BAN_PLUGIN_SPAM_LOG’,LOG_AUTH);
    define(‘WP_FAIL2BAN_PLUGIN_LOG_XMLRPC’, true);
    define(‘DEFAULT_WP_FAIL2BAN_PLUGIN_XMLRPC_LOG’,LOG_USER);
    // end of WP fail2ban plugin

Viewing 1 replies (of 1 total)
  • Plugin Author invisnet

    (@invisnet)

    There are some problems with that, e.g. you shouldn’t define any of the DEFAULT_xxx constants, but it’s a really good idea – thanks!

    I’ve borrowed your idea and created a repo for it – PRs welcome.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.