Redirect dns requests

Many docker images have 8.8.8.8 as DNS resolver preset.

I tried to redirect them to my DNS on the OpenWRT router with Portforwarding but that seems not working.

Any idea how to redirect all access to any destination with port 53 to my router?

Take a look at the DNS hijacking article. This should do what you are requesting. But be aware that if your docker is running on your OpenWrt device, you need to adjust the firewall source zone.

3 Likes

Thanks a lot. The first part does not work for me. It is the same I did.

I may test the other parts.

DNS hijacking needs to be done as a complete set of configs... it's sort of a multi-part process.

If it's not working, feel free to post your configs for review.