Banning with basic auth and Fail2Ban

By using basic auth on you apps there is nothing stopping people from trying to brute force their way in. But by implementing Fail2ban, you can give the user or intruder x amount of retries before getting banned. Creating the .htpasswd file exec into your container and create the .htpasswd file Use this command to create a .htpasswd file. Just drop the docker part if you don’t use that. docker exec -it letsencrypt htpasswd -c /config/nginx/.htpasswd USER-NAME New password: Re-type new password: Adding password for user yourusername The outcome would be like this: login:password exampleuser:$apr1$adiBYUBX$61udeQ5OGHJXev1l.Mr5X/ If you choose to put … Continue reading Banning with basic auth and Fail2Ban