> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# How to Configure Failed Login IP Blocking Limits in DirectAdmin (CSF)

This guide provides step-by-step instructions to configure failed login attempt limits in CSF (ConfigServer Security & Firewall) from the DirectAdmin control panel. Properly adjusting these settings helps protect your server against brute-force attacks, unauthorized login attempts, and repeated authentication failures across services such as DirectAdmin, SSH, and email.

Adjust the settings according to your server security requirements.

## Configure the Limits


### Log in to DirectAdmin as Admin
Open your DirectAdmin panel at `https://your-server-ip:2222` (or use your domain name) and log in with your **Admin** credentials.
### Open the CSF plugin
Navigate to **Extra Features** > **ConfigServer Security & Firewall**.
If you do not see this option, CSF is not installed on your server.
### Open Firewall Configuration
Click on **Firewall Configuration**.
### Find the failed login settings
Press **Ctrl + F** in your browser and search for the parameters listed in [Settings Reference](#settings-reference) below. Change the values according to your security requirements.
### Save and restart CSF
Scroll to the bottom of the page, then:
1. Click **Change**.
2. Click **Restart csf+lfd**.
Your new failed login limits are now active.

## Settings Reference

### Global Login Failure Limit

```
LF_TRIGGER = "0"
```

This blocks an IP after 5 failed login attempts.

### DirectAdmin Login Protection

```
LF_DIRECTADMIN = "5"
```

Controls failed DirectAdmin panel login attempts.

### SSH Login Protection

```
LF_SSHD = "5"
```

Controls failed SSH login attempts.

### Email Login Protection (Optional)

```
LF_SMTPAUTH = "5"
LF_POP3D = "5"
LF_IMAPD = "5"
```

Controls failed email login attempts.

### Temporary or Permanent Block

```
LF_BLOCK = "1"
```

- `1` = temporary block
- `0` = permanent block

### Block Time (in Seconds)

```
CT_BLOCK_TIME = "3600"
```

- `3600` = 1 hour
- `86400` = 24 hours

## Recommended Secure Settings

For better brute-force protection:

```
LF_TRIGGER = "0"
LF_DIRECTADMIN = "5"
LF_SSHD = "5"
CT_BLOCK_TIME = "86400"
```
