How to set Unbound as custom DNS server

I’m trying to install Unbound and Pihole on a separate computer connected directly to my router. I want to route all my DNS requests to this device. For Unbound to work properly I need to set my DNS name server to Unbound but I can’t seem to figure out where to do it at (I’ve tried a few diffident places but none of them seem to take).

Can anyone tell me where to set a custom DNS server at for Unbound?

Also, will having DNSmasq enabled on my router cause any issues with this Unbound setup?

https://openwrt.org/docs/guide-user/base-system/dhcp_configuration#dhcp_options option 6.

Keeping dnsmasq running on Openwrt isn't an issue.

We can't help you getting pi-hole and unbound running on a 3rd party OS.

It looks that the UCI add didn’t work. Would it be easier to just run unbound through my router and deal with the Pihole separately?

Why do you want unbound? Perhaps set up one thing at a time, and start with a working Pi-hole setup?

Sorry, we can't help you with "didn't work".

Sorry, I ran:

uci add_list dhcp.lan.dhcp_option=“6,[my IP address]”
uci commit dhcp
service dnsmasq restart

Response:

udhcpc: started, v1.36.1
udhcpc: broadcasting discover
udhcpc: no lease, failing

My computer is getting the “DNS address coils kit he found” error when I try to pull up a webpage if that helps as well

I assume you put the router's IP, right?

No, the PI's IP.

Are you sure the computer and browser use your local DNSes?

1 Like

The Pihole is set up as is Unbound. I just need to configure the router so my dns requests go to my computer running those programs.

I’m on the next to last step of this official guide from DietPi https://dietpi.com/blog/?p=564 that recommends doing both simultaneously. Pihole forwards all its traffic to an upstream DNS provider and I’m trying to manually configure Unbound as that DNS providers since Unbound routes requests directly to the authoritative server

As suggested, get the Pi up and running, then figure out how to set up Unbound (if really needed).
The pi can do it's thing without a working unbound.

The PiHole is (or was) running fine when I logged in to it. The problem is once I go to install Unbound again I’ll still need to change my DNS server and I can’t find out how to do it on OpenWRT

I even have how to do it on all the other major routers I just can’t find how to do it on OpenWRT

Maybe it makes sense to install Unbound on my router since there’s software in OpenWRT for it and then let Pihole run on the separate computer by itself?

Well yeah, with the default config in Openwrt nothing would be using it :slight_smile:

That info was provided, you dismissed it, since it "didn't work".

Setting DHCP option 6 is the correct thing to do. You just need to set it to the correct IP of your DNS server, where your Unbound and Pi-hole are running.

1 Like

... and make sure your clients make a DHCP request afterwards.

If dnsmasq is running on router than forward with dhcp config option list server

Another option is obvious to kill the router's dnsmasq, and have the Pi act as DNS and DHCP.

1 Like

My bad, wasn’t meaning to be dismissive

Follow the pi-hole guide:

After you set up your Pi-hole as described in this guide, this procedure changes notably:
***> ***
> 1. Your client asks the Pi-hole Who is pi-hole.net?
> 2. Your Pi-hole will check its cache and reply if the answer is already known.
> 3. Your Pi-hole will check the blocking lists and reply if the domain is blocked.
4. Since neither 2. nor 3. is true in our example, the Pi-hole delegates the request to the (local) recursive DNS resolver.

I'm not sure how you got here but first you need to understand pi-hole and setting it up to use unbound.

  1. The client won't ask the Pi, but Openwrt, so the answer will be "not found" :slight_smile:
1 Like

Thanks guys, I’ll back track and try to get it set up from the start again with the Pihole as a standalone first