Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] DNS Change

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
capcla
Posts: 30
Joined: 2015-06-24 15:36

[SOLVED] DNS Change

#1 Post by capcla »

Hi,
I've probelm with the configuration of DNS on my Debian. I always use OpenDNS but would change it with Google DNS.
I can't modify DNS on my router and don't use resolv.conf because it is overwritten every restart.
In order to setup my DNS, I use /etc/dhcp/dhcclient.conf where I have configurated Google DNS

Code: Select all

# Configuration file for /sbin/dhclient.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
#	man page for more information about the syntax of this file
#	and a more comprehensive list of the parameters understood by
#	dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
#	not leave anything out (like the domain name, for example), then
#	few changes must be made to this file, if any.
#

option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;

send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset, routers,
	domain-name, domain-name-servers, domain-search, host-name,
	dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,
	netbios-name-servers, netbios-scope, interface-mtu,
	rfc3442-classless-static-routes, ntp-servers;

#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;
#supersede domain-name "fugue.com home.vix.com";
#prepend domain-name-servers 8.8.8.8, 8.8.4.4;
#require subnet-mask, domain-name-servers;
#timeout 60;
#retry 60;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/sbin/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject 192.33.137.209;

#alias {
#  interface "eth0";
#  fixed-address 192.5.5.213;
#  option subnet-mask 255.255.255.255;
#}

#lease {
#  interface "eth0";
#  fixed-address 192.33.137.200;
#  medium "link0 link1";
#  option host-name "andare.swiftmedia.com";
#  option subnet-mask 255.255.255.0;
#  option broadcast-address 192.33.137.255;
#  option routers 192.33.137.250;
#  option domain-name-servers 127.0.0.1;
#  renew 2 2000/1/12 00:00:01;
#  rebind 2 2000/1/12 00:00:01;
#  expire 2 2000/1/12 00:00:01;
#}
but if I check my DNS on the site https://www.dnsleaktest.com/, it shows that I use OpenDNS.
I use wicd as network manager for my DE. In the past, I used network-manager but now it isn't installed.
Last edited by capcla on 2017-12-02 15:03, edited 1 time in total.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: DNS Change

#2 Post by Head_on_a_Stick »

Do you have the resolvconf package installed?

Check your nameservers directly with the `drill` command:

Code: Select all

empty@Xanadu:~ $ drill
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 43639
;; flags: qr rd ra ; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 0 
;; QUESTION SECTION:
;; .	IN	NS

;; ANSWER SECTION:
.	518400	IN	NS	c.root-servers.net.
.	518400	IN	NS	i.root-servers.net.
.	518400	IN	NS	m.root-servers.net.
.	518400	IN	NS	g.root-servers.net.
.	518400	IN	NS	e.root-servers.net.
.	518400	IN	NS	l.root-servers.net.
.	518400	IN	NS	a.root-servers.net.
.	518400	IN	NS	j.root-servers.net.
.	518400	IN	NS	d.root-servers.net.
.	518400	IN	NS	f.root-servers.net.
.	518400	IN	NS	k.root-servers.net.
.	518400	IN	NS	h.root-servers.net.
.	518400	IN	NS	b.root-servers.net.

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 16 msec
;; SERVER: 127.0.0.1
;; WHEN: Sat Dec  2 15:18:36 2017
;; MSG SIZE  rcvd: 228
empty@Xanadu:~ $
https://packages.debian.org/stretch/ldnsutils
deadbang

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: DNS Change

#3 Post by Head_on_a_Stick »

capcla wrote:I use /etc/dhcp/dhcclient.conf where I have configurated Google DNS
It looks to me like your domain-name-servers section is commented out, try removing the "#" symbol at the start of the lines.
deadbang

capcla
Posts: 30
Joined: 2015-06-24 15:36

Re: DNS Change

#4 Post by capcla »

Head_on_a_Stick wrote:Do you have the resolvconf package installed?
Resolvconf is installed

Head_on_a_Stick wrote:Check your nameservers directly with the `drill` command:

Code: Select all

empty@Xanadu:~ $ drill 

Code: Select all

$ drill
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 35052
;; flags: qr rd ra ; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 0 
;; QUESTION SECTION:
;; .	IN	NS

;; ANSWER SECTION:
.	518400	IN	NS	a.root-servers.net.
.	518400	IN	NS	b.root-servers.net.
.	518400	IN	NS	c.root-servers.net.
.	518400	IN	NS	d.root-servers.net.
.	518400	IN	NS	e.root-servers.net.
.	518400	IN	NS	f.root-servers.net.
.	518400	IN	NS	g.root-servers.net.
.	518400	IN	NS	h.root-servers.net.
.	518400	IN	NS	i.root-servers.net.
.	518400	IN	NS	j.root-servers.net.
.	518400	IN	NS	k.root-servers.net.
.	518400	IN	NS	l.root-servers.net.
.	518400	IN	NS	m.root-servers.net.

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 92 msec
;; SERVER: 192.168.1.1
;; WHEN: Sat Dec  2 16:31:18 2017
;; MSG SIZE  rcvd: 228

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: DNS Change

#5 Post by Head_on_a_Stick »

I usually set static routes on my machines but I think this will do it for dhclient:

Code: Select all

supersede domain-name-servers 8.8.8.8, 8.8.4.4;
deadbang

capcla
Posts: 30
Joined: 2015-06-24 15:36

Re: DNS Change

#6 Post by capcla »

Head_on_a_Stick wrote: It looks to me like your domain-name-servers section is commented out, try removing the "#" symbol at the start of the lines.
Ok, I solved.
But, if the row were commented, how could I use OpenDNS?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: DNS Change

#7 Post by Head_on_a_Stick »

capcla wrote:But, if the row were commented, how could I use OpenDNS?
You never were — the `drill` output indicates that your box was "asking" your router ;)
deadbang

capcla
Posts: 30
Joined: 2015-06-24 15:36

Re: DNS Change

#8 Post by capcla »

Head_on_a_Stick wrote:
capcla wrote:But, if the row were commented, how could I use OpenDNS?
You never were — the `drill` output indicates that your box was "asking" your router ;)
It's no possible. On my router there isn't the possibility of modify the DNS. If i don't change this parameter of my operative system, my router uses the ISP's DNS

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: DNS Change

#9 Post by Head_on_a_Stick »

capcla wrote:my router uses the ISP's DNS
Yes, that's what I meant.

If you check the output of `ip r` then it should show 192.168.1.1 as the default.
deadbang

capcla
Posts: 30
Joined: 2015-06-24 15:36

Re: DNS Change

#10 Post by capcla »

Head_on_a_Stick wrote: You never were — the `drill` output indicates that your box was "asking" your router ;)
Excuse me, I've some problems with English :D
However https://www.dnsleaktest.com/ shows me that I used OpenDNS and not my ISP's DNS.
Thank you

Post Reply