Local DNS name -> Can't access /pihole (is blocked)

Hi all,

my setup is PiHole on a RPi3, forwarding requests to Unbound which defines a local
-zone "raspi.home". It works fine so far. I have Apache running and there defined a VirtualHost for raspi.home. While raspi.home/admin is working fine, raspi.home/pihole does not work. I do not user Lighttpd so far.

Expected Behaviour:

Expected behaviour would be that under raspi.home/pihole, I see the pi.hole default site as it is the case when I open 192.168.178.xx/pihole

Actual Behaviour:

I see the message:

Access to the following website has been denied:
raspi.home
This is primarily due to being flagged as:
Not found on any Blacklist

Question:

Can anyone tell me what I have to do to be able to get the pihole page under raspi.home domain (I'm not talking about the admin page, but /pihole)?

Best regards

Stefan

I think the problem is not the Apache configuration but PiHole resp. dnsmasq. There must be a setting or file where you can specify which domains or local urls are considered "safe" to be used for accessing the /pihole subfolder, as it is with the IP itself...

What I do not understand is why I can access the PiHole block page via 192.168.178.20/pihole, but not via raspi.home/pihole. raspi.home resolves locally to 192.168.178.20, but PiHole does not show the block page, but the error page mentioned above? So can you explain this to me?

What "pihole page" are you trying to access? The only page under /pihole is the block page. In certain cases, it will detect that you might be trying to go to the admin page and it will show a redirect screen, but that is the exception.

No i'm talking about the block page. Admin page works fine...

If I understood it correctly, then:

  • the whole PiHole functionality lies in the functionality of the local domain pi.hole
  • without that entry, it would not work
  • traffic to be blocked is redirected by the integrated dnsmasq to the block page under pi.hole
  • access to that page is only possible via IP (as a side effect) and the pi.hole alias

So far correct?

pi.hole is just a nice hostname to use that is consistent across installs, there isn't much special about it besides that going to http://pi.hole will redirect to http://pi.hole/admin.

Depending on the blocking mode, blocked domains will be redirected. This is only the case for the IP-based blcoking modes. The current default is NULL based, which does not redirect to Pi-hole. Blocking mode - Pi-hole documentation

You should only access the web interface over pi.hole, your hostname, or your IP address. Other domains are considered to be redirected blocked domains.

Is it normal that by default pi.hole/pihole redirects to pi.hole/admin? How is this done, a redirect in the index.php or via a rule in lighttp?

Due to the block page being loaded when you go to that URL, and also /, it will be activated (but that's not the intended use case):

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