Discussion:
[Unbound-users] let unbound query other nameservers
A. Schulze
2014-11-24 10:17:54 UTC
Permalink
Hello,

I like to configure unbound to not talk to a nameserver listed in DNS
but to my own.
I don't know the domainnames, but I can tell these domains are hosted
at server ns.example.com for example.

Wish: every time unbound try to query ns1.example.org while resolving
a domain it must not talk to this server
but my server and use my answers.

I tried to add a local-data in unbound.conf

server:
local-data: "ns.example.com. A 192.168.1.1"

@192.168.1.1 there is a nsd answering the questions in the way I like.

But that does not work. Looks like unbound learn the ip address of the
given label from authoritative answers and use it instead my static
entry.

Is $WISH possible at all?

Thanks,
Andreas
W.C.A. Wijngaards
2014-11-24 10:31:05 UTC
Permalink
Hi Andreas,
Post by A. Schulze
Hello,
I like to configure unbound to not talk to a nameserver listed in
DNS but to my own. I don't know the domainnames, but I can tell
these domains are hosted at server ns.example.com for example.
Wish: every time unbound try to query ns1.example.org while
resolving a domain it must not talk to this server but my server
and use my answers.
This is not a normal feature.

But you can try this tricky setup: set a private-address config on the
public-IP address of ns.example.com (the /32 version of the normal IP4
of that nameserver), which makes unbound remove that address. Add a
forward-zone for name: "ns.example.com" to another unbound instance
that has the local-data statement for ns.example.com.

Best regards,
Wouter
Post by A. Schulze
I tried to add a local-data in unbound.conf
server: local-data: "ns.example.com. A 192.168.1.1"
@192.168.1.1 there is a nsd answering the questions in the way I like.
But that does not work. Looks like unbound learn the ip address of
the given label from authoritative answers and use it instead my
static entry.
Is $WISH possible at all?
Thanks, Andreas
_______________________________________________ Unbound-users
http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users
A. Schulze
2014-11-25 11:59:09 UTC
Permalink
Post by W.C.A. Wijngaards
This is not a normal feature.
yes!
Post by W.C.A. Wijngaards
But you can try this tricky setup: set a private-address config on the
public-IP address of ns.example.com (the /32 version of the normal IP4
of that nameserver), which makes unbound remove that address. Add a
forward-zone for name: "ns.example.com" to another unbound instance
that has the local-data statement for ns.example.com.
But this suggestion works!
Thanks for saving my day :-)

Andreas

Loading...