Running ntopng in Unifi OS 2.4.27 on a UDM Pro

ntopng is a browser-based network traffic analysis tool that can be used to explore the data flows in a network. It’s simple enough to use in a home network and powerful enough for a small to medium-sized business. The heart of my home network is a router/firewall device called a Unifi Dream Machine Pro or UDM, from a company called Ubiquiti. Because all of my network traffic flows through this device, I want ntopng running on that device where it can see everything.

The UDM is a purpose-built hardware router/firewall device that runs Debian Linux. The operating system is accessible using SSH. In the past, I was able to create a Docker container for ntopng and deploy that onto the UDM under podman. This was the way that the UDM ran all its apps, even the proprietary ones from Ubiquity itself that are the actual value-add of this device. From its Docker container ntopng could see and analyze all of the network traffic flowing through the UDM.

Just recently Ubiquity distributed a major software update for the UDM, Unifi OS 2.4.27. This update deployed a much more capable version of the Debian Linux OS. Docker containers were gone. Everything now runs natively in the OS. It’s still possible to reinstall podman into the OS to run containers on the UDM and that’s how some folks are dealing with this update, reinstalling their hacks in their existing Docker containers running under podman. I decided to go the new way, to deploy my hacks in my own Debian packages to run natively on the OS, the same way that Ubiquiti is doing it for their own software.

The ntopng developer’s Github repository includes the code necessary to build a Debian package for the app. The developers do not, however, build a package for Android-based systems like the UDM. Besides, the UDM has a few quirks in its filesystem architecture that affect the way that it persists information between boots and software updates that make it different from a normal computer. Software installed on the UDM needs to take these quirks into account. I was able to take the developer’s Github content and tweak it to build my own UDM-specific packages for ntopng and put them in my own PPA repository. Now I can install ntopng on my UDM using a single apt command.

I have automated the building of the ntopng package from its Github repository so that it produces a new package every week containing the current development branch of the code and puts that into my PPA repository. I also build the stable releases that come out one to three times a year and put those in the “stable” channel of my repository. If any of this is of interest to you, information on installing ntopng using my packages is on this page. The packages are meant to be generalized so that anyone can use them on any UDM. The script that I use to build these packages is available in Github.

dlk

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.