When an address is blocked (blacklist) is it possible to redirect to a specific address?
///////////////////////////////////////////////
I tried this solution (do not work):
//////////////////////////////////////////////
Can I redirect a domain to a different domain? # 333
If you want to redirect traffic to www.exampledomain1.com to www.differentdomain.com that is possible. There are a few things you need to do to get this working.
First you need to create 2 files using the touch command:
sudo touch /etc/dnsmasq.d/customRedirect.conf
sudo touch /etc/customRedirect.list
In /etc/dnsmasq.d/customRedirect.conf the following reference (using nano for example) to the other file:
addn-hosts = / etc / customRedirect.list
Next, you can put the actual redirect in /etc/customRedirect.list, in this example these 2 lines: www.exampledomain1.comwww.differentdomain.com exampledomain1.comdifferentdomain.com
This would redirect exampledomain1.com to differentdomain.com. The actual markup is domain / ip address-redirect-from-domain redirect-to-domain
Please note, if the domain is already in the process of being blacklisted, it is going to be duplicated there, run whitelist.sh <domain> so that it is ignored by pi-hole, and is instead picked up by customRedirect.list
Can you give an example of what you want to do? Normally a blacklist blocks a domain and returns NULL, NXDOMAIN, or whatever your blocking mode produces.
Do you want a request for a domain to be directed instead to an IP address other than the normal IP address of that domain?