Unbound Windows Config

I’m trying to configure Unbound on Windows 7 to forward all requests from localhost like this:

requests for *.foo.bar => query 172.16.255.3:153
all other requests => query 172.16.255.2

For the first part, this seems to work:

Set “Local Area Connection” IPv4 primary DNS to 127.0.0.1 and add this to service.conf:

server:
do-not-query-localhost: no

forward-zone:
name: “foo.bar”
forward-addr: 172.16.255.3@153

But I want every other request to go to 172.16.255.2 (for example) and instead, it just dies. I’ve tried a second forward-zone with the name “.” following the entry above, but it doesn’t seem to work. I’ve completely disabled the Windows DNS service, in case it matters.

Hi Riemann,

I'm trying to configure Unbound on Windows 7 to forward all requests
from localhost like this:

requests for *.foo.bar => query 172.16.255.3:153 <http://172.16.255.3:153>
all other requests => query 172.16.255.2

For the first part, this seems to work:

Set "Local Area Connection" IPv4 primary DNS to 127.0.0.1 and add this
to service.conf:

server:
do-not-query-localhost: no

forward-zone:
name: "foo.bar"
forward-addr: 172.16.255.3@153

But I want every other request to go to 172.16.255.2 (for example) and
instead, it just dies. I've tried a second forward-zone with the name
"." following the entry above, but it doesn't seem to work. I've
completely disabled the Windows DNS service, in case it matters.

That is how it should work. Append these config lines:
forward-zone:
name: "."
forward-addr: 172.16.255.2

And that should be all that is needed to do what you ask.
Perhaps you also need domain-insecure: "foo.bar" ? (if you have DNSSEC
enabled)

Best regards, Wouter