FAIL2BAN - Filter.d - http-netbox

From IT-Arts.net


Return to Wiki Index


! Should be customized to your needs !

Filter.d

# /etc/fail2ban/filter.d/http-netbox.conf
# Fail2Ban filter for NetBox Web Interface behind Nginx
[Definition]

# Match failed login attempts in Nginx access log
failregex = ^<HOST> - .* "POST /accounts/login/ HTTP/.*" 401
            ^<HOST> - .* "POST /auth/login/ HTTP/.*" 401

# Match potential brute force login attempts
ignoreregex =


Jail.conf

[http-netbox]
enabled  = true
banaction = %(banaction_allports)s
logpath  = /var/log/nginx/*.access.log
maxretry = 10
bantime  = 10m
findtime = 3d
backend = polling