Hi,
I´ve set up pi-hole with lighttpd on port 8080 (set in lighttpd.conf and chronometer.sh, but "pihole -c" is not that important).
I´m also running another web application (this is the main use case of the Raspberry Pi) using nginx:
- Port 80 --> only default page, within site strictly forwarded to 443
- Port 443 --> the web application itself
So: What is the desired behaviour of pi-hole when a client/browser acesses a blocked site?
a) It should run into a timeout giving a 404 or similar error code
b) It should show a coaching page of pi-hole which says "This site is blocked by pi-hole. Turn to the admin page to configure your white- and blacklists."
c) ???
What happens for me on this setup is:
- Accessing a site (Port 80) listed on blocklist:
Shows default page of nginx webserver ("Welcome to nginx on Debian!") - Accessing a site (Port 443) listed on default adlists:
certificate warning, because the client/browser is redirected to the webserver on 443, where - of course - a certificate mismatch exists
Random example for experience #2 (443) above: Click on "zum Angebot" of dealer #2 or #3 on https://geizhals.de/818065651
One of those domains is "www.econda-monitor.de":
pi@piserver:~$ sudo cat /etc/pihole/gravity.list | grep econda
192.168.0.10 econda.web.de
192.168.0.10 monitor.econda-monitor.de
192.168.0.10 www.econda-monitor.de
(where 192.168.0.10 is the Raspberry Pi/pi-hole itself)
Depending on the browser it also happens very often when surfing on Amazon. E. g. Internet Explorer (only browser without additional ad blocking extension so perfect for testing) also shows certificate warnings because some loaded ad domains are redirected to the web application running on port 443 next to the pi-hole.
This
- makes surfing really painful,
- puts additional load on the nginx webserver (which now has to deal with all the ad requests),
- of course stuffs the nginx log files and
- also triggers the NoScript Firefox addon notifications for ABE blockings/warnings
In other words: I need to change this, urgently.
==> What can I do to resolve this (major) issue?
==> Ran I into a "failure by design" issue because pi-hole isn´t made for running next to other web services?
==> Is it maybe possible to point the ad requests to a coaching page (see # b) above)? Or at least to a specific port? Or another IP (not 127.0.0.1/localhost) which doesn´t exist?
==> In first it would be helpful to know what the desired behaviour is (see my first bold question above).