Setting Up ntopng On My Laptop To Monitor Network Bandwidth
Contents
Installing ntopng
Install geoipupdate RPM package, create an account at MaxMind and register for an API key, then run sudo geoipupdate
command to install the geoip database files.
Install redis and mariadb-server RPM packages
Compile and install the ntopng and nDPI packages from github.com/ntop
Starting ntopng
$ sudo systemctl start mariadb $ sudo systemctl start redis $ sudo ethtool -K ens9 gro off gso off tso off $ sudo ntopng -i ens9 --packet-filter="not host 192.168.1.198" --dns-mode=1 -F "mysql;localhost;ntopng;ntopng_table;ntopng;ntopng" Replace ens9 and 192.168.1.198 with the name and address of the local interface.
Connect to http://localhost:3000
Default id/psw are provided in the UI
Resetting ntopng password
$ sudo redis-cli del ntopng.user.admin.password
Restart ntopng
Password will revert to default: admin
Deleting ntopng data
$ sudo rm -fr /var/lib/ntopng $ mysql -u notopng -p ntopng > drop table flowsv4, flowsv6; > quit;
Can also delete data from redis, which will clear settings and passwords as well:
$ sudo redis-cli keys "ntopng.*" | xargs sudo redis-cli del $ sudo redis-cli keys "ntonpng.*" | xargs sudo redis-cli del
Notes
After first installing ntopng, or after deleting data, the six category list files defined by default will not exist. Error's will appear in the console log to that effect. These tables can be loaded (updated) manually from the Category Lists menu in the UI or they will get updated automatically as ntopng runs.