Update: What to do if port 53 is already in use

This is an update to this Post
When the Port 53 is already in Use, you can check this with this command (ubuntu):

Port 53 is being used at your host machine, that's why you can not bind 53 to host.

To find what is using port 53 you can do: sudo lsof -i -P -n | grep LISTEN

I'm a 99.9% sure that systemd-resolved is what is listening to port 53.

To solve that you need to edit the /etc/systemd/resolved.conf and uncomment DNSStubListener and change it to no, so it looks like this: DNSStubListener=no

After that reboot your system or restart the service with service systemd-resolved restart

For a specific time I also used #5353 as described here in th kuketz-blog.

The port is setup here
sudo nano /etc/unbound/unbound.conf.d/pi-hole.conf
and in the pihole admin view.

I don't know if this is a typo in this docu but it worked properly in my case.

We do not recommend 5353 for unbound anymore because the port is used by mDNS

You can use any other unused port. In our guide we've choosen 5335.

1 Like