How to Install Ntopng on Ubuntu 20.04

Updated on November 21, 2023
How to Install Ntopng on Ubuntu 20.04 header image

Introduction

Ntopng is a free, open-source network monitoring tool with a web interface for real-time network traffic monitoring. Ntopng is the latest version of the original Ntop.

Prerequisites

1. Install Ntopng

You must add the official Ntopng repository to install the latest version of Ntopng. The default Ubuntu repository has older versions.

  1. Add the necessary dependencies.

     $ sudo apt install wget gnupg software-properties-common
  2. Download and install the Ntopng repository package.

     $ wget https://packages.ntop.org/apt/20.04/all/apt-ntop.deb
     $ sudo dpkg -i apt-ntop.deb
  3. Update the repository.

     $ sudo apt update
  4. Install Ntopng.

     $ sudo apt install pfring-dkms nprobe ntopng n2disk cento

2. Configure Ntopng

  1. Find your server's network interfaces.

     # ntopng -h

    Ntopng shows your available interfaces at the end of the page.

     Available interfaces (-i <interface index>):
         1. lo
         2. enp1s0
  2. Open the Ntopng configuration file.

     $ sudo nano /etc/ntopng/ntopng.conf
  3. Add these lines to the end of the file. The -i=2 parameter instructs Ntopng to use the second interface, enp1s0. Change 2 to the interface you want to monitor. Leave 3000 as the web server port unless you require a different port.

     # Network adapter name
     -i=2
     # HTTP port of the embedded web server.
     -w=3000    
  4. Restart the ntopng service and set it to run at boot.

     $ sudo systemctl start ntopng
     $ sudo systemctl enable ntopng
  5. If you use a firewall like ufw, open the web server port.

     $ sudo ufw allow 3000

3. Test Ntopng

Navigate to your web interface at port 3000. Substitute your server's IP address in this example:

http://192.0.2.123:3000

Log in as username admin and password admin.

More Information

See the official site for more information.