fail2ban restarts upon WAN DHCP lease renewal
Thanks @peci1 for the script and making it easy to install/configure fail2ban on OpenWRT!
I recently found that fail2ban on OpenWRT constantly restarts itself (sometimes 30min or 1-2 hours). And After checking the system.log I found an exact correlation between the fail2ban restart time and the WAN IP DHCP lease renewal time. Unfortunately I cannot control the DHCP lease interval of the WAN service provider. Is there a way to instruct fail2ban to not restart upon WAN IP lease renewal (the WAN IP is the same)? I assume the firewall is auto-reloaded upon WAN IP lease renewal, causing fail2ban to restart.
--- system.log ---
Mon Sep 22 09:11:54 2025 daemon.notice netifd: wan (16548): udhcpc: sending renew to server y.y.y.y
Mon Sep 22 09:11:54 2025 daemon.notice netifd: wan (16548): udhcpc: lease of x.x.x.x obtained from y.y.y.y, lease time 3600
--- fail2ban.log ---
2025-09-22 09:11:57,809 fail2ban.server [13043]: INFO Shutdown in progress...
2025-09-22 09:11:57,811 fail2ban.observer [13043]: INFO Observer stop ... try to end queue 5 seconds
2025-09-22 09:11:57,834 fail2ban.observer [13043]: INFO Observer stopped, 0 events remaining.
2025-09-22 09:11:57,876 fail2ban.server [13043]: INFO Stopping all jails
Thanks for the report. Does the restart cause any issues? I'd just take it as a normal part of the firewall reloading process.