Add DNS server via resolvconf for Ubuntu Server

From banana_wiki
Revision as of 23:31, 24 November 2014 by Bananafish (talk | contribs) (Created page with "= Add DNS server via resolvconf for Ubuntu Server = For some reason Ubuntu no longer respects <tt>/etc/resolv.conf</tt> and requires <tt>resolvconf</tt> to make changes to DN...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Add DNS server via resolvconf for Ubuntu Server

For some reason Ubuntu no longer respects /etc/resolv.conf and requires resolvconf to make changes to DNS lookups. This is usually needed after setting a static IP on Ubuntu Server.

cd /etc/resolvconf/resolv.conf.d
sudo cp -p head head.orig
sudo vi head

In this file we need to add something like the following:

nameserver x.x.x.x
search domain.local

Then once settings are in place run:

sudo resolvconf -u