PDA

View Full Version : Problem changing my DNS server.



RedByte
2017-06-11, 06:05
So I opened /etc/dhcp/dhclient.conf and went to the line:

#prepend domain-name-servers 127.0.0.1;
I removed the hashtag and changed it to this:

prepend domain-name-servers 208.67.222.222, 208.67.220.220;

Now the problem is that it doesn't really PREpend the dns's but it appends them...
When I type

service network-manager restart



cat /etc/resolv.conf
This is what I get:

# Generated by NetworkManager
search telenet.be home
nameserver 2a02:1800:100::45:2
nameserver 2a02:1800:100::45:1
nameserver 208.67.222.222
# NOTE: the libc resolver may not support more than 3 nameservers.
# The nameservers listed below may not be recognized.
nameserver 208.67.220.220
nameserver 195.130.130.5
nameserver 195.130.131.5


So it's still using my isp's dns, but not the once I want it to use.
Is there any proper way of changing this so my dns's come at the first place?

Mister_X
2017-06-11, 18:13
There is an option in dhclient to ignore some tags. Ignore the DNS/nameserver items and it will skip your ISP ones.

RedByte
2017-06-12, 17:22
Thanks, I can't check it now, but I will tomorrow. I'll let you know if it worked, although I don't see what could go wrong here. :)