[Unbound-users] Replacing /etc/hosts aliases with local-data: directive

Arni Birgisson arnib at menandmice.com
Thu Mar 24 22:32:05 UTC 2011

You could simply edit your /etc/resolv.conf, and add a domain or search directive, on each of your servers
# cat /etc/resolv.conf
search local 

# cat /etc/unbound.conf | grep "\.local"
    local-data: "testing.local IN A"

# ping testing
PING testing.local ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=64 time=0.055 ms

-- Arni

On Mar 24, 2011, at 8:12 PM, Steve Jenkins wrote:

> We've recently set up Unbound as a local recursive resolver, which is
> working great. We've got a dozen or so servers on our rack across
> three different domains, so we've been using our /etc/hosts file to
> set up aliases for them. For example:
> 123.456.78.910          jim.domain1.com jim
> 234.567.89.012          doug.domain2.com doug
> 345.678.90.123          sally.domain3.com sally
> This way, we can easily connect to local systems by simply doing "ssh
> jim" or 'ftp sally."
> The problem is that when we change a host's IP address, or add a new
> host to the rack, we have to manually update the hosts file on EVERY
> box, so I've been fiddling with unbound to try and make it so we only
> have to update it in one place, and then it will act as the local
> resolver for those IPs.
> I can make it function with the following:
> local-zone: "local." static
> local-data: "jim.local.     IN A 123.456.78.910"
> local-data: "doug.local.   IN A 234.567.89.012"
> local-data: "sally.local.    IN A 345.678.90.123"
> But it's not exactly what we want... we have to do "ping jim.local" or
> "ssh doug.local" to connect.
> Is there a way to configure unbound.conf so that it will work without
> the ".local" ?
> Thanks,
> SteveJ
> _______________________________________________
> Unbound-users mailing list
> Unbound-users at unbound.net
> http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nlnetlabs.nl/pipermail/unbound-users/attachments/20110324/b0fe2da4/attachment.htm>

More information about the Unbound-users mailing list