LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 08-01-2016, 07:11 AM   #1
pandey
LQ Newbie
 
Registered: Aug 2016
Posts: 3

Rep: Reputation: Disabled
Red face DNS server can't find www.localhost.com: SERVFAIL


hi everyone
i m new in linux
i can't configure DNS server
i do below mention configuration
1.etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
search localhost
~
~
2.after that /etc/bind/db.localhost.com
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.localhost.com root.ns.localhost.com (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.localhost.com
@ IN A 10.0.2.15
@ IN AAAA ::1
ns IN A 10.0.2.15
www IN A 10.0.2.255
~
~
3. recerse zone /etc/bind/db.10
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.localhost.com root.ns.localhost.com (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns
5 IN PTR ns.localhost.com.
10 IN PTR www.localhost.com.
~
4. after that /etc/bind/named.conf.local

//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
// Forward zone
zone "localhost.com" {
type master;
file "/etc/bind/db.localhost.com";
};
//reverse zone
zone "2.0.15.in-addr.arpa" {
type master;
file "/etc/bind/db.10";
};
~

5. when i nslookup www.localhost.com the result is

root@kunal-VirtualBox:/home/kunal# nslookup www.localhost.com
Server: 127.0.0.1
Address: 127.0.0.1#53

** server can't find www.localhost.com: SERVFAIL

--------------------------
 
Old 08-01-2016, 09:48 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,596

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Hi,

You get a SERVFAIL response, maybe because you have an error in the forward zone. In fact you forgot the trailing dot in the NS RR:
Code:
$TTL 604800
@ IN SOA ns.localhost.com root.ns.localhost.com (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.localhost.com.    ;add the trailing dot here!!!
@ IN A 10.0.2.15
@ IN AAAA ::1
ns IN A 10.0.2.15
www IN A 10.0.2.255
Increase the serial, reload and test again
 
1 members found this post helpful.
Old 08-01-2016, 10:22 AM   #3
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,652
Blog Entries: 10

Rep: Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075
damn period, every time.
 
Old 08-01-2016, 01:17 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,596

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Quote:
Originally Posted by Habitual View Post
damn period, every time.
Exactly, I always run a named-checkzone after creating a new zonefile, to check for errors like that...

Cheers
 
Old 08-02-2016, 12:52 AM   #5
pandey
LQ Newbie
 
Registered: Aug 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
same error

hiee
sir i add the missing dot but it's doesn't work
 
Old 08-02-2016, 02:48 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,596

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Quote:
Originally Posted by pandey View Post
hiee
sir i add the missing dot but it's doesn't work
Did you remember to increase the serial number and reload/restart bind?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] DNS Server Related Problem: ** server can't find w3icon.com: SERVFAIL tonmoy Linux - Server 5 09-09-2013 05:26 AM
[SOLVED] dns error ** server can't find server1: SERVFAIL themande Linux - Server 2 03-31-2012 08:34 AM
[SOLVED] error "server can't find 254.0.168.192.in-addr.arpa: SERVFAIL" in dns server piyusharora420 Linux - Server 15 01-10-2011 02:06 AM
DNS SERVER WITH ERROR: "Server Can't Find : SERVFAIL" jcvalim Linux - Server 52 05-21-2009 03:18 AM


All times are GMT -5. The time now is 10:53 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration