Skip to content

🛡️ Active Defense

The Active Defense module connects your scanner/honeypot directly to your system firewall.

Configuration

Ensure you have ufw (Linux) or Administrator privileges (Windows).

Automatic Blocking

When an attack is detected (e.g., by the Honeypot), CyProLib executes:

  • Linux: sudo ufw deny from <ATTACKER_IP>
  • Windows: netsh advfirewall firewall add rule ... action=block

Manual Blocking

```python from cyprolib.ids.blocker import FirewallManager

fw = FirewallManager() fw.block_ip("192.168.1.100")