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 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
add comment

1 Answer

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/.

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
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.