Whitelisting not working as expected

Expected Behaviour:

I have allow listed various microsoft.com domains, including regex match on microsoft.com, as well as regex + exact matches on various sub domains. I have added them both via the webUI, as well as the CLI. Neither works properly at all for any URL I add to the allow list if it is in an adlist.

PiHole: Latest version (ran an -up)
OS: Ubuntu 20.xx latest version

Actual Behaviour:

Unless I disable the adlist the URI is in, the requests are still getting blocked.

Debug Token:

https://tricorder.pi-hole.net/08qpi98sot

All your clients are assigned to groups 4, 6, 7 (Infrastructure, Servers and DNS).

You have adlists assigned to groups 0, 1, 2, 3 & 7.

All your domain blocks (both whitelist and blacklist entries) are assigned to group 0 only. Since there are no clients in this group, none of these entries have any effect.

1 Like

I think we must have had a misunderstanding of what the "All" group is then, we thought that was a "catch-all" for all devices. What you've said makes complete sense though.

Is there a way to quickly change the group assignment for all allowlist/blocklist entries instead of doing them one by one? We have a lot, and doing them individually will be a pain. We're all SQL experts here so direct queries are fine, but would prefer CLI.

There is no Pi-hole command line entry for this. SQL is the way to go. Here is an example command to assign group ID's. You may need to modify it for your specific needs - the database structure is discussed in the link below:

sqlite3 /etc/pihole/gravity.db "update domainlist_by_group set group_id=1 where domainlist_id=3;"

https://docs.pi-hole.net/database/gravity/

1 Like

Also, what about clients that are not specified in the client list, what bucket do they automatically fall into? I think this is where we got confused, we thought if a device isn't specified, it'll join the "All" group by default, hence why our allow/block lists had only the "All" category selected.

Will give the sql commands a go and report back, thanks for the speedy responses btw!!!

The default group. This is also the group to which new adlists and domains are assigned. You have to manually re-assign any new entries to the desired groups.

There is an option to assign an adlist or domain to "All" groups, but that is a manual action.

Ok, we're on the same page now, this is huge for us, thank you. There should be an option to assign "default groups" to allow/block/ad lists though IMO, so that when they are created, they are automatically assigned to the groups of your choosing, otherwise the manual process is time consuming. I know for MSFT Sql Server a quick hack would be putting a trigger on a table (not ideal, but it would work)...is this possible for the db PH uses?

I don't know, but give it a try and see if it works for you.

Yes.
For an inspiration:

1 Like

UPDATE: Deleting allowList entries to get the page size back to 23 fixed the issue. As soon as there are enough entries to make a 24th page, that column disappears. I can reliably reproduce the issue on my instance, so this appears to be a bug related to the number of allowList entries you can have.

So now I have a new problem: The group selector has disappeared altogether from the allowList form. I'm still fairly new to PiHole, did I flip a switch somewhere or something? This happened after I whitelisted a domain (which coincidentally made the page count go from 23 to 24, not sure if that's relevant or not). Strange eh? How do I fix this?

It is intentionally not displayed in "blacklist" or "whitelist" but in "Group management /domains"

Now I'm just feeling silly, still learning. That's the ticket though, thank you! I think that's it for now, will post a new thread if anything else comes up. Loving this so far, but we really, really need redundancy/failover built in w/ db sync, syncing two instances manually is tedious.

Let me know if you have any issues with Gravity Sync.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.