search

Wednesday, May 20, 2015

fedora 21: How to add and preserve DNS server

Normally NetworkManager handels all DNS configuration. Every time when new network connection was established (?) it regenerates file /etc/resolv.conf which contains DNS server data, so editing this file is useless.

To add DNS server on top of the DNS servers list from your connections you need to create or edit file /etc/dhcp/dhclient.conf and add the following line:
prepend domain-name-servers 192.168.33.10;

Where 192.168.33.10 is address of DNS server.

After applying changes you need to reboot or restart NetworkManager service:
sudo service NetworkManager restart


No comments:

Post a Comment