How to Install Snort on Ubuntu 20.04


Easily deploy your favorite applications in seconds at an unbeatable price for your next projects.

Installing Snort on Ubuntu 20.04

Snort is a free open-source intrusion prevention system (IPS) and intrusion detection system (IDS) that can be used on networks to analyze network traffic and detect potential threats or intrusions. It is highly flexible and can be customized to specific network environments.

Step 1: Update Ubuntu

sudo apt update
sudo apt upgrade

Step 2: Install Required Dependencies

sudo apt install -y build-essential libpcap-dev libpcre3-dev libdumbnet-dev bison flex zlib1g-dev liblzma-dev openssl libssl-dev ethtool

Step 3: Download and Extract Snort

cd ~
wget https://www.snort.org/downloads/snort/snort-2.9.17.tar.gz
tar -xvf snort-2.9.17.tar.gz
cd snort-2.9.17

Step 4: Configure and Compile Snort

./configure --enable-sourcefire
sudo make install

Step 5: Create Snort User and Group

sudo groupadd snort
sudo useradd snort -r -s /sbin/nologin -c SNORT_IDS -g snort

Step 6: Create Necessary Directories for Snort

sudo mkdir /etc/snort
sudo mkdir /etc/snort/rules
sudo mkdir /var/log/snort
sudo mkdir /usr/local/lib/snort_dynamicrules

Step 7: Copy Configuration Files

sudo cp ~/snort-2.9.17/etc/*.conf* /etc/snort/
sudo cp ~/snort-2.9.17/etc/*.map /etc/snort/

Step 8: Configure Snort Rules

Edit the Snort configuration file:

sudo nano /etc/snort/snort.conf

Uncomment the following line to enable the rules:

include $RULE_PATH/local.rules

Save and exit the file.

Step 9: Test Snort Configuration

sudo snort -T -c /etc/snort/snort.conf

Step 10: Start Snort

You can start Snort in IDS or IPS mode, depending on your requirements. In IDS mode, Snort will only detect and log intrusions. In IPS mode, Snort will also take action to prevent those intrusions.

To start Snort in IDS mode:

sudo snort -A alert_fast -c /etc/snort/snort.conf -i eth0

Replace "eth0" with the appropriate network interface name.


Congratulations! You have successfully installed Snort, an open-source IDS/IPS, on your Ubuntu 20.04 system. You can now monitor your network traffic for potential threats and intrusions.

Refer A Friend
Get $25

Installing Snort
Snort installation on Ubuntu 20.04
Snort Ubuntu 20.04
Snort installation guide
How to install Snort on Ubuntu 20.04
Ubuntu 20.04 Snort installation
Snort IDS installation on Ubuntu 20.04
Ubuntu 20.04 Snort IDS setup
Snort IDS installation guide
Ubuntu 20.04 Snort IDS installation

Why Customers Love Us

What our customers say about us

Ready To Get Started For Free?

Create your free account today.