Blocklist not working with devices

Please follow the below template, it will help us to help you!

Hi,
trying to get a porn blocklist to work. It sometimes works but most of the times my devices can access the porn pages even if they are found in the blocker.

Expected Behaviour:

So for example if I browse to: youporn.com it should be blocked by pihole but it's not.
AD-blocking is working fine.
Running command: pihole -q -adlist youporn.com
Will result in:

   animalyouporn.com
   doyouporn.com
   freehdyouporn.com
   gratisyouporn.com
   hq-youporn.com
   justyouporn.com
   sexeyouporn.com
   uyouporn.com
   xxx-youporn.com
   youporn.com
   youporn.com.bz
   youporn.com.es
   zooyouporn.com

Actual Behaviour:

Page is shown

Debug Token:

0jt910j9m1

What am I doing wrong?

Thanks.

-Toube

Why don't you add a regex for porn ?
That will match everything that has that word in the domain name ...

Here's some basic guide about RegEx:

1 Like

You are likely accession www.youporn.com, which is a different domain than youporn.com and is not in your blocklists.

Check your query log and /var/log/pihole.log for details.

Thanks i will have to look in to regexp.
Though there are so many words you would need to include.. any ready lists for porn words?

-Toube

Thanks I will check the logs.
Seems the block works if I use the words youporn.com or www.youporn.com but if I just search youporn and click on link that google provides and that goes to the https address and then the block will not work..

Does the block only work for http and not for https?

-Toube

Look carefully at the domain that serves that link. It is likely a different domain.

Thanks you are right.. I don't see the point in having blockage lists that don't block all the domains inluding www. , well it probably would take a lot of work and I'm guessing most of ready Dns providers like openDns uses keywords in their filters.
So I will have to do some googleing for famous know porn words and add them as expression blocks. Was there a way to edit the block list using terminal? I really like the block page.. it would be great to somehow redirect it the pihole blockpage when the user clicked on a link that was found in the keywords with http or https?

Is there a way to show the custom blockpage for a blocked keyword.. if the page opened is https?

Thank.

-Toube

You won't be editing the block list. You will be editing the regex list, and you will need to have a proper regex to put in there. It is easier to let Pi-Hole convert your wildcard entry for you and put it in regex. All you have to do is go to Admin GUI > Blacklist and then type in the key word you want to block as a wildcard. It will appear on the regex list. Example:

And it appears in the Regex & Wildcard blocking section:

There is an option to enable a block page for Pi-Hole, but it only works on http pages since it won't have the certificate for https pages.

2 Likes

Thanks @jfb,
Would there be a possibility check if the regexp keyword matches and then show custom blockpage even if it was https or https?

I'm currently using the IP mode when blocking pages.
Would it be a big job to add the regexp keywords as param for custom blockpage.. if a user goes to a url with and that regexp is found show custom block page?

Regards,
Toube

Just added a regex keyword for porn.
Then I try to open page www.youporn.com with a windows machine the it opens the page.
The query log s says it was blocked for that machine..?

It is likely there is another DNS available to that client. If Pi-Hole blocked it, then the client should not have the IP.

If Pi-Hole blocks the request, and you have a blocking page enabled, and the page is an http page, then the block page will be displayed. If any of those are not true, then no block page.

The block page does not show why the request was blocked (via gravity, regex, etc.).

You can enable a debug mode in Pi-Hole that will make an entry in /var/log/pihole-FTL.log when a regex is triggered for the first time.

Set DEBUG_REGEX=true per this section of the documentation:

Hi @jfb,
Okay so now it seems to be working using regex and adding word "porn" stops sites and a log entry of regexp is created in the query log, so it works as it should be working.. I think the regexp is the way to go when blocking porn sites because regexp does not care if the url is in format www.porn.com or in plain porn.com format it will block it regardlessly correct?

@jfb,
how does the regexp work in the background? Would it be hard to show the piholes own block page if a regexp is triggered? This would then not care if it would be http or https url?

Thanks for you support.
-Toube

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