In this tutorial, we will show you how to install Ntopng on Ubuntu 14.04. For those of you who didn’t know, Ntopng is a relatively useful tool if you are looking to monitor different network protocols on your servers. It provides a bunch of tools for monitoring various protocols, traffic variants, and yes, bandwidth across multiple time frames. Ntopng is based on libpcap and it has been written in a portable way in order to virtually run on every Unix platform, macOS, and on Win32 as well.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you through the step-by-step installation Ntopng on Ubuntu 14.04.
- A server running one of the following operating systems: Ubuntu 14.04, and any other Debian-based distribution.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Install Ntopng on Ubuntu 14.04
Step 1. First, add Ntopng repo to our repo list.
sudo nano /etc/apt/sources.list.d/ntop.list
Then add this line:
deb http://www.nmon.net/apt-stable/12.04/ x64/ deb http://www.nmon.net/apt-stable/12.04/ all/
Add the key and then run the update:
wget -qO - http://www.nmon.net/apt-stable/ntop.key | sudo apt-key add - sudo apt-get update
Step 2. Install Ntopng and dependencies.
sudo apt-get install libpcap-dev libglib2.0-dev libgeoip-dev redis-server libxml2-dev libnl1 sudo apt-get install ntopng pfring nprobe ntopng-data n2disk nbox
Step 3. Configure Ntopng.
Create a Ntopng configuration file, In this article, we use nano as a text editor. You can use your favorite text editor to create Ntopng configuration files:
sudo nano /etc/ntopng/ntopng.conf
# /etc/ntopng/ntopng.conf # # The configuration file is similar to the command line, with the exception that an equal # sign '=' must be used between key and value. Example: -i=p1p2 or --interface=p1p2 For # options with no value (e.g. -v) the equal is also necessary. Example: "-v=" must be used. # # # -G|--pid-path # Specifies the path where the PID (process ID) is saved. # -G=/var/tmp/ntopng.pid # # -e|--daemon # This parameter causes ntop to become a daemon, i.e. a task which runs in the background # without connection to a specific terminal. To use ntop other than as a casual monitoring # tool, you probably will want to use this option. # -e= # # -i|--interface # Specifies the network interface or collector endpoint to be used by ntopng for network # monitoring. On Unix you can specify both the interface name (e.g. lo) or the numeric # interface id as shown by ntopng -h. On Windows you must use the interface number instead. # Note that you can specify -i multiple times in order to instruct ntopng to create multi‐ # ple interfaces. # -i=1 # # -w|--http-port # Sets the HTTP port of the embedded web server. # -w=3000 # # -m|--local-networks # ntopng determines the ip addresses and netmasks for each active interface. Any traffic on # those networks is considered local. This parameter allows the user to define additional # networks and subnetworks whose traffic is also considered local in ntopng reports. All # other hosts are considered remote. If not specified the default is set to 192.168.1.0/24. # # Commas separate multiple network values. Both netmask and CIDR notation may be used, # even mixed together, for instance "188.8.131.52/24,10.0.0.0/255.0.0.0". # -m=192.168.1.0/24 # # -n|--dns-mode # Sets the DNS address resolution mode: 0 - Decode DNS responses and resolve only local # (-m) numeric IPs 1 - Decode DNS responses and resolve all numeric IPs 2 - Decode DNS # responses and don't resolve numeric IPs 3 - Don't decode DNS responses and don't resolve # -n=1 # # -S|--sticky-hosts # ntopng periodically purges idle hosts. With this option you can modify this behaviour by # telling ntopng not to purge the hosts specified by -S. This parameter requires an argu‐ # ment that can be "all" (Keep all hosts in memory), "local" (Keep only local hosts), # "remote" (Keep only remote hosts), "none" (Flush hosts when idle). # -S= # # -d|--data-dir # Specifies the data directory (it must be writable). Default directory is ./data # -d=/var/tmp/ntopng # # -q|--disable-autologout # Disable web interface logout for inactivity. # -q=
Create ntopng.start file:
sudo nano /etc/ntopng/ntopng.start ##Add this line## --local-networks "192.168.0.0/24" ## give your local IP Ranges here. --interface 1
To see all available interfaces and options, use the
ntopng -h option:
sudo ntopng -h
Step 4. Start Ntopng and Redis server daemon.
sudo service redis-server start sudo service ntopng start
Step 5. Test Ntopng.
Now you can test your Ntopng application by typing
http://your-server-address:3000. You will see the Ntopng login page interface. For the first time, you can use user ‘admin’ and password ‘admin’.
Congratulations! You have successfully installed Ntopng. Thanks for using this tutorial for installing Ntopng server monitoring on Ubuntu 14.04 systems. For additional help or useful information, we recommend you to check the official Ntopng website.