Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Oct 2015 12:16:29 +0200
From:      "B.J.Scharp" <freebsd-questions@itsacon.net>
To:        freebsd-questions@freebsd.org
Subject:   Unbound as local DNS cacher, overwrite some domains
Message-ID:  <561CD9FD.6020204@itsacon.net>

next in thread | raw e-mail | index | archive | help
Hello,

I have a setup where there are several machines on a LAN that have both
internal and external addresses. I would like to use Unbound as a local
DNS cacher that provides the internal address when queried, while the
external (authoritive) DNS gives the external address.

Example:

mail.example.org is on the LAN.

If a laptop is used on-site, the DHCP gives the FreeBSD server as the
primary DNS server.

That DNS server returns the LAN address when queried for
mail.example.org, but defers to a higher-up machine when queried for,
E.G., www.google.com

Next the laptop is taken out of the LAN, and when it queries the
external DNS for mail.example.org, it gets the WAN address for the
server. (for this reason I don't want to use the hosts file on the
laptop, nor use addresses like example.local).

So basically, I want Unbound to be authorative for some addresses, but
not necessarily for entire domains (not all hosts for the domain are on
that LAN, so for most queries, the normal authorative DNS can be used).
It's more like a LAN-wide hosts file.

Is this possible with Unbound, and if so, where do I start?

Regards,
Bernard



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?561CD9FD.6020204>