LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-09-2012, 06:01 AM   #1
sochana
LQ Newbie
 
Registered: Mar 2006
Posts: 3

Rep: Reputation: 0
Order of DNS Server look ups


I have recently set up Cent OS to act as a DNS server.
How do I set it up so that the 1st DNS server clients use is the internal DNS server & not the I.S.P's DNS server?
I have also entered my DNS server IP address in the /etc/resolv.conf file & set it so that its not overwritten upon a server reboot.
Many Thanks
Simon
 
Old 01-09-2012, 06:58 AM   #2
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
your machine will give the priority according to the order of DNS server IP in your resolv.conf

So mention your IP in resolv.conf then make your ISP's IP as secondary
Code:
#vi /etc/resolv.conf
nameserver your IP
nameserver ISP's IP
to give a test

as in my case (look out for the server address in red)
Code:
#nslookup google

Server:         10.10.10.90
Address:        10.10.10.90#53

Non-authoritative answer:
Name:   google.com
Address: 74.125.235.20
Name:   google.com
Address: 74.125.235.16
Name:   google.com
Address: 74.125.235.17
Name:   google.com
Address: 74.125.235.18
Name:   google.com
Address: 74.125.235.19
 
Old 01-17-2012, 05:45 AM   #3
sochana
LQ Newbie
 
Registered: Mar 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Hi Deepak
Here is a copy of my /etc/resolv.conf file:

; generated by /sbin/dhclient-script
# search cable.my-isp.net
# search nameserver.mydomain.co.uk
nameserver 192.168.1.1
nameserver 194.168.4.100
nameserver 194.168.8.100
/etc/resolv.conf (END)


My clients show my name server as the 1st DNS server.
If I ping my name server , the ping trace shows it still using the ISP's DNS servers.
I suspect that it may be acting as a Caching only server as opposed to being a master server on the local network.

I also found the following in the /etc directory:

lrwxrwxrwx 1 root named 52 Dec 23 10:58 /etc/named.caching-nameserver.conf -> /var/named/chroot//etc/named.caching-nameserver.conf
lrwxrwxrwx 1 root root 32 Jan 11 18:55 /etc/named.conf -> /var/named/chroot/etc/named.conf
lrwxrwxrwx 1 root named 42 Dec 23 10:58 /etc/named.rfc1912.zones -> /var/named/chroot//etc/named.rfc1912.zones


And in /var/named/chroot/etc/

-rwxr-xr-x 1 root named 433 Dec 23 18:39 191.168.1.zone
-rw-r--r-- 1 root root 3661 Jan 17 09:42 localtime
-rwxr-xr-x 1 root named 1586 Dec 23 08:38 named.210308
-rw-r----- 1 root named 1230 Nov 17 22:22 named.caching-nameserver.conf
-rw-r----- 1 root root 1230 Jan 17 09:26 named.caching-nameserver.conf.bak
-rw-r--r-- 1 root named 1835 Jan 17 09:59 named.conf
-rwxr-xr-x 1 root named 1733 Dec 23 09:16 named.conf_bak
-rwxr-xr-x 1 root named 1449 Dec 23 08:38 named.conf.bak
-rwxr-xr-x 1 root named 219 Dec 23 08:38 named.conf.rpmsave
-rw-r----- 1 root named 955 Nov 17 22:22 named.rfc1912.zones
-rwxr-xr-x 1 root named 76 Dec 23 09:42 rndc.key

Thanks again in advance
Simon
 
Old 01-17-2012, 05:55 AM   #4
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
are you sure your internal DNS server is up and running properly?
post the output of these commands

Code:
#dig -x ip of your internal DNS server
Code:
#dig hostname of your internal DNS server
 
Old 01-24-2012, 04:25 AM   #5
sochana
LQ Newbie
 
Registered: Mar 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Sorry for the late reply, here are the results:




dig -x 192.168.1.1

; <<>> DiG 9.7.4-P1-RedHat-9.7.4-2.P1.fc14 <<>> -x 192.168.1.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 18538
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;1.1.168.192.in-addr.arpa. IN PTR

;; Query time: 50 msec
;; SERVER: 194.168.4.100#53(194.168.4.100)
;; WHEN: Tue Jan 24 10:25:37 2012
;; MSG SIZE rcvd: 42

dig SERVER

; <<>> DiG 9.7.4-P1-RedHat-9.7.4-2.P1.fc14 <<>> SERVER
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48530
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;SERVER. IN A

;; ANSWER SECTION:
SERVER. 0 IN A 81.200.64.50

;; Query time: 20 msec
;; SERVER: 194.168.4.100#53(194.168.4.100)
;; WHEN: Tue Jan 24 10:25:48 2012
;; MSG SIZE rcvd: 42
 
Old 01-24-2012, 04:42 AM   #6
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
I have recently set up Cent OS to act as a DNS server.
I am afraid but your DNS is not configured properly
follow this link

http://www.linuxquestions.org/questi...se-zone-24628/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to configure another dns server to combine use with primary current dns server. hocheetiong Linux - Newbie 1 05-29-2008 06:57 PM
LXer: Find out DNS Server Version With DNS Server Fingerprinting Tool LXer Syndicated Linux News 0 12-21-2007 05:30 PM
LXer: Find out DNS Server Version With DNS Server Fingeprinting Tool LXer Syndicated Linux News 0 12-21-2007 04:50 PM
UPS for home server netlogic Linux - Hardware 6 09-04-2007 09:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration