Problems setting up Pi-hole or AdGuard

Ubuntu - Docker - Home assistant

Tried so many ways. Pihole on Docker, Pihole on HA, AdGuard on HA (only because Pi-hole is no longer updated for HA). Would prefer docker, but don’t have skills for debugging.

before update I was able to open pihole admin page, but not run the service. After update it doea not work.

Can not access if installed into docker.

Get error if try with AdGuard

It looks like there are more then one dns services running because afguard cannot bind to Port 53. Are you sure you disabled pihole.

Btw an addon in HA is nothing more then a docker container, so not much difference then doing it from the command line. The only difference is the UI and the integration with HA.

Thank You for Your time!

I had Pihole installed in docker. uninstalled it now. restarted all containers and restarted adguard, but no changes, still same log problem.

EDIT changed the port to 534 instead of 53, and i was able to open UI. no idea if it will cause me problems later…

What next?

what settings to change in my Android phone?

The next thing is to change the DHCP server in your router to point every device to this dns server. Though I think it not being on port 53 might be an issue.

Can you run netstat -l -u on your system to check what is using port 53 and maybe remove that?

I think I’ll start slowly. My wife is a marketing manager, she will not be happy to miss “her” ads.
Need to get familiar with AdGuard first.

My HA IP is
What to put where :grin:

found setup instructions in AdGuard. but I can not insert as no colon sign. when I copied it, it did not work. without the :534 the ads loaded very slowly.

Yeah I think you are on the right track but there is still something running as a DNS server on your Ubuntu which you are using now instead of adguard.

It’s likely your underlying host is already using port 53 for a DNS server. I had to disable it on my Ubuntu server in order for PiHole to start

I’ll try the command tomorrow.
Need to remember how to log in :rofl:

1 Like

probably. found some instructions, but it got complicated, I am affraid to screw up a working system.

I doubt that it is doing anything on port 534, so you may as well switch it off and reset your dhcp setting. I suspect it is slow because it is failing going to you adguard server and then falling back to your router.

1 Like
anti@dev:~$ netstat -l -u
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
udp        0      0 dev:mdns      *
udp        0      0 dev:mdns      *
udp        0      0  *
udp   213504      0  *
udp   213504      0  *
udp   213504      0  *
udp   213504      0  *
udp        0      0  *
udp        0      0  *
udp        0      0 localhost:domain*
udp        0      0 dev:bootpc    *
udp        0      0 *
udp6       0      0 [::]:mdns               [::]:*
udp6       0      0 [::]:35261              [::]:*
udp6       0      0 [::]:534                [::]:*
udp6       0      0 dev:dhcpv6-client       [::]:*

Can not see a :53 here

I just tested this myself and I have the same issue. Also have no other services listening on port 53.
I’ve done some searching and testing and it is the systemd-resolved service which is the problem.

So if you execute this it should work:

sudo systemctl stop systemd-resolved.service
sudo systemctl disable systemd-resolved.service
1 Like

Would that be the same on Debian? I’m running OMV with HA on top and I keep getting the error:

2020/04/15 09:48:20 [info] Starting the DNS proxy server
2020/04/15 09:48:20 [info] Ratelimit is enabled and set to 20 rps
2020/04/15 09:48:20 [info] The server is configured to refuse ANY requests
2020/04/15 09:48:20 [info] DNS cache is enabled
2020/04/15 09:48:20 [info] Creating the UDP server socket
2020/04/15 09:48:20 [fatal] Couldn't start forwarding DNS server, cause: couldn't listen to UDP socket, cause: listen udp bind: address already in use

Presume it’s the same thing? How would I find out whats using it?
(I don’t want to disable it and then lose my OMV frontend or something as this is my first dive into Linux)

This worked for me!

Changed the settings in my phone, and I can see some statistics. Still a ton of ads when browsing.

You can begin with:

sudo systemctl stop systemd-resolved.service

This only stops the service doesn’t disable it so after reboot or starting it by hand it will resume like before. Test if all works after that. If not, stop adguard again to free the port and run:

sudo systemctl start systemd-resolved.service

I don’t know how adguard works. Pihole has a lot of known lists of bad ip’s and ranges to block. Maybe Google that in combination with adguard? :grin:

Btw, can you flag the right post as solution? That helps others to find it faster.

If I stop AdGuard, and then install Pi-hole into docker, will they conflict with the port 53 ?

They shouldn’t as long as you only have one up and running.