### Installation
1. Install Fail2ban on Ubuntu/Debian
```bash
sudo apt-get install fail2ban
```
2. On Debian 12 and above, manually install rsyslog
```bash
sudo apt-get install rsyslog
```
3. Start the Fail2ban service
```bash
sudo systemctl start fail2ban
```
4. Enable Fail2ban to start automatically on boot
```bash
sudo systemctl enable fail2ban
```
5. Check the status of the Fail2ban service
```bash
sudo systemctl status fail2ban
```
### Default Configuration
1. The default configuration in Panel is as follows:
```yml
# DEFAULT-START
[DEFAULT]
bantime = 600
findtime = 300
maxretry = 5
banaction = ufw
action = %(action_mwl)s
# DEFAULT-END
[sshd]
ignoreip = 127.0.0.1/8
enabled = true
filter = sshd
port = 22
maxretry = 3
findtime = 300
bantime = -1
banaction = ufw
action = %(action_mwl)s
logpath = /var/log/auth.log
```
3. Modify the UFW configuration (/etc/fail2ban/action.d/ufw.conf)
```yml
[Definition]
actionstart =
actionstop =
actioncheck =
# Block all ports
actionban = ufw insert 1 deny from
actionunban = ufw delete deny from
```