Suricata + Telegram Alerting Integration on ubuntu server
This guide explains how to install, configure, and automate Suricata intrusion detection alerts to be sent directly to Telegram using a simple Bash script. The setup uses the af-packet capture mode and monitors the Suricata eve.json log file for new alerts. 🛠️ 1. Installing Suricata and Dependencies Start by installing Suricata and the required tools for the notification script: sudo apt update sudo apt install -y suricata jq curl Suricata – intrusion detection system jq – parses JSON logs curl – sends messages to Telegram via API ⚙️ 2. Configure Suricata (suricata.yaml) Edit the main configuration file: sudo nano /etc/suricata/suricata.yaml Replace its content (or relevant parts) with the minimal working configuration below: %YAML 1.1 --- # =============================== # Suricata minimal config # =============================== vars: address-groups: HOME_NET: "[192.168.0.0/16]" EXTERNAL_NET: "!$HOME_NET" port-groups: HTTP_PORT...