How do I set a static DNS nameserver address on Ubuntu Server?
- by Aleks
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???