# Limit num tries for htaccess?

## audiodef

How do I limit the number of login attempts when using an .htaccess user/pass restriction? That is, after 3 tries, the popup is no longer presented and the user gets a "not authorized to view this page."

In addition, when this happens, how do I configure fail2ban to block the offending IP address for x amount of time?

----------

## Telemin

there is no way to limit that within .htaccess, but the fail2ban module you are looking for is "apache-auth"

----------

