github swissmakers/fail2ban-ui v1.2.8

latest releases: v1.6.2, v1.6.1, v1.6.0...
10 months ago

What's Changed

  • Added manual block section and BanIP method for all connectors, like the UnbanIP functionality by @swissmakers in #45

Backend Changes

  1. Added BanIP method to the Connector interface in internal/fail2ban/manager.go
  2. Implemented BanIP in all connectors:
    • LocalConnector - uses fail2ban-client set <jail> banip <ip>
    • SSHConnector - uses runFail2banCommand with banip
    • (AgentConnector - uses POST to /v1/jails/{jail}/ban) - experimental
  3. Added API route /api/jails/:jail/ban/:ip in pkg/web/routes.go
  4. Added BanIPHandler in pkg/web/handlers.go (mirrors UnbanIPHandler)

Frontend Changes

  1. Added manual block section in dashboard.js between "Overview active Jails and Blocks" and "Internal Log Overview"
  2. Added banIP(jail, ip) function (mirrors unbanIP)
  3. Added handleManualBlock() function with form validation
  4. Section includes:
    • Jail dropdown (populated from enabled jails)
    • IP address input field
    • Block IP button
    • Form validation (jail selection, IP format)

Full Changelog: v1.2.7...v1.2.8

Don't miss a new fail2ban-ui release

NewReleases is sending notifications on new releases.