Install and Configure Snort on Ubuntu and CentOS

In this chapter, you will learn

  1. Install and Configure Snort on Ubuntu and CentOS

Snort is a popular and widely used network intrusion detection system that prevents network from threats. It monitors network traffic on real-time and detects suspicious or dangerous packets and block them. It is an open-source packet sniffer tool that detects and blocks suspicious packets on your network.

How to Install Snort on Ubuntu and CentOS?

To install snort on Ubuntu and CentOS system, follow these steps:

Ubuntu

Step 1: Update package repositories.
sudo apt update && sudo apt upgrade
Step 2: Install snort.
sudo apt install snort

CentOS

sudo yum install snort
Step 3: Check snort version
snort -version
Step 4: Configure Snort. Open the snort.conf file and configure it according to your need.
sudo vi /etc/snort/snort.conf
Step 5: Test Syntax error before saving snort.conf file.
sudo snort -T -c /etc/snort/snort.conf
Step 6: Start snort
sudo service snort start
Step 7: To check snort status, type the following command.
systemctl is-active snort

Summary

Snort is network intrusion detection system that you must install on your Ubuntu/CentOS/Linux server. It protects your network from threats and unwanted attacks.