LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-09-2011, 09:32 AM   #1
rrije
Member
 
Registered: Jul 2010
Distribution: openSUSE 11.4
Posts: 33

Rep: Reputation: Disabled
DNS with bind9 on Debian: won't resolve (zone file error?)


Hello,

I'm trying to configure a local dns server which would be responsible for resolving names inside the local network.
I have followed the howto here and managed to get bind9 up and running; the name resolution won't work though. Seems to me there are mistakes in the zone file. The file in question:
Code:
$TTL    604800
@       IN      SOA     nexus.homeworld.local. tech.homeworld.local. (
;
                            2012090901         ; Serial
                                  7200         ; Refresh
                                   120         ; Retry
                               2419200         ; Expire
                                604800)        ; Default TTL
;
@       IN      NS      nexus.homeworld.local.
server                  IN      A       192.168.0.10
machine-mother          IN      A       192.168.0.2
router                  IN      A       192.168.0.1
And nslookup output:
Code:
[tech@server]$ nslookup machine-mother
Server:		192.168.0.10
Address:	192.168.0.10#53

** server can't find machine-mother: NXDOMAIN
What might be the problem here?

Thanks,
rrije.
 
Old 09-09-2011, 02:55 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

You need to add either one of the following in /etc/resolv.conf, if you want to be able to resolve hosts without giving the FQDN
Code:
domain homeworld.local
search homeworld.local
That be said, you have also an error in the zone file. You don't have an A record for the NS (nexus.homeworld.local).
So add:
Code:
nexus IN A 192.168.0.10
in the zone file, increase the serial and reload the zone.

Regards
 
Old 09-10-2011, 08:14 AM   #3
rrije
Member
 
Registered: Jul 2010
Distribution: openSUSE 11.4
Posts: 33

Original Poster
Rep: Reputation: Disabled
Thanks for the reply,
Seems it really was the missing "domain" parameter in the resolv.conf.
If someone needs it, here is the working configuration -- resolv.conf:
Code:
domain homeworld.local
search homeworld.local
nameserver 192.168.0.10
nameserver 192.168.0.1
and zone file:
Code:
$TTL    604800
@       IN      SOA     server.homeworld.local. tech.homeworld.local. (
;
                            2012090902         ; Serial
                                  7200         ; Refresh
                                   120         ; Retry
                               2419200         ; Expire
                                604800 )       ; Default TTL
;
		        IN      NS      server.homeworld.local.
machine-mother          IN      A       192.168.0.2
server                  IN      A       192.168.0.10
nexus                   IN      CNAME   server
router                  IN      A       192.168.0.1
On a side note, it does pay off having a machine w/o graphical environment. Configuring all this stuff in openSuSe via the GUI was easy, but... uninspiring. During these two days I've learned more about DNS than in the past two years.

Anyway, thanks again.
Sincerely yours, rrije.
 
Old 09-10-2011, 08:59 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Glad to see it worked.
As a side note, better use only one of the domain or search options in resolv.conf. From the resolv.conf manpage:
Quote:
The domain and search keywords are mutually exclusive. If more than one instance of these keywords is
present, the last instance wins.
Regards

Last edited by bathory; 09-10-2011 at 09:49 AM.
 
  


Reply

Tags
dns



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
role of zone files in bind9 dns aceone Red Hat 3 12-21-2010 04:05 AM
dns: bind9: cascading server sub-zone polemon Linux - Networking 1 11-18-2009 07:30 AM
Dns Problem Loading The Zone File Error(zone File Not Found) ramineni Linux - Newbie 1 09-14-2008 08:36 AM
dns need zone file to resolve virtual host ? cool47 Linux - Networking 7 05-13-2008 05:39 PM
DNS Zone x-fer - From one zone to another / Debian 3.1 + BIND9 kenwoodgt Linux - Software 0 11-01-2006 10:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:10 PM.

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