

Now comes the part where you modify the startup script for ntopng to put whatever argument option you need. "/usr/local/share/ntopng/httpdocs/geoip" is where to put the downloaded database files.
#Pfsense ntopng not showing geolocation update
Unfortunately, there is no pre-built geoipupdate package for FreeBSD, so you will have to download and update the databases manually, or you could lookup some scripts online that automate the process of downloading the databases from MaxMind for you. Refer to this Github Readme on how and why you need to do this.

Next, you need to setup geolocation databases if you want ntopng to report geolocation data. Once installed, go to services menu, then Shellcmd and add entries to start ntopng and redis on system boot.
#Pfsense ntopng not showing geolocation install
Simply head over to system menu, then package manager and install Shellcmd. It is available on pfsense package manager. The way we do this by using a package called Shellcmd. If you decide to install the latest but unstable build, then follow the instructions at (/FreeBSD), but use FreeBSD 12 if you are on pfsense 2.5 or later.Īfter installing ntopng and redis, you need to make them run automatically on boot. To do that, connect to your pfsense using ssh or use the console and open the shell prompt. All you need to do is install ntopng and redis. If you decide to choose the stable build from (), then by default, pfsense uses () so you do not need to add any additional sources. Unfortunately the does not provide a stable build, only a development snapshot (as the time of this writing). mmdb files from MaxMind and place them in the folder "/usr/local/share/ntopng/httpdocs/geoip"Ħ- Edit the startup script of ntopng to add your custom command arguments located in "/usr/local/etc/rc.d/ntopng"ħ- Start redis and ntopng services, or simply reboot pfsense service start redisįirst of all, you need to decide whether you are comfortable using the official but unstable ntopng development build from the original author's package repository (), or otherwise the official stable FreeBSD port maintained by the FreeBSD developer madpilot (), however, the one in FreeBSD repo sometimes gets too behind in development. These are the needed steps in short:ġ- On pfsense 2.5, install ntopng and redis database using the shell pkg install ntopng redisĢ- Enable ntopng and redis services sysrc redis_enable="YES"ģ- Install Shellcmd package from pfsense gui package managerĤ- Add the below entries to Shellcmd settings and save service redis startĥ- Configure ntopng geolocation by downloading the relevant. The better way to integrate ntopng with pfsense is by installing the ntopng package directly from the command line. However, sometimes you are in a circumstance where it is not feasible to have a separate machine, or maybe the firewall box that you are using is powerful enough to add an active network monitoring function to it. Maybe the most optimal way to setup ntopng is to separate it from the firewall and use a dedicated box to record and analyze network traffic by using a port mirror. This all makes it useless to put in production environments. Also in the previous version of pfsense, which had ntopng 3.8, geolocation data was not being reported correctly. In the latest pfsense 2.5 release, they updated ntopng to 4.2 which is great, but it contains a lot of bugs, sometimes ntopng keeps restarting on itself, other times it seems very slow, and I personally faced an issue that whenever an ntopng service restart occurs, all the package's config gets wiped out, so any modifications you make, like interface rename or adding alerts endpoints and recipients gets lost on next service restart.

Unfortunately, the pfsense port of ntopng package which is installed through the gui package manger has been broken for a long time. It is available on pfsense firewall through the builtin package manager. Ntopng is a great tool for diagnosing and monitoring your network.
