title: Leech Protection created at: Tue Oct 22 2024 09:30:21 GMT+0000 (Coordinated Universal Time) updated at: Sat Feb 08 2025 14:21:49 GMT+0000 (Coordinated Universal Time) --- # Leech Protection # Overview The *Leech Protection* interface allows you to detect unusual levels of activity in password-restricted directories. After you set the maximum number of logins within a two-hour period, the system redirects or suspends users who exceed it. This is useful if, for example, someone posts a user’s login credentials on a public site. !! Important !! [Litespeed Web Server](https://www.litespeedtech.com/products/litespeed-web-server) does **not** support leech protection. To enable leech protection, we recommend that you use [Apache](https://www.apache.org/) . Enable leech protection To enable leech protection for a directory, perform the following steps: 1. Click *Settings*, and then select one of the following locations in which to begin navigation: * *Web Root (public\_html or www)* — Begin navigation in the document root for the account’s primary domain. * *Document Root for* — Select the domain that corresponds to the document root in which you wish to begin navigation. * To configure the interface to always open your selection from Step 1, select the *Always open this directory in the future* checkbox. 2. Click *Save Changes*. 3. Navigate to the directory that you wish to protect. * Click the appropriate folder icon ![media\_Leech%20Protection/kboZ1fr71iPNrn-leechprotectionfolder.png](media_Leech%20Protection/kboZ1fr71iPNrn-leechprotectionfolder.png) to navigate to a different folder. ``` - Click the desired folder’s name to select it. A new interface will appear. ``` 1. Enter the maximum number of logins that you wish to allow each user within a two-hour period. 2. To redirect users who exceed the maximum number of logins within a two-hour period, enter a URL to which you wish to redirect them. 3. To configure the system to send an email alert when *Leech Protection* activates, select the *Send Email Alert To* checkbox. Then, enter the email address to alert. 4. To disable an account that exceeds the maximum number of logins, select the *Disable Compromised Accounts* checkbox. 5. Click *Enable*. # Manage users To add, edit, and delete users, perform the following steps: 1. Navigate to a directory that you wish to protect with user-level protection. * Click the appropriate folder icon ![media\_Leech%20Protection/4odybaEfyqq-zI-leechprotectionfolder.png](media_Leech%20Protection/4odybaEfyqq-zI-leechprotectionfolder.png) to navigate to a different folder. ``` - Click the desired folder’s name to select it. A new interface will appear. ``` 1. Click *Manage Users* to navigate to cPanel’s [*Directory Privacy*](https://docs.cpanel.net/cpanel/files/directory-privacy/) interface for that folder (*cPanel » Home » Security » Directory Privacy*). !! Note !! To manage users manually, edit the `/home/USERNAME/.htpasswds/public_html/passwd` file, where `USERNAME` represents the account name. # Disable leech protection To disable leech protection, perform the following steps: 1. Navigate to the directory for which you wish to disable leech protection. * Click the appropriate folder icon ( ![media\_Leech%20Protection/V5lr1xNx0dfrVB-leechprotectionfolder.png](media_Leech%20Protection/V5lr1xNx0dfrVB-leechprotectionfolder.png) ``` ) to navigate to a different folder. - Click the desired folder’s name to select it. ``` 1. Click *Disable*.