[lxc-users] adding lxc containers to local DNS
Drake Wilson
drake at dasyatidae.net
Wed Jul 2 14:53:41 UTC 2014
On 02/07/14 08:45, Bill Smith wrote:
> On Centos and/or Ubuntu, is there a way to configure the host's DNS so
> that the containers mapped in dnsmasq.leases are resolvable by nslookup?
Last I checked, if you're using dnsmasq for DHCP, then if you use it as
a DNS resolver, it'll also resolve queries against the lease table.
(This is often done by using "nameserver 127.0.0.1" in resolv.conf,
making sure that dnsmasq gets the addresses of upstream resolvers by
some other means.) In particular, see the "domain" option in dnsmasq(8)
to set the suffix to use for DHCP.
If that doesn't work for you, there may be a way to do it with
nsswitch.conf instead, but one doesn't come immediately to mind.
---> Drake Wilson
More information about the lxc-users
mailing list