fail2ban: ignoreip from local network
This commit is contained in:
@@ -89,6 +89,12 @@ in
|
|||||||
port = "http,https";
|
port = "http,https";
|
||||||
logpath = "/var/log/caddy/access-*.log";
|
logpath = "/var/log/caddy/access-*.log";
|
||||||
# defaults: maxretry=5, findtime=10m, bantime=10m
|
# defaults: maxretry=5, findtime=10m, bantime=10m
|
||||||
|
|
||||||
|
# Ignore local network IPs - NAT hairpinning causes all LAN traffic to
|
||||||
|
# appear from the router IP (192.168.1.1). Banning it blocks all internal access.
|
||||||
|
# Browser subrequests for static assets (favicon.ico, etc.) without Authorization
|
||||||
|
# headers cause 401s that quickly trigger the ban threshold.
|
||||||
|
ignoreip = "127.0.0.1/8 ::1 192.168.1.0/24";
|
||||||
};
|
};
|
||||||
filter.Definition = {
|
filter.Definition = {
|
||||||
# Match Caddy JSON logs with 401 Unauthorized status (failed basic auth)
|
# Match Caddy JSON logs with 401 Unauthorized status (failed basic auth)
|
||||||
|
|||||||
Reference in New Issue
Block a user