I want to change my DNS nameserver to GoogleDNS on fedora 25. I edited /etc/resolv.conf from
search fritz.box
nameserver 192.168.1.1
to
nameserver 8.8.8.8
nameserver 8.8.8.4
But if I reconnect to router, the file will revert back to my router's DNS nameserver. I followed this https://developers.google.com/speed/public-dns/docs/using this link's tutorial for debian part. But it isn't working.
Can I change nameserver to google's DNS permanently?
P.S: I do not have access to the router.
Answer
The issue is you are getting the DNS server from the router and overriding what you set. To fix this, you must edit /etc/dhclient.conf
.
Add this line to make sure that it does not override the default DNS servers:
supersede domain-name-servers 8.8.8.8, 8.8.4.4;
Alternatively, you can instruct the DHCP client to not request a DNS server address.
More information can be found with the man dhclient.conf
command.
Comments
Post a Comment