Increase auto-block timeout to 300s, update systemd service timeout to 480s, and reduce individual MikroTik request timeout to 8s. Add per-router logging for blocking operations. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 7a657272-55ba-4a79-9a2e-f1ed9bc7a528 Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Event-Id: 455f4d8c-e90c-45d5-a7f1-e5f98b1345d3 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/449cf7c4-c97a-45ae-8234-e5c5b8d6a84f/7a657272-55ba-4a79-9a2e-f1ed9bc7a528/cJuycQ5
30 lines
674 B
Desktop File
30 lines
674 B
Desktop File
[Unit]
|
|
Description=IDS Auto-Blocking Service - Detect and Block Malicious IPs
|
|
After=network.target postgresql-16.service
|
|
Wants=ids-ml-backend.service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
User=ids
|
|
Group=ids
|
|
WorkingDirectory=/opt/ids
|
|
EnvironmentFile=/opt/ids/.env
|
|
|
|
# Esegui script auto-blocking (usa venv Python)
|
|
ExecStart=/opt/ids/python_ml/venv/bin/python3 /opt/ids/python_ml/auto_block.py
|
|
|
|
# Logging
|
|
StandardOutput=append:/var/log/ids/auto_block.log
|
|
StandardError=append:/var/log/ids/auto_block.log
|
|
SyslogIdentifier=ids-auto-block
|
|
|
|
# Security
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
|
|
# Timeout: max 8 minuti per detection+blocking
|
|
TimeoutStartSec=480
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|