In this tutorial we will show you how to install and configuration Ntopng on Ubuntu 16.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, MacOSX 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 and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Ntopng on a Ubuntu 16.04 LTS (Xenial Xerus) server.
Install Ntopng on Ubuntu 16.04
Step 1. First, check that the universe repository is enabled by inspecting ‘/etc/apt/sources.list’ with your favourite editor.
If universe is not included then modify the file so that it does:
debhttp://us.archive.ubuntu.com/ubuntu xenial main universe
Step 2. Installing Ntopng.
To install Ntopng, run the following command as your server’s root user:
Step 3. Configure Ntopng.
Create ntopng configuration file, In this article we use nano as text editor. You can use your favorite text editor to create ntopng configuration files:
# 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.
# Specifies the path where the PID (process ID) is saved.
# 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.
# 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.
# Sets the HTTP port of the embedded web server.
# 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 "126.96.36.199/24,10.0.0.0/255.0.0.0".
# 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
# 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).
# Specifies the data directory (it must be writable). Default directory is ./data
# Disable web interface logout for inactivity.
Create ntopng.start file:
##Add this line##
--local-networks"192.168.0.0/24" ## give your local IP Ranges here.
To see all available interfaces and options, use the ntopng -h option:
Start Ntopng server daemon:
Step 4. Test Ntopng.
Now you can test your ntopng application by typing http://yourserver.name:3000. You will see ntopng login page. For the first time, you can use user ‘admin’ and password ‘admin’.
Congratulation’s! You have successfully installed Ntopng. Thanks for using this tutorial for installing Ntopng high speed web-based traffic analysis and flow collection on your Ubuntu 16.04 system. For additional help or useful information, we recommend you to check the official Ntopng web site.