Solving problems invented by others...
Using ntopng for Realtime Traffic Analysis on Fritz!Box Routers

Using ntopng for Realtime Traffic Analysis on Fritz!Box Routers

Today I had some trouble getting ntopng up and running on my Raspberry Pi Bullseye in order to monitor the traffic on my Fritz!Box Router. Therefore I wanted to make some quick notes what the problems were and how I solved it.

 

Installation

I followed the official guide to install ntopng as described here:
https://packages.ntop.org

After the installation I copied the source code of the fritzdump.sh script to my Raspberry Pi.
https://github.com/ntop/ntopng/blob/dev/tools/fritzdump.sh

1. Problem: Port already in use

The first try to run the script resulted in the error that the tcp port 3000 is already in use.
This was because the installation of ntopng created a systemd service which already runs and blocks tcp port 3000.
To solve this I stopped the service and disabled it.

systemctl stop ntopng.service
systemctl disable ntopng.service

2. Problem: IPv6 results in segmentation fault

The second try to run the script resulted in the error message “segmentation fault”. Since I found nothing really helpful I changed the variable FRITZIP in the script to use the IPv4 address instead the URL of the Fritz!Box.

I changed this line:

FRITZIP=http://fritz.box

to:

FRITZIP=http://<ipv4-address-of-my-fritzbox>

Then the error was gone and the script was working.

3. Last issue: Remove the license warning

A rather minor warning message who bugged me was that ntopng search for a license and, if not found, presents a message saying that it will run in Enterprise mode for a small amount of time.
This could be prevented by adding “–community” to the parameters when executing ntopng.

Therefore I changed the last line of the script from:

wget --no-check-certificate -qO- $FRITZIP/cgi-bin/capture_notimeout?ifaceorminor=$IFACE\&snaplen=\&capture=Start\&sid=$SID | ntopng -i -

to:

wget --no-check-certificate -qO- $FRITZIP/cgi-bin/capture_notimeout?ifaceorminor=$IFACE\&snaplen=\&capture=Start\&sid=$SID | ntopng --community -i -

This starts ntopng always in community mode and removed the license warnings.

Leave a Reply

Your email address will not be published.

− one = one