[lxc-devel] dnsmasq and resolv.conf containers

Ducos Laurent laurent.ducos at biblibre.com
Wed Jan 23 09:14:09 UTC 2013


Le 17/01/2013 15:45, Serge Hallyn a écrit :
> Quoting Laurent Ducos (laurent.ducos at biblibre.com):
>> Hello.
>>
>> I use lxc and lxc-net on unbuntu 12.10 that works fine.
>> My problem is about the /etc/resolv.conf file in the container.
>>
>> I think the file is written by dnsmasq when assigning dhcp lease
>>
>> Is it possible to tell dnsmasq : wrote "nameserver 8.8.8.8 nameserver
>> 8.8.4.4" in place of the value of "--listen-address" (dnsmask command
>> line) ?
> Not sure *exactly* what you want, but I think the information you want
> is in the resolvconf(8) manual page.
>
> -serge
I first, i apologize for my "so bad" english.

My problem is that dnsmasq assigns (with dhcp) to the lxc containers the 
value of "dhcp --listen-address " as dns nameserver.
I want to use another dns server in my local network
The solution is to use "--dhcp-option=6,192.168.X.X,192.168.X.X" in the 
dnsmasq command line. 6 is a tag indicating the DHCP option dns-server
Now the file /etc/resolv.conf of my containers are properly informed.





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20130123/bbfa52ae/attachment.html>


More information about the lxc-devel mailing list