1

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 127.0.1.1 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?

1
0

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
               address 192.168.1.3
               netmask 255.255.255.0
               gateway 192.168.1.1
               dns-nameservers 192.168.1.254 8.8.8.8
               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.