Skip to content

Instantly share code, notes, and snippets.

@iamkingsleyf
Forked from gbot/wp-login-jail.local
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamkingsleyf/84f9e3d7e5f365fd2da9 to your computer and use it in GitHub Desktop.
Save iamkingsleyf/84f9e3d7e5f365fd2da9 to your computer and use it in GitHub Desktop.
# Create a filter called 'apache-wp-login'
[Definition]
failregex = <HOST>.*] "POST /wp-login.php HTTP/.*" 200
ignoreregex =
[INCLUDES]
before = apache-common.conf
# Create a jail
[wp-login]
enabled = true
filter = apache-wp-login
action = iptables-multiport[name=wp-login, port="http,https"]
sendmail[dest="name@domain.com", sendername="Fail2Ban", sender="fail2ban", name="wp-login"]
logpath = /var/www/vhosts/system/*/logs/access*_log
maxretry = 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment