Feedback for "Allow defining clients by their MAC address, host name and networking interface"

You can select a block of text, then apply the format tool </> from the top of the reply window. This will format the block of text as "preformatted text" and remove URLs, put in a monospace font, allow scrolling, etc.

Read carefully :wink:

10.4.0.99 vs. 10.0.4.64/26

Hi fjb,
just did that on my iPad, but maybe to thik fingers :wink:

Formatting on an iPad is tougher than on a desktop. Icons are smaller, harder to select a block, etc.

Did you checkout the web as well?

pihole checkout web new/mac_client

Hi man,
need new glasses also... ;-(
I have seen an other typo in the /27 definition.

Thanks for the hint !

Yes, just did the web checkout also, only pihole is on master.
As you described it at the beginning of the thread.

The circle is running all time long

Have you tried restarting pihole-FTL? Do you see any errors in /var/log/pihole-FTL.log?

No, there are no error in the ftl.log
But in the lighttpd error.log i have the following:


2020-06-05 21:53:34: (mod_fastcgi.c.421) FastCGI-stderr: PHP Notice:  Undefined index: PORTFILE in /var/www/html/admin/scripts/pi-hole/php/FTL.php on line 39
2020-06-05 21:53:34: (mod_fastcgi.c.421) FastCGI-stderr: PHP Warning:  file_get_contents(): Filename cannot be empty in /var/www/html/admin/scripts/pi-hole/php/FTL.php on line 39
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr: Array
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr: (
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:     [default-light] => Array
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:         (
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:             [0] => Pi-hole default theme (light, default)
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:             [1] => 
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:             [2] => default-light
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:             [3] => minimal
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:             [4] => blue
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:         )
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:     [default-dark] => Array
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:         (
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:             [0] => Pi-hole midnight theme (dark)
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:             [1] => 1
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:             [2] => default-dark
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:             [3] => polaris
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:             [4] => polaris
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:         )
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:     [default-dark2] => Array
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:         (
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:             [0] => Pi-hole afternoon theme (dark)
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:             [1] => 1
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:             [2] => default-dark
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:             [3] => futurico
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:             [4] => futurico
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr:         )
2020-06-05 21:53:35: (mod_fastcgi.c.421) FastCGI-stderr: )

Will do a restart and report

After reboot the same (pihole restartdns)
Checked the version


pihole -v
  Pi-hole version is v5.0 (Latest: v5.0)
  AdminLTE version is new/mac_clients v5.0-132-geb3c672 (Latest: v5.0)
  FTL version is new/mac_clients vDev-843c4ab (Latest: v5.0)

Please try force-refreshing your browser’s cache (typically achieved by Ctrl+F5), not sure how to do it on an iPad.

I've seen that error before and Promo pushed an fix for this already some time ago.

I will check how to on iPad and come back

Sure, the flush for the spinner, not the error log message.

Hi DL6ER,

that worked! so easy, when doing it right...
Another question, where can I find the message table in the GUI?
The function you added to show duplicate entries.

just to share if for interest:

iPad Safari Chache löschen
Nur den Cache leeren

  1. Gehen Sie zu den Einstellungen.
  2. WĂ€hlen Sie „Safari“.
  3. Tippen Sie auf „Erweitert“.
  4. WĂ€hlen Sie „Website-Daten“.
  5. Tippen Sie auf „Alle Website-Daten entfernen“.

Tools -> Pi-hole diagnostics.

I just merged the most recent development changes into the web branch, you may have to update.

You are amasing !
Thank you guys for your help.
You are doing a realy great job

greats
Markus

2 Likes

Hi folks,

I checked my FTL.log this morning and I am wondering about the following.
The client 10.4.0.4 has connect this morning the first time after I gave him an static lease within dhcp with a different ip.
I changed my Groupconfig so the new ip is set to group 0.
These config changes did I yesterday, so everything was in place when the client connects.

Now I saw that the regex whitelist entry (I only have one) is not enabled for that client, although it is for group 0.
The selects for the regex entries are missing.

I put the log of another client with group 0 to show the difference concerning the regex entry.

Another difference, for me is the 10.0.1.62 was init at startup while the 10.4.0.4 established a new connection due runtime. Maybe this helps to get the code position evaluated.

Other Client


[2020-06-06 01:17:16.988 8378] Reloading clinet groups after 8201 seconds
[2020-06-06 01:17:16.988 8378] Finalizing gravity statements for 10.0.1.62
[2020-06-06 01:17:16.988 8378] Initializing gravity statements for 10.0.1.62
[2020-06-06 01:17:16.988 8378] Querying gravity database for client with IP 10.0.1.62...
[2020-06-06 01:17:16.989 8378] SQL: Comparing 10.0.1.62 vs. 10.4.0.0/24 (subnet 255.255.255.0) - NO MATCH
[2020-06-06 01:17:16.989 8378] SQL: Comparing 10.0.1.62 vs. 10.4.0.3 (subnet 255.255.255.255) - NO MATCH
[2020-06-06 01:17:16.989 8378] SQL: Comparing 10.0.1.62 vs. 10.4.0.4 (subnet 255.255.255.255) - NO MATCH
[2020-06-06 01:17:16.989 8378] --> No record for 10.0.1.62 in the client table
[2020-06-06 01:17:16.990 8378] gravityDB_open(): Preparing vw_whitelist statement for client 10.0.1.62
[2020-06-06 01:17:16.990 8378] get_client_querystr: SELECT EXISTS(SELECT domain from vw_whitelist WHERE domain = ? AND group_id IN (0));
[2020-06-06 01:17:16.990 8378] gravityDB_open(): Preparing vw_gravity statement for client 10.0.1.62
[2020-06-06 01:17:16.990 8378] get_client_querystr: SELECT EXISTS(SELECT domain from vw_gravity WHERE domain = ? AND group_id IN (0));
[2020-06-06 01:17:16.991 8378] gravityDB_open(): Preparing vw_blacklist statement for client 10.0.1.62
[2020-06-06 01:17:16.991 8378] get_client_querystr: SELECT EXISTS(SELECT domain from vw_blacklist WHERE domain = ? AND group_id IN (0));
[2020-06-06 01:17:16.992 8378] Regex blacklist: Querying groups for client 10.0.1.62: "SELECT id from vw_regex_blacklist WHERE group_id IN (0);"
[2020-06-06 01:17:16.993 8378] Regex whitelist: Querying groups for client 10.0.1.62: "SELECT id from vw_regex_whitelist WHERE group_id IN (0);"
[2020-06-06 01:17:16.993 8378] Regex whitelist: Enabling regex with DB ID 255 for client 10.0.1.62

And the log snip for the 10.4.0.4


[2020-06-06 01:54:02.577 8378] Initializing gravity statements for 10.4.0.4
[2020-06-06 01:54:02.577 8378] Querying gravity database for client with IP 10.4.0.4...
[2020-06-06 01:54:02.578 8378] SQL: Comparing 10.4.0.4 vs. 10.4.0.0/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-06 01:54:02.578 8378] SQL: Comparing 10.4.0.4 vs. 10.4.0.0/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-06 01:54:02.578 8378] SQL: Comparing 10.4.0.4 vs. 10.4.0.3 (subnet 255.255.255.255) - NO MATCH
[2020-06-06 01:54:02.578 8378] SQL: Comparing 10.4.0.4 vs. 10.4.0.4 (subnet 255.255.255.255) - !! MATCH !!
[2020-06-06 01:54:02.578 8378] SQL: Comparing 10.4.0.4 vs. 10.4.0.4 (subnet 255.255.255.255) - !! MATCH !!
[2020-06-06 01:54:02.578 8378] SQL: Comparing 10.4.0.4 vs. 10.4.0.4 (subnet 255.255.255.255) - !! MATCH !!
[2020-06-06 01:54:02.579 8378] --> Found record for 10.4.0.4 in the client (ID 26)
[2020-06-06 01:54:02.579 8378] Querying gravity database for client 10.4.0.4 (getting groups)
[2020-06-06 01:54:02.579 8378] Gravity database: Client 10.4.0.4 found. Using groups [0].
[2020-06-06 01:54:02.579 8378] gravityDB_open(): Preparing vw_whitelist statement for client 10.4.0.4
[2020-06-06 01:54:02.579 8378] get_client_querystr: SELECT EXISTS(SELECT domain from vw_whitelist WHERE domain = ? AND group_id IN (0));
[2020-06-06 01:54:02.580 8378] gravityDB_open(): Preparing vw_gravity statement for client 10.4.0.4
[2020-06-06 01:54:02.580 8378] get_client_querystr: SELECT EXISTS(SELECT domain from vw_gravity WHERE domain = ? AND group_id IN (0));
[2020-06-06 01:54:02.580 8378] gravityDB_open(): Preparing vw_blacklist statement for client 10.4.0.4
[2020-06-06 01:54:02.580 8378] get_client_querystr: SELECT EXISTS(SELECT domain from vw_blacklist WHERE domain = ? AND group_id IN (0));
[2020-06-06 01:54:02.581 8378] domain_in_list("wbs02-ws.withings.net", 0xd781f0, whitelist): 0
[2020-06-06 01:54:02.581 8378] Regex whitelist (DB ID 255) "(\.|^)diehl\.com$" NOT ENABLED for client 10.4.0.4
[2020-06-06 01:54:02.581 8378] domain_in_list("wbs02-ws.withings.net", 0xca3460, blacklist): 0
[2020-06-06 01:54:02.582 8378] domain_in_list("wbs02-ws.withings.net", 0xd78930, gravity): 0
[2020-06-06 01:54:02.582 8378] **** forwarded wbs02-ws.withings.net to 127.0.0.1 (ID 6740, /root/project/src/dnsmasq/forward.c:549)

Hi,
I just played around a little bit and changed my group definition.
And after the reinit with


[2020-06-06 10:06:20.221 8378] Received: Real-time signal 0 (34 -> 0)

the regex is enabled


[2020-06-06 10:06:20.553 8378] Querying gravity database for client with IP 10.4.0.4...
[2020-06-06 10:06:20.553 8378] SQL: Comparing 10.4.0.4 vs. 10.4.0.0/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-06 10:06:20.553 8378] SQL: Comparing 10.4.0.4 vs. 10.4.0.0/24 (subnet 255.255.255.0) - !! MATCH !!
[2020-06-06 10:06:20.553 8378] SQL: Comparing 10.4.0.4 vs. 10.4.0.0/28 (subnet 255.255.255.240) - !! MATCH !!
[2020-06-06 10:06:20.553 8378] SQL: Comparing 10.4.0.4 vs. 10.4.0.0/28 (subnet 255.255.255.240) - !! MATCH !!
[2020-06-06 10:06:20.554 8378] SQL: Comparing 10.4.0.4 vs. 10.4.0.0/28 (subnet 255.255.255.240) - !! MATCH !!
[2020-06-06 10:06:20.554 8378] --> Found record for 10.4.0.4 in the client (ID 27)
[2020-06-06 10:06:20.554 8378] Querying gravity database for client 10.4.0.4 (getting groups)
[2020-06-06 10:06:20.554 8378] Gravity database: Client 10.4.0.4 found. Using groups [0].
[2020-06-06 10:06:20.554 8378] Regex blacklist: Querying groups for client 10.4.0.4: "SELECT id from vw_regex_blacklist WHERE group_id IN (0);"
[2020-06-06 10:06:20.554 8378] Regex whitelist: Querying groups for client 10.4.0.4: "SELECT id from vw_regex_whitelist WHERE group_id IN (0);"
[2020-06-06 10:06:20.554 8378] Regex whitelist: Enabling regex with DB ID 255 for client 10.4.0.4

So it looks to me like there is the difference in the code (when a new client connects at runtime the regex is not evaluated)

Further I checked the group membership re-checking function DL6ER implemented. When I understand it right then there should have been a reload for the client at around 01:57.
But I don‘t see an reload for 10.4.0.4 in the log.
I paste the whole output:


pi@dns-pi:~ $ grep Reloading /var/log/pihole-FTL.log -A3
[2020-06-06 00:03:50.561 8378] Reloading clinet groups after 3795 seconds
[2020-06-06 00:03:50.561 8378] Finalizing gravity statements for 10.0.1.254
[2020-06-06 00:03:50.561 8378] Initializing gravity statements for 10.0.1.254
[2020-06-06 00:03:50.561 8378] Querying gravity database for client with IP 10.0.1.254...
--
[2020-06-06 00:18:28.916 8378] Reloading clinet groups after 4673 seconds
[2020-06-06 00:18:28.916 8378] Finalizing gravity statements for 10.0.0.112
[2020-06-06 00:18:28.917 8378] Initializing gravity statements for 10.0.0.112
[2020-06-06 00:18:28.917 8378] Querying gravity database for client with IP 10.0.0.112...
--
[2020-06-06 00:23:04.425 8378] Reloading clinet groups after 4949 seconds
[2020-06-06 00:23:04.425 8378] Finalizing gravity statements for 10.0.0.177
[2020-06-06 00:23:04.426 8378] Initializing gravity statements for 10.0.0.177
[2020-06-06 00:23:04.426 8378] Querying gravity database for client with IP 10.0.0.177...
--
[2020-06-06 00:30:58.534 8378] Reloading clinet groups after 5423 seconds
[2020-06-06 00:30:58.535 8378] Finalizing gravity statements for 10.0.0.236
[2020-06-06 00:30:58.535 8378] Initializing gravity statements for 10.0.0.236
[2020-06-06 00:30:58.535 8378] Querying gravity database for client with IP 10.0.0.236...
--
[2020-06-06 00:42:09.823 8378] Reloading clinet groups after 6094 seconds
[2020-06-06 00:42:09.823 8378] Finalizing gravity statements for 10.0.0.234
[2020-06-06 00:42:09.823 8378] Initializing gravity statements for 10.0.0.234
[2020-06-06 00:42:09.823 8378] Querying gravity database for client with IP 10.0.0.234...
--
[2020-06-06 01:17:16.988 8378] Reloading clinet groups after 8201 seconds
[2020-06-06 01:17:16.988 8378] Finalizing gravity statements for 10.0.1.62
[2020-06-06 01:17:16.988 8378] Initializing gravity statements for 10.0.1.62
[2020-06-06 01:17:16.988 8378] Querying gravity database for client with IP 10.0.1.62...