So I changed the nameserver in the /etc/resolv.conf to the DNS server I want to use, but whenever the server gets restarted for whatever reason, it reverts back to the default DNS server. How can I change it so that it is a permanent change? Thanks.
Ubuntu Server – How to Permanently Change DNS Settings
domain-name-systemlinuxUbuntuubuntu-10.10
Related Topic
- EC2: is an instance’s public DNS stable? Can I rely on it not changing
- Configure that /etc/resolv.conf won’t be modified after restart
- Linux – Configure a DNS server per nic interface (eth0 / eth1)
- Windows – Default TTLs in Windows DNS
- docker – Fixing DNS Resolution Issues on Ubuntu 14.04 Desktop Host
- Using the private DNS from within AWS VPC via Route 53
Best Answer
Your resolv.conf is probably being overwritten by dhcp.
Are you using DHCP? You can validate by hand editing your resolv.conf and then restarting your dhcp client.
There are overrides for what DHCP provides for most OSes.
I notice you tagged as Ubuntu. Try looking at /etc/dhcp3/dhclient.conf to hardcode your domain-name-server entries.
Good luck.