Home Assistant Community Add-on: Pi-hole

im assuming you mean static IPs (dhcp reservations) for some of your devices?
What i did was spin up the pihole on HASSIO, then slowly move everythign over, until no clients were on the old pihole instance, then shut it down.

you would want to make sure your rpi has a static IP and is using external DNS as well, if not it will loop back to itself and if the pihole isnt up cause a ton of small funky issues.

the Hosts section of the config is where you would do your static assignments if desired (for example from the docs)

  "hosts": [
{
  "name": "printer.local",
  "ip": "192.168.1.5"
},
{
  "name": "router.local",
  "ip": "192.168.1.1"
},
{
  "name": "router.local",
  "ip": "FE80:0000:0000:0000:0202:B3FF:FE1E:8329"
}

]

Thanks, yes I was meaning static IP reservations: I keep all my network with static IP. I do not have dedicated names, I know all MAC addresses as below
In pihole I use a file which is in /etc/dnsmasq.d/04-pihole-static-dhcp.conf which is full of item as below

dhcp-host=50:E5:49:XX:XXXX,192.168.1.3,CLAUDIO-PC
dhcp-host=B8:AE:EXXXXXX,192.168.1.12,NUC-Eth
dhcp-host=00:15:XXXXXXX,192.168.1.20,Samsung-SCX

How would I achieve the same, or similar with HASSIO pihole?

My NUC-HASSIO has static IP, but using pihole as DNS server, you suggets to put google dns?

Yeah, because my router doesn’t allow me to set Pi-hole as the DNS Server I enabled the DHCP server in Pi-hole, and then set static IPs for most of my devices there.

I don’t fancy setting all of the static IPs again the Hass.io’s Pi-hole, and was hoping I could import my exported settings. I guess not :neutral_face:

Yeah, that’s a pickle for sure

The pihole UI does show the options for one my one statics - but depending on how many devices you have that could take a while

Where and how you assign names?

When i update list of ad-serving domains / blacklist / whitelist I get error:
[✗] Status: Connection Refused
[✗] List download failed: using previously cached list

How to fix this ?

You’ll have to give your Pi a static IP with a DNS of 8.8.8.8 and such. What’s happening is your DHCP reservation for the Pi is giving itself as DNS server which breaks internet for the pi itself. I was in the same situation, the rest of my network worked except for my HASS.IO Pi. So all cloud calls or the pihole updates it was trying was failing.

To set a static Ip you have to take out the SD card and follow the instructions for resinOS.

i set an static ip from my edgerouter.i manage all static ip`s true there. also the pihole cofig is set to google dns so it uses the 8.8.8.8 dns.
do i have to set the stock dns on my router then update and reconfigure it back to the pihole ?

Reserving an IP on your router is not the same as setting a static IP on the device itself. You have to set it on the Pi. See resinOS for more details.

I have an ASUS N66U router. I have it set up to run an Open VPN server, which I can connect remotely. It is configured to use TUN and not TAP interface type - should this be different since my Pi is connected by eth0 to my router? My VPN works fine as a way to connect all my devices on my home LAN. But it doesn’t DNS me through the Pi hole. How come? I’m guessing it has to do with this, but does anyone have experience with my setup? In the pi hole wiki the VPN server are on the same machine as the pi hole. Also; I can’t use the hostnames on the LAN but have to specify the IPs - will this be fixed by using the pi-hole DHCP?

Also; will all of this create a bottleneck for the Rpi3? I mean all LAN devices goes through the pihole (media streaming as well) as well as remote devices through VPN (when I get it working).

1 Like

Your internet traffic isn’t being routed through your Pi. Pi-hole is only managing DNS lookups.

Have this error, I do have Caddy addon, which I think uses port 80

starting version 3.2.4
[services.d] done.
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address in use)
nginx: [emerg] bind() t

So I changed http port to 81. Had to change also port 53 to 54

Niw dnsmasq fails, log finishes as below

11:18.848] Gravity list entries: 124076
[2018-03-01 07:11:18.848] No blacklist present
[2018-03-01 07:11:18.848] No wildcard blocking list present
[2018-03-01 07:11:18.849] Database initialized
[2018-03-01 07:11:18.849] Starting initial log file parsing
[2018-03-01 07:11:18.849] Warning: Reading of rotated log file /var/log/pihole.log.1 failed
[2018-03-01 07:11:18.849] Reading from /var/log/pihole.log (rw-r–r--)
[2018-03-01 07:11:18.849] Finished initial log file parsing
[2018-03-01 07:11:18.849] -> Total DNS queries: 0
[2018-03-01 07:11:18.849] -> Cached DNS queries: 0
[2018-03-01 07:11:18.849] -> Blocked DNS queries: 0
[2018-03-01 07:11:18.849] -> Unknown DNS queries: 0
[2018-03-01 07:11:18.849] -> Unique domains: 0
[2018-03-01 07:11:18.849] -> Unique clients: 0
[[services.d] done.
dnsmasq: started, version 2.78 cachesize 10000
dnsmasq: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth DNSSEC loop-detect inotify
dnsmasq: using nameserver 8.8.4.4#53
dnsmasq: using nameserver 8.8.8.8#53
dnsmasq: read /etc/hosts.list - 0 addresses
dnsmasq: read /etc/pihole/black.list - 0 addresses
dnsmasq: read /etc/pihole/local.list - 2 addresses
dnsmasq: bad name at /etc/pihole/gravity.list line 92531
dnsmasq: bad name at /etc/pihole/gravity.list line 124076
dnsmasq: read /etc/pihole/gravity.list - 124076

Hey guys,

I’m also having problems here. I’ve been using it for a few months now without problems but now I’m getting an error like if there’s something else taking the port 53. I don’t have any other instance of pihole or any DNS server running on my network… could it be something else?

Hass.io Add-on: Pi-hole v0.5.0
Network-wide ad blocking using your Hass.io instance
From: Community Hass.io Add-ons
By: Franck Nijhof [email protected]

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing…
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing…
INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 03-version-requirements.sh: executing…
[cont-init.d] 03-version-requirements.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing…
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] 11-patches.sh: executing…
[cont-init.d] 11-patches.sh: exited 0.
[cont-init.d] 11-pihole.sh: executing…
[cont-init.d] 11-pihole.sh: exited 0.
[cont-init.d] 12-dnsmasq.sh: executing…
[cont-init.d] 12-dnsmasq.sh: exited 0.
[cont-init.d] 13-nginx.sh: executing…
[cont-init.d] 13-nginx.sh: exited 0.
[cont-init.d] 14-password.sh: executing…
[✓] New password set
[cont-init.d] 14-password.sh: exited 0.
[cont-init.d] 15-hostname.sh: executing…
[cont-init.d] 15-hostname.sh: exited 0.
[cont-init.d] 16-logfiles.sh: executing…
[cont-init.d] 16-logfiles.sh: exited 0.
[cont-init.d] 17-hosts.sh: executing…
[cont-init.d] 17-hosts.sh: exited 0.
[cont-init.d] 50-gravity.sh: executing…
[cont-init.d] 50-gravity.sh: exited 0.
[cont-init.d] 99-tests.sh: executing…
dnsmasq: syntax check OK.
[05-Mar-2018 17:02:37] 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
starting version 3.2.4
[services.d] done.
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use
dnsmasq: failed to create listening socket for port 53: Address in use

I also checked my router’s configuration and port assignment, there’s none using or assigned to port 53. And as I said it was working a few days ago

I’m also getting this error.
Just yesterday I upgraded both Hassio and Pi-hole add-on, so not sure what caused it.
Pi-hole works after changing dns port to 54 but my router doesn’t allow custom dns ports …

I’m seeing the same thing. I updated ResinOS.

I see the issue caused by the new ResinOS (OTA 1.2). I will check what happened and get back here asap.

4 Likes

It was indeed caused by dnsmasq being added to the resinOS image in 1.2. It was removed in 1.3, which was just released a couple hours ago.

I can verify that this fixed it for me.

Updating to 1.3 fixes it for me as well.

Correct, I’ve notified @pvizeli about the issue, he fixed the issue promptly and released 1.3. :1st_place_medal:

4 Likes