Refactor auto_block.py to call the Node.js backend for blocking critical IPs and adjust the auto-block service configuration. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 7a657272-55ba-4a79-9a2e-f1ed9bc7a528 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: aef8a3be-adf0-4bdc-942f-3e7b19be7d72 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/449cf7c4-c97a-45ae-8234-e5c5b8d6a84f/7a657272-55ba-4a79-9a2e-f1ed9bc7a528/4aeldgV
78 lines
5.7 KiB
Plaintext
78 lines
5.7 KiB
Plaintext
journalctl -u ids-analytics-aggregator.timer -f
|
||
Feb 16 12:18:50 ids.alfacom.it systemd[1]: Started IDS Analytics Aggregation Timer - Runs every hour.
|
||
Feb 16 12:40:08 ids.alfacom.it systemd[1]: ids-analytics-aggregator.timer: Deactivated successfully.
|
||
Feb 16 12:40:08 ids.alfacom.it systemd[1]: Stopped IDS Analytics Aggregation Timer - Runs every hour.
|
||
Feb 16 12:40:08 ids.alfacom.it systemd[1]: Stopping IDS Analytics Aggregation Timer - Runs every hour...
|
||
Feb 16 12:40:08 ids.alfacom.it systemd[1]: Started IDS Analytics Aggregation Timer - Runs every hour.
|
||
^C
|
||
[root@ids ids]# systemctl status ids-ml-backend
|
||
● ids-ml-backend.service - IDS ML Backend (FastAPI)
|
||
Loaded: loaded (/etc/systemd/system/ids-ml-backend.service; enabled; preset: disabled)
|
||
Active: active (running) since Mon 2026-02-16 15:51:26 CET; 9min ago
|
||
Main PID: 13099 (python3)
|
||
Tasks: 26 (limit: 100409)
|
||
Memory: 402.9M (max: 2.0G available: 1.6G)
|
||
CPU: 15.905s
|
||
CGroup: /system.slice/ids-ml-backend.service
|
||
└─13099 /opt/ids/python_ml/venv/bin/python3 main.py
|
||
|
||
Feb 16 15:51:26 ids.alfacom.it systemd[1]: Started IDS ML Backend (FastAPI).
|
||
[root@ids ids]# cat /var/log/ids/backend.log | tail -20
|
||
[Mon Feb 16 15:40:04 CET 2026] Backend riavviato con PID: 12165
|
||
INFO: Started server process [12165]
|
||
INFO: Waiting for application startup.
|
||
INFO: Application startup complete.
|
||
ERROR: [Errno 98] error while attempting to bind on address ('0.0.0.0', 8000): address already in use
|
||
INFO: Waiting for application shutdown.
|
||
INFO: Application shutdown complete.
|
||
[WARNING] Extended Isolation Forest not available, using standard IF
|
||
[ML] Using Hybrid ML Detector (Extended Isolation Forest + Feature Selection)
|
||
[HYBRID] Ensemble classifier loaded
|
||
[HYBRID] Models loaded (version: latest)
|
||
[HYBRID] Selected features: 18/25
|
||
[HYBRID] Mode: Hybrid (IF + Ensemble)
|
||
[ML] ✓ Hybrid detector models loaded and ready
|
||
Starting IDS API on http://0.0.0.0:8000
|
||
Docs available at http://0.0.0.0:8000/docs
|
||
[Mon Feb 16 15:45:01 CET 2026] Backend Python NON attivo, riavvio via systemctl...
|
||
[Mon Feb 16 15:45:04 CET 2026] ERRORE: Backend non si è avviato. Controlla: journalctl -u ids-ml-backend
|
||
[Mon Feb 16 15:50:01 CET 2026] Backend Python NON attivo, riavvio via systemctl...
|
||
[Mon Feb 16 15:50:04 CET 2026] ERRORE: Backend non si è avviato. Controlla: journalctl -u ids-ml-backend
|
||
[root@ids ids]# systemctl status ids-auto-block
|
||
journalctl -u ids-auto-block --no-pager | tail -20
|
||
× ids-auto-block.service - IDS Auto-Blocking Service - Detect and Block Malicious IPs
|
||
Loaded: loaded (/etc/systemd/system/ids-auto-block.service; disabled; preset: disabled)
|
||
Active: failed (Result: signal) since Mon 2026-02-16 12:47:58 CET; 3h 13min ago
|
||
TriggeredBy: ○ ids-auto-block.timer
|
||
Docs: https://github.com/yourusername/ids
|
||
Main PID: 2896 (code=killed, signal=TERM)
|
||
CPU: 155ms
|
||
|
||
Feb 16 12:46:47 ids.alfacom.it systemd[1]: Starting IDS Auto-Blocking Service - Detect and Block Malicious IPs...
|
||
Feb 16 12:47:58 ids.alfacom.it systemd[1]: ids-auto-block.service: Main process exited, code=killed, status=15/TERM
|
||
Feb 16 12:47:58 ids.alfacom.it systemd[1]: ids-auto-block.service: Failed with result 'signal'.
|
||
Feb 16 12:47:58 ids.alfacom.it systemd[1]: Stopped IDS Auto-Blocking Service - Detect and Block Malicious IPs.
|
||
Feb 16 12:38:46 ids.alfacom.it systemd[1]: Starting IDS Auto-Blocking Service - Detect and Block Malicious IPs...
|
||
Feb 16 12:40:46 ids.alfacom.it systemd[1]: ids-auto-block.service: Main process exited, code=exited, status=1/FAILURE
|
||
Feb 16 12:40:46 ids.alfacom.it systemd[1]: ids-auto-block.service: Failed with result 'exit-code'.
|
||
Feb 16 12:40:46 ids.alfacom.it systemd[1]: Failed to start IDS Auto-Blocking Service - Detect and Block Malicious IPs.
|
||
Feb 16 12:40:46 ids.alfacom.it systemd[1]: Starting IDS Auto-Blocking Service - Detect and Block Malicious IPs...
|
||
Feb 16 12:42:46 ids.alfacom.it systemd[1]: ids-auto-block.service: Main process exited, code=exited, status=1/FAILURE
|
||
Feb 16 12:42:46 ids.alfacom.it systemd[1]: ids-auto-block.service: Failed with result 'exit-code'.
|
||
Feb 16 12:42:46 ids.alfacom.it systemd[1]: Failed to start IDS Auto-Blocking Service - Detect and Block Malicious IPs.
|
||
Feb 16 12:42:46 ids.alfacom.it systemd[1]: Starting IDS Auto-Blocking Service - Detect and Block Malicious IPs...
|
||
Feb 16 12:44:47 ids.alfacom.it systemd[1]: ids-auto-block.service: Main process exited, code=exited, status=1/FAILURE
|
||
Feb 16 12:44:47 ids.alfacom.it systemd[1]: ids-auto-block.service: Failed with result 'exit-code'.
|
||
Feb 16 12:44:47 ids.alfacom.it systemd[1]: Failed to start IDS Auto-Blocking Service - Detect and Block Malicious IPs.
|
||
Feb 16 12:44:47 ids.alfacom.it systemd[1]: Starting IDS Auto-Blocking Service - Detect and Block Malicious IPs...
|
||
Feb 16 12:46:47 ids.alfacom.it systemd[1]: ids-auto-block.service: Main process exited, code=exited, status=1/FAILURE
|
||
Feb 16 12:46:47 ids.alfacom.it systemd[1]: ids-auto-block.service: Failed with result 'exit-code'.
|
||
Feb 16 12:46:47 ids.alfacom.it systemd[1]: Failed to start IDS Auto-Blocking Service - Detect and Block Malicious IPs.
|
||
Feb 16 12:46:47 ids.alfacom.it systemd[1]: Starting IDS Auto-Blocking Service - Detect and Block Malicious IPs...
|
||
Feb 16 12:47:58 ids.alfacom.it systemd[1]: ids-auto-block.service: Main process exited, code=killed, status=15/TERM
|
||
Feb 16 12:47:58 ids.alfacom.it systemd[1]: ids-auto-block.service: Failed with result 'signal'.
|
||
Feb 16 12:47:58 ids.alfacom.it systemd[1]: Stopped IDS Auto-Blocking Service - Detect and Block Malicious IPs.
|
||
[root@ids ids]# curl -X POST http://localhost:5000/api/ml/block-all-critical \
|
||
-H "Content-Type: application/json" \
|
||
-d '{"min_score": 80, "limit": 200}'
|