Back to Blog
Homelab 1 min read

Hardening Samba with Fail2Ban — Rate Limiting Auth Failures

Configuring Fail2Ban jails for Samba authentication failures on the Pi, with ntfy integration for ban notifications.

Samba shares are accessible only from the Admin VLAN. But even with network isolation, brute-force protection matters — internal threats are real threats.

Fail2Ban monitors /var/log/samba/log.* for authentication failures. Five failures in 10 minutes triggers a ban lasting 24 hours. An ntfy webhook fires when a ban is issued.

The jail configuration also sends an alert on un-ban events, so you know when a timeout has expired and whether the offender is trying again.