2

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
1

1 Answer 1

2

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 127.0.1.1 instead of 127.0.0.1. Consequently it is possible in Quantal to run standalone dnsmasq, listening on all interfaces including lo at 127.0.0.1, 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/.

1
  • 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. Oct 16, 2012 at 15:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .