Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've got a laptop running Ubuntu 12.04 that is sharing its wifi connection to another machine through the eth0 interface using NetworkManager. This seems to be done by dnsmasq.

Now I need to set up PXE/TFTP booting on the other machine, so I'd like to configure the dnsmasq instance that is spawned through NetworkManager to add a couple of lines for PXE/TFTP. How is this done? It seems to ignore /etc/dnsmasq.conf.

Previous answers seem to indicate that the configuration is hardcoded into NetworkManager. Is this still the case? If so, is there an easy way to achieve what I'm trying to do here? I suppose I could just disable the network sharing in NetworkManager and set it up manually, but I'd rather keep this all managed in one place if it all possible.

edit: Indeed, it seems the dnsmasq configuration is still hardcoded in NetworkManager. See source here. It seems to me that it would be a much better solution to simply specify an alternate dnsmasq.conf file here, but I'm sure there are issues I haven't considered.

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

Dnsmasq doesn't "share connections". The role of the NetworkManager-controlled dnsmasq is to route DNS traffic.

You can't configure the NetworkManager-controlled dnsmasq process in Precise. In Quantal you are able to configure it via files in /etc/NetworkManager/dnsmasq.d/. See dnsmasq(8).

Another possibility is to use the standalone dnsmasq server which is fully configurable even in Precise. To run standalone dnsmasq alongside NM-dnsmasq in Precise you need to give standalone dnsmasq the "except-interface=lo" option. This is not necessary in Quantal.

share|improve this answer
    
Any chance you could update this answer with an example of using dnsmasq.d in Quantal? Especially how to restart the services after creating configuration files. –  Alistair Buxton Mar 18 '13 at 7:19
    
To configure NM-dnsmasq in Quantal, add a file such as /etc/NetworkManager/dnsmasq.d/local containing option lines. For example, to set the cache size to 100 instead of 0, include a line cache-size=100. After creating the file, reboot or do sudo restart network-manager to restart NetworkManager and NM-dnsmasq. I know that the original question was about configuring PXE booting , so if I have time I'll add an example of how to configure that. –  jdthood Mar 19 '13 at 9:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.