I wanted to install, configure and test intrusion detection system (IDS) intrusion prevention system (IPS) Suricata on 22.04
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya,
Ensure your system is up-to-date:
sudo apt update && sudo apt upgrade -y
sudo add-apt-repository ppa:oisf/suricata-stable
sudo apt update
sudo apt install suricata -y
suricata --version
/etc/suricata/suricata.yaml
. Open it for editing:sudo nano /etc/suricata/suricata.yaml
Configure network interfaces (e.g., eth0
):
af-packet:
- interface: eth0
cluster-id: 99
cluster-type: cluster_flow
defrag: yes
sudo suricata-update
After downloading, restart Suricata to apply rules:
sudo systemctl restart suricata
Suricata can run in IDS mode by default, capturing traffic without blocking it. To enable IDS:
tcpdump
or af-packet
for traffic mirroring, depending on your configuration.Start Suricata with:
sudo suricata -c /etc/suricata/suricata.yaml -i eth0
To enable IPS mode:
sudo apt install iptables-persistent
suricata.yaml
: Enable the NFQUEUE
section:nfqueue:
- id: 0
bypass: no
sudo iptables -I INPUT -j NFQUEUE --queue-num 0
sudo iptables -I FORWARD -j NFQUEUE --queue-num 0
sudo systemctl restart suricata
Heya, @setupmybusiness
You can also check our tutorial on how to install Suricata on Ubuntu 22.04, the process will be fairly the same:
https://www.digitalocean.com/community/tutorials/how-to-install-suricata-on-ubuntu-20-04
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.