jail.conf is the fail2ban default configuration file. However, if you want to adjust anything, as noted in jail.conf file itself, it is better to create /etc/fail2ban/jail.local and put your adjustments there.
I like to make adjustments as follows,
Code Block |
---|
|
sudo touch /etc/fail2ban/jail.local
sudo ne /etc/fail2ban/jail.local # using ne to edit the file |
Add the following to the file,
Code Block |
---|
|
# The DEFAULT allows a global definition of the options. They can be override
# in each jail afterwards.
[DEFAULT]
maxretry = 10 |
For configuration changes to take effect you need to restart the service,
Code Block |
---|
|
sudo /etc/init.d/fail2ban stop
sudo /etc/init.d/fail2ban start |