Unbound as local DNS cacher, overwrite some domains
Arthur Chance
freebsd at qeng-ho.org
Tue Oct 13 10:59:44 UTC 2015
On 13/10/2015 11:16, B.J.Scharp wrote:
> 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?
Take a look at the local-zone, local-data and local-data-ptr directives.
You can totally override a zone or simply make changes and additions to
one depending on the type specified in local-zone.
--
Those who do not learn from computing history are doomed to
GOTO 1
More information about the freebsd-questions
mailing list