Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am sharing internet from eth1 to eth2. I do this by editing the eth2 properties and setting method to Shared to other computers.

I also use dnsmasq for dns caching. Now if I enable Internet sharing I have to stop the existing dnsmasq instance as network manager starts its own dnsmasq instance. But this new dnsmasq instance has no dns caching options.

Now my dns query is taking more time.

How can I change the dnsmasq or network manager so when network manager starts the dnsmasq it also support dns caching?

Some FAQ.

  1. "taking more time", how much more?
    • Using dns caching it take 0ms. Without 100ms.
  2. How did you measure this time
    • Using dig command
share|improve this question
Not even a single comment! – Shiplu Sep 30 '12 at 5:46

In Precise the NetworkManager-controlled dnsmasq process conflicts with the standalone dnsmasq server in its default configuration. This was bug #959037.

In Quantal the NetworkManager-controlled dnsmasq process listens on instead of Consequently it is possible in Quantal to run standalone dnsmasq, listening on all interfaces including lo at, alongside NM-dnsmasq. In the default configuration the standalone dnsmasq will forward queries to NM-dnsmasq which forwards queries off-machine, as determined by NetworkManager.

The answer to the question "How can I change the dnsmasq or network manager..." is that you can't make the desired change in Precise without recompiling NetworkManager. In Quantal, the NetworkManager-controlled dnsmasq can be configured via files in /etc/NetworkManager/dnsmasq.d/.

share|improve this answer
It was fixed after I see the configuration that NM was using to run dnsmasq and edited the standalone dnsmasq accordingly. AFAICR I configured it to listen to all interfaces. – Shiplu Oct 16 '12 at 15:51

Your Answer


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.