Pihole regex not working

regex

#1

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

Expected Behaviour:

Expect when I add a site like youtube.com and click wildcard that devices will not be able to reach youtube.com or www.youtube.com

Actual Behaviour:

Devices are still able to get to youtube.com and www.youtube.com when regex is added by clicking wildcard. If I add the specific domain and subdomains to blacklist it does work to block them

Debug Token:

4dmj58fhg2


#2

What is the output of these commands?

cat /etc/pihole/regex.list

sudo grep youtube /var/log/pihole.log


#3

pi@raspberrypi:~ $ cat /etc/pihole/regex.list
(^|.)momseveryday.com$
(^|.)spotify.com$
(^|.)hulu.com$
(^|.)musical.ly$
(^|.)netflix.com$
(^|.)thechive.com$
(^|.)nflximg.com$
(^|.)thechivemobile.com.edgesuite.net$
(^|.)huluqa.com$
(^|.)iheart.com$
(^|.)thechivery.com$
(^|.)amazonvideo.com$
(^|.)amazonvideo.com$
(^|.)adultswim.com$
(^|.)hulustream.com$
(^|.)worldstarhiphop.com$
(^|.)huntstand.com$
(^|.)googleusercontent.com$
(^|.)pluto.tv$
(^|.)crackle.com$
(^|.)haystack.tv$
(^|.)dropbox.com$
(^|.)box.com$
(^|.)samsungiotcloud.com$
(^|.)youtube.com$

pi@raspberrypi:~ $ sudo grep youtube /var/log/pihole.log
pi@raspberrypi:~ $


#4

It’s interesting that there were no YouTube entries in the pihole log. Depending where you are in the world, your log might have been freshly rotated.

Please run dig youtube.com, followed by tail -n 30 /var/log/pihole.log and post the lines with the YouTube query results.


#5
pi@raspberrypi:~ $ dig youtube.com

; <<>> DiG 9.10.3-P4-Raspbian <<>> youtube.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33559
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;youtube.com.                   IN      A

;; ANSWER SECTION:
youtube.com.            2       IN      A       0.0.0.0

;; Query time: 2 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Dec 03 21:39:56 EST 2018
;; MSG SIZE  rcvd: 56

pi@raspberrypi:~ $ tail -n30 /var/log/pihole.log
pi@raspberrypi:~ $


#6

This is showing that youtube.com is blocked.

Do you have logging disabled on the Pi-Hole? If not, there should be some content in the pihole.log.

Please upload a new debug log and post the token, the previous one is expired.