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'm wondering if it is possible to specify, that all connections (even future, like when using wifi at some other place (=different SSID)) will be using pre-defined DNS server

When I have some (concrete) connections, I could go to IPv4 settings, and specify DNS server there (however, in case of new connection I would have to do it (and not forget it))

This may be particularly useful for some safe/filtering dns (such as opendns's &

share|improve this question

2 Answers 2

open the network control pannel for each network device you use. wireless/wired/vpn...on the ipv4 tabs set dhcp addresses only and specify your dns manually from there. do the same for ipv6 only if you use it.

share|improve this answer
The question was very specifically “How to not do that?”. –  Evpok Mar 25 '14 at 9:55

/etc/resolvconf is the package that handles this. It dynamically builds your /etc/resolv.conf file based on all sorts of rules.

You could set your preferred dns server in /etc/resolvconf/resolv.conf.d/head

All other dns servers would come after that for all interfaces.

There are plenty of more advanced ways to get resolvconf to suit your particular requirements, have a read of the docs or howto's.

share|improve this answer

Your Answer


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.