• Resolved ismailm120

    (@ismailm120)


    Thank you so much for this plugin. I tested this to see if any invalid attempts are being logged. I set the log to /var/log/auth.log

    OS is CentOS
    fail2ban starts with no issues
    jail.local for wordpress is
    # WordPress config
    [wordpress]

    enabled = true
    filter = wordpress
    action = iptables[name=wordpress, port=”http,https”]
    logpath = /var/log/auth.log

    I tried incorrect logins several times with no data in auth.log. What am I doing wrong?

    https://www.ads-software.com/plugins/wp-fail2ban/

Viewing 3 replies - 1 through 3 (of 3 total)
  • In CentOS auth.log is secure

    Use this
    logpath = /var/log/secure

    Change line 34 of the plugin file to
    defined('WP_FAIL2BAN_LOG') ? WP_FAIL2BAN_LOG : LOG_AUTHPRIV);

    For CentOS 6 it was unnecessary for me to change the plugin code. It went to /var/log/messages by default.

    After spending half a day debugging, I could never get fail2ban to trigger an action though even it was matching the log file. Instead of fail2ban I used CSF LFD to block IPs with this plugin per https://forum.configserver.com/viewtopic.php?f=6&t=6663#p20069

    Plugin Author invisnet

    (@invisnet)

    If you want to change which syslog facility is used you can do that by defining WP_FAIL2BAN_LOG in wp-config.php. For example,

    define('WP_FAIL2BAN_LOG',LOG_AUTHPRIV);

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘log file’ is closed to new replies.