This is my first post in this community
I have installed pi-hole and I would like to block a website (for instance www.gmx.fr) and redirect to my local IP (192.168.0.XX) (with a 'Website not allowed")
I have tried to do it editing like this
sudo nano /etc/pihole/pihole-FTL.conf
BLOCKINGMODE=NULL
;; QUESTION SECTION:
;gmx.fr. IN ANY
;; ANSWER SECTION:
gmx.fr. 2 IN A 192.168.0.XX
I saved and then restarted : sudo service pihole-FTL restart
That actually, is the response you get when you try to dig gmx.fr
It's not a parameter you can config
What you need to do is to edit /etc/pihole/pihole-FTL.conf from BLOCKINGMODE=NULL to BLOCKINGMODE=IP and that, will return a (custom if needed) page residing on the Pi-hole with information.
Thanks for your response.
So, if my understanding is correct, my /etc/pihole/pihole-FTL.conf file contains only BLOCKINGMODE=IP ?
And then on the blacklist page of pihole, I added: www.gmx.fr ( Exact blocking)
and (^|.)gmx.fr$ (Wildcard)
But I can still access to www.gmx.fr
What am I missing ?
And still, I have this
2019-12-12 18:55:35 A www.gmx.fr 192.168.0.26 Blocked (regex/wildcard) - (0.3ms)
So,it's correctly blocked but I cannot do a redirection. @RamSet