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'm using Ubuntu 12.10 and usually use OpenDNS or DynDNS for each of my network connections. However it can be a inconvenient having to set the DNS address for each connection individually...

Is there some way to force one DNS address for all connections, including future connections?

I've googled around but haven't been able to find a good working solution. :/

share|improve this question
I can not tell what you are asking. Are you wanting to set a DNS for multiple workstations on a LAN? In that event you can either configure your router to use Open/DynDNS or run a local DNS server. In the second option I would advise dnsmasq. Dnsmask will do both dhcp and DNS so would replace those features of your router. – bodhi.zazen Feb 26 '13 at 19:24

I think you're asking about how to set DNS server for all your PC. You might want to look at DHCP server. If you are using a router supporting DHCP then you can setup your DNS server IP address there and then all the PC will be using that DNS server.

share|improve this answer
Thanks for the replies... Sorry if I didn't make it quite clear, but I run Ubuntu on my laptop which I use on multiple Wifi networks. However, when I go to a new Starbucks for example, I don't want to have to enter the OpenDNS address manually for that new connection using Network-Manager. I would like it to automatically use the OpenDNS address which I've somehow specified...somewhere. – user135851 Feb 28 '13 at 1:30
I don't quite understand what you're talking about. But in Unix we were using /etc/resolv.conf to setup system DNS servers. Is it not what you want or did you already try it? – NxFilter Mar 8 '13 at 13:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.