Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 0) Fail2Ban filter for Elasticsearch behind NGINX Proxy with password file auth.
- 1) Add this to : /etc/fail2ban/jail.conf
- ################################
- # NGINX AUTH for Elasticsearch
- [nginx-auth]
- enabled = true
- filter = nginx-auth
- action = iptables-multiport[name=nginx-auth,port="80,443,9200"]
- logpath = /var/log/nginx/error.log
- ################################
- 2) Create file /etc/fail2ban/filter.d/nginx-auth.conf with this inside :
- ################################
- [Definition]
- failregex = no user/password was provided for basic authentication.*client: <HOST>
- user .* was not found in.*client: <HOST>
- user .* password mismatch.*client: <HOST>
- ignoreregex =
- ################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement