How do I set a static DNS nameserver address on Ubuntu Server?
Posted
by
Aleks
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Aleks
Published on 2012-11-04T13:07:14Z
Indexed on
2012/11/06
11:21 UTC
Read the original article
Hit count: 412
I am trying statically to set DNS server addresses in my Ubuntu server running as virtual machine. I followed all recommendations on official Ubuntu support pages but I simply cannot get rid of my ISP's DNS servers set by DHCP.
I assigned br0 interface on my host machine static IP address and eth0 on VM to use Google DNS and my own local DNS running on the second vm by setting it in /etc/network/interfaces
. Tried to fiddle with head base and tail files in /etc/resolvconf/resolv.conf.d/
and tried to shuffle interface-order in /etc/resolvconf/interface-order
but when I restarted network service I got the ISP's DNS addresses back every time.
Is there a way that I can disable resolvconf and set up my resolv.conf file manually as I always did on Red Hat? Or at can you tell me which hook script keeps putting ISP DNSs in resolv.conf? My ISP don't allow me to change DHCP settings on my router so I cannot do it that way.
Why is such a simple thing such as setting DNS servers got so complicated???
© Ask Ubuntu or respective owner