I have a DNS server running on my computer, and I want Ubuntu to use it to resolve addresses. I've setup mydomain.com as a custom domain

I went into Network settings, switched to manual in 'Wired', entered my IP, Gateway, Mask. And then I entered my IP in the DNS field.

How do I cause this to take effect? dig @myiphere mydomain.com works, but dig mydomain.com doesn't return any address.

If I edit /etc/resolv.conf by hand and change the first line from to myiphere, then everything starts to work.

But this doesn't seem to be the right way to do things as resolv.conf warns against manual changes by hand.

So how do I PROPERLY and reliably change DNS?


I would expect your network manager settings to apply and take care of resolv.conf.

You can alternatively manage this interface from /etc/network/interfaces, with a configuration similar to this one (example taken from "man resolvconf"):

iface eth0 inet static
               dns-search foo.org bar.com

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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