LinuxQuestions.org
Visit Jeremy's Blog.
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 07-11-2009, 09:03 AM   #1
mikemillion
LQ Newbie
 
Registered: Feb 2005
Location: Connecticut
Posts: 10

Rep: Reputation: 0
Getting DNS to work on my Linux Server


In /var/log/messages:

Jul 11 08:57:52 babylon named[1221]: starting BIND 9.2.2 -u named
Jul 11 08:57:52 babylon named[1221]: using 2 CPUs
Jul 11 08:57:52 babylon named[1221]: loading configuration from '/etc/named.conf'
Jul 11 08:57:52 babylon named: named startup succeeded
Jul 11 08:57:52 babylon named[1221]: no IPv6 interfaces found
Jul 11 08:57:52 babylon named[1221]: listening on IPv4 interface lo, 127.0.0.1#53
Jul 11 08:57:52 babylon named[1221]: listening on IPv4 interface eth0, 172.20.184.100#53
Jul 11 08:57:52 babylon named[1221]: listening on IPv4 interface eth1, 192.168.15.100#53
Jul 11 08:57:52 babylon named[1221]: command channel listening on 127.0.0.1#953
Jul 11 08:57:52 babylon named[1221]: zone 184.20.172.in-addr.arpa/IN: loading master file 172.20.184.zone: file not found
Jul 11 08:57:52 babylon named[1221]: zone pvisions.com/IN: loading master file pvisions.zone: file not found
Jul 11 08:57:52 babylon named[1221]: running



But attempting an nslookup:

-bash-2.05b# nslookup
Note: nslookup is deprecated and may be removed from future releases.
Consider using the `dig' or `host' programs instead. Run nslookup with
the `-sil[ent]' option to prevent this message from appearing.
> magnum
Server: 127.0.0.1
Address: 127.0.0.1#53

** server can't find magnum: NXDOMAIN
> exit



Then a host command:

-bash-2.05b# host magnum
Host magnum not found: 3(NXDOMAIN)

Any suggestions???
 
Old 07-11-2009, 09:24 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Hi,
If you want to be able to resolve hostnames without using FQDN, you have to add "domain domain.com" or "search domain.com" in /etc/resolv.conf
Quote:
Jul 11 08:57:52 babylon named[1221]: zone 184.20.172.in-addr.arpa/IN: loading master file 172.20.184.zone: file not found
Jul 11 08:57:52 babylon named[1221]: zone pvisions.com/IN: loading master file pvisions.zone: file not found
Check 1)the beginning of named.conf for the "directory ..." option and 2)the zone definitions for the "file ..." option and make sure that the zone files are where they supposed to be.
 
Old 07-11-2009, 09:42 AM   #3
mikemillion
LQ Newbie
 
Registered: Feb 2005
Location: Connecticut
Posts: 10

Original Poster
Rep: Reputation: 0
using directory and file options got me further

Jul 11 09:34:26 babylon named[2939]: starting BIND 9.2.2 -u named
Jul 11 09:34:26 babylon named[2939]: using 2 CPUs
Jul 11 09:34:26 babylon named[2939]: loading configuration from '/etc/named.conf'
Jul 11 09:34:26 babylon named[2939]: no IPv6 interfaces found
Jul 11 09:34:26 babylon named[2939]: listening on IPv4 interface lo, 127.0.0.1#53
Jul 11 09:34:26 babylon named[2939]: listening on IPv4 interface eth0, 172.20.184.100#53
Jul 11 09:34:26 babylon named[2939]: listening on IPv4 interface eth1, 192.168.15.100#53
Jul 11 09:34:26 babylon named[2939]: command channel listening on 127.0.0.1#953
Jul 11 09:34:26 babylon named[2939]: dns_rdata_fromtext: 172.20.184.zone:9: near 'babylon.pvisions.com..': empty label
Jul 11 09:34:26 babylon named[2939]: zone 184.20.172.in-addr.arpa/IN: loading master file 172.20.184.zone: empty label
Jul 11 09:34:26 babylon named[2939]: zone pvisions.com/IN: has no NS records
Jul 11 09:34:26 babylon named[2939]: running
Jul 11 09:34:26 babylon named: named startup succeeded

However, trying to perform a lookup:

-bash-2.05b# host magnum
Host magnum not found: 3(NXDOMAIN)
-bash-2.05b# host magnum.pvisions.com
Host magnum.pvisions.com not found: 2(SERVFAIL)
 
Old 07-11-2009, 09:54 AM   #4
stureedy
Member
 
Registered: Jul 2009
Location: Lexington, Kentucky, USA
Distribution: Slackware
Posts: 37
Blog Entries: 4

Rep: Reputation: 1
Greetings,

I use dnsmasq for name services on my home server. It seems much easier to configure than bind and will resolve names using the server's /etc/hosts file.

For my use, the default config file just works. I add all the machines for which I want local names to /etc/hosts:

192.168.37.11 thisbox.example.com thisbox
192.168.37.11 thatbox.example.com thatbox

Then, on my local machines, I make /etc/resolv.conf something like:

search example.com
nameserver server.example.com

This setup has worked for many years on my about-to-be-retired Slackware 10.2 box. It even works on our non-Linux machines, as I told the router that the first DNS server is server.example.com -)

For more info, see:
http://www.thekelleys.org.uk/dnsmasq/doc.html

Hope that helps!
 
Old 07-11-2009, 10:01 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Quote:
Jul 11 09:34:26 babylon named[2939]: zone pvisions.com/IN: has no NS records
This means that you don't have a NS record in your zone file:
Code:
    NS   ns.pvisions.com.

ns  A    172.20.184.100
For the reverse zone (184.20.172.in-addr.arpa) you should post the zone file to see what's wrong with it.
 
Old 07-12-2009, 01:48 PM   #6
mikemillion
LQ Newbie
 
Registered: Feb 2005
Location: Connecticut
Posts: 10

Original Poster
Rep: Reputation: 0
Voila! My DNS server is up and running, lookups working normally, now I can actually move on to some application installs...

Thank you to everyone that offered up suggestions, as I used them all!
 
  


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
How to make DNS Server work with intranet with web site on Unbutu Server? explorer1979 Linux - Server 6 04-04-2007 11:50 AM
How the DNS-server is connected to work of a web-server and a mail-server? ukrainet Linux - Newbie 2 01-10-2005 10:18 PM
why doesn't my DNS server work? asit_monty Linux - Networking 2 04-06-2004 09:26 AM
why doesn't my DNS server work? asit_monty Linux - Networking 0 04-06-2004 08:01 AM


All times are GMT -5. The time now is 02:48 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