Cannot Access pi-hole

Hey everybody! So I finally got hass.io up and running with Samba, SSH, DuckDNS, and Node-Red. However, I seem to be at an impasse with the pi-hole addon. I configured my router to use my raspberry pi, which HA is running on, as its DNS server and forwarded the port 4865. However, everytime I try to actually access pi-hole, I get this error:
Failed Host Check: myduckdns.duckdns.org vs 192.168.x.xxx, 2600:8803:b400:3e:ef3d:9223:3555:4514, hassio.local, pi.hole, localhost, hassio, hassio.local

So I thought maybe my error was the port forwarding, so I disabled the port forward and I get an error that says “This site cannot be reached”

My config for the addon is as follows:

{
“password”: “mypassword”,
“update_lists_on_start”: true,
“admin_port”: 4865,
“dns_port”: 53,
“ssl”: true,
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”,
“interface”: “”,
“ipv6”: true,
“ipv4_address”: “”,
“ipv6_address”: “”,
“virtual_host”: “”,
“hosts”: []
}

My logs look this (this is with the ports forwarded):
[✓] Pulling blocklist source list into range
[i] Target: raw.githubusercontent.com (hosts)
[i] Status: Pending…

[✓] Status: Retrieval successful
[i] Target: mirror1.malwaredomains.com (justdomains)
[i] Status: Pending…

[✓] Status: No changes detected
[i] Target: sysctl.org (hosts)
[i] Status: Pending…

[✓] Status: No changes detected
[i] Target: zeustracker.abuse.ch (blocklist.php?download=domainblocklist)
[i] Status: Pending…

[✓] Status: No changes detected
[i] Target: s3.amazonaws.com (simple_tracking.txt)
[i] Status: Pending…

[✓] Status: No changes detected
[i] Target: s3.amazonaws.com (simple_ad.txt)
[i] Status: Pending…

[✓] Status: No changes detected
[i] Target: hosts-file.net (ad_servers.txt)
[i] Status: Pending…

[✓] Status: No changes detected
[i] Consolidating blocklists…

[✓] Consolidating blocklists
[i] Extracting domains from blocklists…

[✓] Extracting domains from blocklists
[i] Number of domains being pulled in by gravity: 134660
[i] Removing duplicate domains…

[✓] Removing duplicate domains
[i] Number of unique domains trapped in the Event Horizon: 112361
[i] Nothing to whitelist!
[i] Parsing domains into hosts format…

[✓] Parsing domains into hosts format
[i] Cleaning up stray matter…

[✓] Cleaning up stray matter
[✓] DNS service is running
[✓] Pi-hole blocking is Enabled
[cont-init.d] 50-gravity.sh: exited 0.
[cont-init.d] 99-tests.sh: executing…
dnsmasq: syntax check OK.
[30-Mar-2019 19:58:03] NOTICE: configuration file /etc/php7/php-fpm.conf test is successful
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[cont-init.d] 99-tests.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2019-03-30 19:58:03.556 1099] Using log file /var/log/pihole-FTL.log
[2019-03-30 19:58:03.556 1099] ########## FTL started! ##########
[2019-03-30 19:58:03.556 1099] FTL branch: master
[2019-03-30 19:58:03.556 1099] FTL version: v4.2.3
[2019-03-30 19:58:03.556 1099] FTL commit: aae487e-dirty
[2019-03-30 19:58:03.556 1099] FTL date: 2019-02-25 17:18:14 -0800
[2019-03-30 19:58:03.557 1099] FTL user: pihole
[2019-03-30 19:58:03.557 1099] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
[2019-03-30 19:58:03.558 1099] SOCKET_LISTENING: only local
[2019-03-30 19:58:03.558 1099] AAAA_QUERY_ANALYSIS: Show AAAA queries
[2019-03-30 19:58:03.558 1099] MAXDBDAYS: max age for stored queries is 365 days
[2019-03-30 19:58:03.558 1099] RESOLVE_IPV6: Resolve IPv6 addresses
[2019-03-30 19:58:03.558 1099] RESOLVE_IPV4: Resolve IPv4 addresses
[2019-03-30 19:58:03.558 1099] DBINTERVAL: saving to DB file every minute
[2019-03-30 19:58:03.558 1099] DBFILE: Using /etc/pihole/pihole-FTL.db
[2019-03-30 19:58:03.558 1099] MAXLOGAGE: Importing up to 24.0 hours of log data
[2019-03-30 19:58:03.558 1099] PRIVACYLEVEL: Set to 0
[2019-03-30 19:58:03.559 1099] IGNORE_LOCALHOST: Show queries from localhost
[2019-03-30 19:58:03.559 1099] BLOCKINGMODE: Null IPs for blocked domains
[2019-03-30 19:58:03.559 1099] REGEX_DEBUGMODE: Inactive
[2019-03-30 19:58:03.559 1099] ANALYZE_ONLY_A_AND_AAAA: Disabled. Analyzing all queries
[2019-03-30 19:58:03.559 1099] DBIMPORT: Importing history from database
[2019-03-30 19:58:03.559 1099] PIDFILE: Using /var/run/pihole-FTL.pid
[2019-03-30 19:58:03.559 1099] PORTFILE: Using /var/run/pihole-FTL.port
[2019-03-30 19:58:03.559 1099] SOCKETFILE: Using /var/run/pihole/FTL.sock
[2019-03-30 19:58:03.559 1099] WHITELISTFILE: Using /etc/pihole/whitelist.txt
[2019-03-30 19:58:03.560 1099] BLACKLISTFILE: Using /etc/pihole/black.list
[2019-03-30 19:58:03.560 1099] GRAVITYFILE: Using /etc/pihole/gravity.list
[2019-03-30 19:58:03.560 1099] REGEXLISTFILE: Using /etc/pihole/regex.list
[2019-03-30 19:58:03.560 1099] SETUPVARSFILE: Using /etc/pihole/setupVars.conf
[2019-03-30 19:58:03.560 1099] AUDITLISTFILE: Using /etc/pihole/auditlog.list
[2019-03-30 19:58:03.560 1099] Finished config file parsing
[2019-03-30 19:58:03.562 1099] Database successfully initialized
[2019-03-30 19:58:03.563 1099] New forward server: 8.8.4.4 (0/4096)
[2019-03-30 19:58:03.563 1099] New forward server: 8.8.8.8 (1/4096)
[2019-03-30 19:58:03.566 1099] Resizing “/FTL-strings” from 4096 to 8192
[2019-03-30 19:58:03.571 1099] Resizing “/FTL-strings” from 8192 to 12288
[2019-03-30 19:58:03.586 1099] Resizing “/FTL-strings” from 12288 to 16384
[2019-03-30 19:58:03.612 1099] Resizing “/FTL-strings” from 16384 to 20480
[2019-03-30 19:58:03.615 1099] Resizing “/FTL-queries” from 229376 to 458752
[2019-03-30 19:58:03.644 1099] Resizing “/FTL-strings” from 20480 to 24576
[2019-03-30 19:58:03.659 1099] Imported 7054 queries from the long-term database
[2019-03-30 19:58:03.660 1099] -> Total DNS queries: 7054

So it seems like pi-hole itself is working, its just that I cannot access its front end. Any ideas?

Did you fix it? I have pretty much the same issue.
What port should be forwarded to what internal port?
I can connect with lan but not wlan and also not nabu.casa nor duckdns. I added the urls without http or port to the virtual server in pihole config. But no luck so far.

I did not, but if I remember correctly, it was due to my config folder not having a set static ip when I set up my hassio instance. But thinking on it now, that doesn’t really sound right. Sorry I’m no help.

I’m seeing the same issue on 2 instances of Hassio - “Failed Host Check: myhost.com vs 192.168.1.x, fdaa:bbcc:ddee:0:6abb:dc19:8295:9ee6, a0d7b954-pi-hole.local.hass.io, pi.hole, localhost, hassio, hassio.local”

I’m on 0.98.5 and whilst PiHole is running I can’t log onto the Dashboard/Interface. It’s not killing me yet - but it will be a problem if I need to change some of the settings…

Any advice as to how to fix this would be appreciated.

It turns out it did work for me.
I just had to put my nabu casa url in the virtual_host.
But it took a while for it to work… I don’t know why.
I assume it should work with the duckdns url too.

good luck!

{
  "update_lists_on_start": false,
  "ssl": true,
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "interface": "",
  "ipv6": false,
  "ipv4_address": "",
  "ipv6_address": "",
  "virtual_host": "xxxxxxxxx.ui.nabu.casa",
  "hosts": []
}
1 Like

Thanks - This did the trick!

Let me know if you can configure the sensors :wink:
Still getting unknown but tried so many configs… Ty

Here is my config for the pihole sensors. Working after the latest update (4.0.0)

1 Like

I’m not sure what did the trick but I guess it might be the port number.
Anyway, it’s working now thanks to your help! Awesome, thanks!

update: I’ve since moved this from my sensor.yaml to configuration.yaml as described on the pi-hole sensor component page.

###############################################
#                  PI HOLE                    #
###############################################
pi_hole:
  host: 192.168.0.11:4685
  ssl: false
  verify_ssl: false
###############################################
#                  PI HOLE                    #
###############################################
pi_hole:
  host: 192.168.0.11:4685
  ssl: false
  verify_ssl: false

I think the documentation is wrong on the port
I believe it should be 4865

From the Pi-Hole Add-On Page:

1 Like

You are correct, Ill submit a PR and get the docs corrected.

If you find errors like this make a PR to get them fixed. Its quick and easy.

1 Like

Thank so much for the info

I spent my evening trying to troubleshoot this problem due to the doc mixup, I didn’t feel like then figuring out how to edit the docs.

Thanks again!

I need additional help with this.
I get the same error as mentioned above.
BUT
I can access pi-hole if I access it via url = http://ip-address
Although accessing it via domain name like url hassio or url hassio.local
does not work.

I added hassio.local under hosts in the pi-hole configuration,
added it to virtual hosts etc. but nothing works.

Any help would be appreciated.

There is more than one error mentioned above I think.

Are you using the hassio addon? If so you need to specify port 4865.

Sorry, I am referring to the following error -->
Failed Host Check: hassio vs 192.168.1.xxx, , a0d7b954-pi-hole.local.hass.io, pi.hole, localhost, hassio.local, hassio.local.local, hassio.local

I have not defined the port with the IP but it is under the network section in the pi-hole hass.io configuraiton screen.

Actually it is unclear on reading above which of the dyslexic pair 4865/4685 is correct, and I don’t have hassio here. You need to use one or the other though.

I am not sure I understand why changing the port would make a difference.
It works with the IP address as URL but not with the domain name (same port)?
Specifying the Port with the IP I get the same error but now with IP:4865 listed.

This thread is about connecting home-assistant pihole integration. What are you asking for? Accessing the pihole web page?