# Monitoring DNS on your raspberry pi with ntopng

**URL:** <https://discourse.pi-hole.net/t/monitoring-dns-on-your-raspberry-pi-with-ntopng/26997>\
**Category:** Customizing Pi-hole\
**Created:** [January 17, 2020, 10:42am UTC](https://discourse.pi-hole.net/t/monitoring-dns-on-your-raspberry-pi-with-ntopng/26997 "2020-01-17T10:42:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpgpi250](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jpgpi250/32/286_2.png) [@jpgpi250](https://discourse.pi-hole.net/u/jpgpi250)\
**Post date:** [January 17, 2020, 10:42am UTC](https://discourse.pi-hole.net/t/monitoring-dns-on-your-raspberry-pi-with-ntopng/26997/1 "2020-01-17T10:42:07Z")

</div>

Environment:  
Raspbian Buster Lite Version: September 2019 [Release date](https://www.raspberrypi.org/downloads/raspbian/): 2019-09-26  
Pi-hole Version v4.3.2 Web Interface Version v4.3.2 FTL Version v4.3.1  
unbound v1.9.6 ([compiled](https://discourse.pi-hole.net/t/compiling-unbound-from-source-getting-unbound-to-work-with-dns-over-tls/19017/2) from source)  
Installation instructions:

```auto
#!/bin/bash

# http://packages.ntop.org/RaspberryPI/
wget http://packages.ntop.org/RaspberryPI/apt-ntop_1.0.190416-469_all.deb 
sudo dpkg -i apt-ntop_1.0.190416-469_all.deb 
sudo apt-get -y install ntopng nprobe n2n 

sudo service ntopng stop

# activate community edition
file=/etc/systemd/system/ntopng.service
sudo -i sed '/ExecStart=/ s/$/ --community/' $file

file=/etc/ntopng/ntopng.conf
# options @ https://www.ntop.org/guides/ntopng/cli_options.html
sudo cp $file /etc/ntopng/ntopng.org
sudo sed -i '/# -i=eth2/a -i=eth0' $file
# filter syntax @ https://www.tcpdump.org/manpages/pcap-filter.7.html
echo '--packet-filter="port 53"' | sudo tee -a $file

sudo systemctl daemon-reload
sudo service ntopng start

```

**Warning** for [redis (unbound)](https://discourse.pi-hole.net/t/pihole-ftl-unbound-with-cache-db-module-options-redis/24676) users: you'll need an additional configuration setting to force ntopng to use redis database 1 (unbound uses database 0 - this doesn't appear to be configurable)

```auto
echo '--redis="@1"' | sudo tee -a /etc/ntopng/ntopng.conf

```

you may want to use [this method](https://major.io/2014/06/26/install-debian-packages-without-starting-daemons/) (NOT tested) to prevent ntopng from starting immediately after installation, thus using the wrong redis database...

traffic dashboard (http://ip\_of\_pihole:3000/)

 ![image](https://discourse.pi-hole.net/uploads/default/original/2X/6/69f0a9a30288130e843b2bbed30de52edfc8ef1d.png)

active flows (sample)

 ![image](https://discourse.pi-hole.net/uploads/default/original/2X/f/f1792989a2acf7c30b269c001af8eb13cb44d268.png)

intriguing questions (alerts) I need to look into:

 ![image](https://discourse.pi-hole.net/uploads/default/original/2X/3/3c8719da48a564b394d80ace703bd090fdd42dd6.png)

All comments and ideas are welcome to increase the possible diagnostic value of this package.

---

<div class="post-metadata">

**Author:** ![chessyang](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/c/9d8465/32.png) [@chessyang](https://discourse.pi-hole.net/u/chessyang)\
**Post date:** [June 5, 2020, 4:52pm UTC](https://discourse.pi-hole.net/t/monitoring-dns-on-your-raspberry-pi-with-ntopng/26997/2 "2020-06-05T16:52:55Z")

</div>

how do you upate the license file?

---

<div class="post-metadata">

**Author:** ![jpgpi250](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jpgpi250/32/286_2.png) [@jpgpi250](https://discourse.pi-hole.net/u/jpgpi250)\
**Post date:** [June 5, 2020, 6:17pm UTC](https://discourse.pi-hole.net/t/monitoring-dns-on-your-raspberry-pi-with-ntopng/26997/3 "2020-06-05T18:17:33Z")

</div>

The Community version is free to use and opensource (code can be found on [Github](https://github.com/ntop/ntopng)), ref. [here](https://www.ntop.org/products/traffic-analysis/ntop/). Licensing faq [here](https://www.ntop.org/support/faq/search/license).

`edit`  
to activate community editition:

```auto
echo '--community=' | sudo tee -a /etc/ntopng/ntopng.conf

```

and restart the ntopng service.

The method to activate community edition, as described in the original post (modify /etc/systemd/system/ntopng.service) doesn't work (only works if you start ntopng from the command line), but I cannot edit the post anymore...  
`/edit`

---

<div class="post-metadata">

**Author:** ![chessyang](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/c/9d8465/32.png) [@chessyang](https://discourse.pi-hole.net/u/chessyang)\
**Post date:** [June 6, 2020, 2:29am UTC](https://discourse.pi-hole.net/t/monitoring-dns-on-your-raspberry-pi-with-ntopng/26997/4 "2020-06-06T02:29:06Z")

</div>

awsome!!! updated!! thanks!! works great!!
