Skip to content

[Feature]: Persistent Block List (Database) #18

@indrasuthar07

Description

@indrasuthar07

So, what is it about?

currently, blocked IPs are lost after every restart since they’re stored only in memory. This feature adds database persistence so blocked IPs and their history survive restarts and can be analyzed later.

Problem

  • Blocks reset after every restart
  • Attackers can bypass bans easily
  • No record of past attacks or repeated offenders

solution

Add a database-backed block list using SQLite (default) with optional PostgreSQL/MySQL support.
features:

  • Save blocked IPs with metadata (time, reason, type)
  • Auto-load blocks on startup
  • Maintain block history

Implementation

  • create src/database/block_store.py for DB operations
  • modify firewall core to load/save blocks from DB

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions