Many devices have multiple addresses (e.g., IPv4 and IPv6) and we've been asked often if they can be grouped together in the statistics. Well, grouping them has a number of drawbacks (discussed elsewhere), but I think I found a way how to achieve what everyone wants without having to rip apart everything inside FTL.
Here, I introduce super clients. Super-clients are (in some way) ordinary clients but are only virtual. They appear everywhere on the dashboard just like the other clients, but they don't really exist (physically). They never ask the DNS server any questions but they represent a number of other devices which do.
Super clients are identified by their MAC address, whereas ordinary clients are defined by their IP addresses. This allows them to represent a number of other devices (which all share the same property: The same MAC address).
IMPORTANT INFORMATION
Most of the content below is obsolete by now. Check below for the updated superclient
definition.
Let me give an example of what I have in mind:
In this example, we have the following "clients" (in the sense of IP addresses):
ID | IP address | MAC address (simplified) | host name | total queries | blocked queries |
---|---|---|---|---|---|
0 | 192.168.1.25 | AA | linux-box-1 | 111 | 34 |
1 | fe80::ca9c:1203:5365:010a | AA | some-very-long-name-isp.com | 200 | 44 |
2 | 2a02:3443:3307:5968::1 | AA | other-very-long-name.isp.com | 968 | 455 |
3 | 192.168.1.22 | BB | linux-box-2 | 134 | 22 |
4 | 192.168.1.20 | CC | android-phone | 334 | 23 |
We define a super-client like
ID | MAC address (simplified) | host name |
---|---|---|
0 | AA | linux-box-1 |
The super-client will take over all the MAC address AA
clients, so the output on the dashboard would look like
ID | IP address | MAC address (simplified) | host name | total queries | blocked queries |
---|---|---|---|---|---|
-- | --- | AA | linux-box-1 | 1279 | 533 |
3 | 192.168.1.22 | BB | linux-box-2 | 134 | 22 |
4 | 192.168.1.20 | CC | android-phone | 334 | 23 |
Now we come to the part where you can try what we already have. Note that there is not user-interface, currently, but I will give an example of how to easily configure this, nonetheless.
-
Checking out the FTL branch
pihole checkout ftl new/super-clients
-
You will get a new table
superclient
in/etc/pihole/pihole-FTL.db
. -
Add your super clients identified by their MAC addresses like this:sudo sqlite3 /etc/pihole/pihole-FTL.db "INSERT INTO superclient (hwaddr,name) VALUES ('d0:50:99:33:78:33','desktop-machine');"
-
Finally, runpihole restartdns
to have FTL import your new super client(s).See my post below for updated instructions.
The effect will be immediate and the super-client should directly become visible on the dashboard (even when other host names are still unknown):
The new super-client (desktop-machine
) summarizes three ordinary clients, all on the same hardware interface. You will notice that the link to the selective Query Log now contains a MAC address rather than an IP address to ensure you will still get all the queries from the three clients (as in identified by three individual IP addresses).
Everything should work just out of the box. I'm waiting for your feedback. Note that this is only a half-an-hour attempt at this new feature, there may very well be a lot of room for improvements.