dietpi-config DNS - Adguard issue


I’ve recently installed Adguard and Unbound in two docker containers (network_mode=host). The only thing is that I know with pi-hole we need to input as the DNS in dietpi-config. i’ve done the same with my installation using adguard and unbound however the internet works on every device connected to the IP assigned to the Rpi that runes adguard and unbound BUT not on the raspberry pi. The raspberry pi itself cannot do any ping requests or apt-update or action that require internet connection.

Am I missing something?

if you are using docker compose. please share your docker compose file, as i tried many time to use adguard & unbound on my machine but always struck somewhere as i am newbie for docker system.thanks

Why are you running AdGuard and Unbound on Docker? There is no need at all. Unbound is available as software package on DietPi and AdGuard can be installed quite easily. As well on the server hosting Unbound + AdBlock I would set DNS to a global one and not to Because what happen if Docker or your AdBlock is failing? In this case you will not be able to reinstall or update packages.

Unfortunately, I am not using docker compose, using portainer and then using a stack.

Why docker, because if something fails it’s easier to manage and reinstall while making sure all directories previously used are cleaned.

Would setting a global DNS such as in dietpi-config not defeat the purpose of using adguard and unbound? Would it not need to be (even perhaps add port on which unbound runs on) like when running pi-hole?

Pihole changed the behaviour in meantime and is not forcing anymore.

Well how are you going to reinstall Docker or a container if your local DNS setting is pointing to exactly this container? That’s not gonna work, isn’t it :wink:

And what would be the purpose to use an AdBlock for your DietPi device? There is literally no effect, as your DietPi device is connecting to GitHub or apt repositories only.

Oh I did not know for pi-hole, superb! Thanks :wink:

I thought that the DNS in dietpi-config had to be the one of unbound or localhost to make sure that adguard use unbound and all traffic from the raspberry pi hosting pi hole and unbound go through adguard and unbound :roll_eyes: ?

Nope that’s not how it’s working. You would need to configure your AdBlock software to use unbound as upstream DNS. And unbound will resolve the DNS request at the end.

It’s like this: Client > AdBlock > Unbound > upstream DNS

The local DNS setting in dietp-config is totally independent from this and will effect the DietPi device themselves only :slight_smile: