LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-07-2004, 05:31 AM   #1
Tom123
LQ Newbie
 
Registered: Oct 2003
Distribution: Redhat9
Posts: 7

Rep: Reputation: 0
Simple DNS help


Hi

I am a bit of a newbie to the dns thing so I hope somebody can help me with the following. I am trying to set up a dns server for a small test network that doesn’t have internet connection. I just want the server provide ip addresses for the hosts on the local network.


This is my /etc/named.conf file

options {
directory "/var/named";
};

zone "mydomain.tld" IN {
type master;
file "master/mydomain.tld";
};

very minimal I know but shouldn’t this be enough just to serve the internal hosts?

This is the zone file:

$TTL 86400
@ IN SOA ns1.mydomain.tld. hostmaster.mydomain.tld. (
2004100610 ; Serial Number
21600 ; Refresh time
3600 ; Retry time
604800 ; Expire time
86400 ) ; Minimum TTL


IN NS mydomain.tld.
www IN A 10.0.0.2

I then start named no problems - this is the log:

starting BIND 9.2.2-P3 -u named
Oct 7 11:11:21 ns1 named[3901]: using 1 CPU
Oct 7 11:11:21 ns1 named[3901]: loading configuration from '/etc/named.conf'
Oct 7 11:11:21 ns1 named[3901]: listening on IPv4 interface lo, 127.0.0.1#53
Oct 7 11:11:21 ns1 named[3901]: listening on IPv4 interface eth0, 10.0.0.3#53
Oct 7 11:11:21 ns1 named[3901]: command channel listening on 127.0.0.1#953
Oct 7 11:11:21 ns1 named[3901]: command channel listening on ::1#953
Oct 7 11:11:21 ns1 named[3901]: zone mydomain.tld/IN: loaded serial 2004100610
Oct 7 11:11:21 ns1 named[3901]: running

But when I try to dig @ 127.0.0.1 on ns1 I get?
; <<>> DiG 9.2.2-P3 <<>>
;; global options: printcmd
;; connection timed out; no servers could be reached

please help someone...
 
Old 10-07-2004, 05:51 AM   #2
yuray
Member
 
Registered: Apr 2003
Location: Russia, Khotkovo
Distribution: Debian
Posts: 146

Rep: Reputation: 15
Try this:

$TTL 86400
@ IN SOA ns1.mydomain.tld. hostmaster.mydomain.tld. (
2004100610 ; Serial Number
21600 ; Refresh time
3600 ; Retry time
604800 ; Expire time
86400 ) ; Minimum TTL


IN NS ns1.mydomain.tld.
www IN A 10.0.0.2
ns1 IN A 10.0.0.3
 
Old 10-07-2004, 06:03 AM   #3
Tom123
LQ Newbie
 
Registered: Oct 2003
Distribution: Redhat9
Posts: 7

Original Poster
Rep: Reputation: 0
hmm - no change

I also tried adding:

local host IN A 127.0.0.1

when I try dig @ 127.0.0.1 i get

dig: Couldn't find server ' ': Temporary failure in name resolution

white space makes no difference does it?
 
Old 10-07-2004, 08:31 AM   #4
Tom123
LQ Newbie
 
Registered: Oct 2003
Distribution: Redhat9
Posts: 7

Original Poster
Rep: Reputation: 0
ok the problem is kind of (re)solved.

It sems to be a problem with dig as nslookup works and and I can ping on the names from other hosts which is all I need.
 
Old 10-07-2004, 11:54 AM   #5
emailssent
Member
 
Registered: Sep 2004
Posts: 312

Rep: Reputation: 30
are u able to run or not

#dig -x 127.0.0.1

put
localhost A 127.0.0.1
in your zone file

and does your named.local file
look like this,

$TTL 1d
@ IN SOA localhost. root.localhost. (

1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.
1 IN PTR localhost.


--return back??
 
  


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
A simple DNS solution mangueJOE Linux - Networking 10 04-09-2006 12:45 AM
Simple DNS update question felkin Linux - Networking 1 04-17-2004 12:33 AM
simple DNS linuxnube Linux - Networking 3 01-26-2004 06:05 AM
simple dns ferretmanus Linux - Newbie 5 12-18-2003 05:36 PM
Simple DNS/Bind tutorial cbernaut Linux - Networking 0 06-19-2002 11:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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