User Tools

Site Tools


ubuntu:fail2ban:override_the_default_configuration_settings

This is an old revision of the document!


Ubuntu - Fail2Ban - Override the default configuration settings

Edit the /etc/fail2ban/jail.d/defaults-debian.conf file, and add configuration changes into the [DEFAULT] section to override.

/etc/fail2ban/jail.d/defaults-debian.conf
[DEFAULT]
banaction = nftables
banaction_allports = nftables[type=allports]
backend = systemd
 
[sshd]
enabled = true

WARNING: Do not change entries in the [sshd] section, as that would override settings specifically for the sshd service.

  • Of course, if there is a need to override settings for the sshd service as well, then go ahead with changes in the sshd section.

Enable the new changes

Reload fail2ban to enable the changes.

sudo systemctl reload fail2ban 

ubuntu/fail2ban/override_the_default_configuration_settings.1748640520.txt.gz · Last modified: 2025/05/30 21:28 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki