Private DNS newbie question.
Ga Mu
gamu829 at yahoo.com
Wed Oct 8 00:22:22 UTC 2003
Ken wrote:
> I am trying to setup a small DNS on a private network - strictly for
> learning. I have a single small PC dedicated to the DNS job and it has
> RH-9. My problem is that there is very little info available such a
> private DNS - it is all for real Internet DNS's.
>
> I have tried several examples from the 'net, and copied one verbatium from
> the RH9 Bible. All of them give the same error from the DNS machine or
> any others on the network...
>
> ;; connection timed out; no servers could be reached
>
> /etc/init.d/named starts ok and doesn't post any errors in the message
> log.
> named-checkconf and named-checkzone run ok. resolv.conf follows their
> examples.
> I can ping anything from any direction.
>
> Since even the very minimal examples give the same time out message no
> matter what I do, I am beginning to think that I have something more
> basic that is wrong - like I didn't load something on the install of
> Linux.
>
> Is there something that should be running besides /etc/init.d/named
> daemon?
>
> Does anyone have some very simple named, zone and resolv scripts that I
> can use to test and build on?
>
> Thanks
> Ken
>
The preferred way of starting services on a RedHat system is via the
'service' command. E.g.,
service <daemon name> <command>
where <daemon name> is 'named' in this case and <command> can be
'start', 'stop', 'restart', and perhaps another one or two I can't
remember. Named is the only daemon that should be running. After
starting the daemon, do a "ps ax | grep named" and you should see:
# ps ax | grep named
4883 ? S 0:00 /usr/sbin/named -u named
5028 pts/0 S 0:00 grep named
#
If your config and zone files are clean per named-checkconf and
named-checkzone, then those files are not the problem. You appear to
have the named package installed, othrewise you wouldn't have the named*
commands.
I am doing what you are trying to do on my home LAN. I have a local
master domain (localdomain.net) and cache "real" Internet names. My
config files are below. You can remove the logging clause if you do not
want to log DNS queries.
Good Luck!
Greg
/etc/named.conf:
*****************************************
include "/etc/rndc.key"; ## this file is created when
## the package is installed.
options {
directory "/var/named";
pid-file "/var/run/named/named.pid";
};
logging {
channel querylog {
file "/var/named/query.log" versions 8;
print-time yes;
};
category queries { querylog; };
};
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." in {
type hint;
file "named.ca";
};
zone "localhost" in {
type master;
file "localhost.zone"; ## this file comes w/RedHat
## but is named 'named.local'
## I think...
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "0.0.127.in-addr.arpa.zone"; ## this file comes w/RedHat
};
zone "localdomain.net" in {
type master;
file "localdomain.net.zone";
};
zone "1.168.192.in-addr.arpa" in {
type master;
file "1.168.192.in-addr.arpa.zone";
};
*****************************************
/var/named/localdomain.net.zone:
*****************************************
$TTL 86400
@ IN SOA server.localdomain.net. root.localdomain.net. (
2003100715 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)
IN NS server.localdomain.net.
IN NS win2ks.localdomain.net.
IN NS compaq.localdomain.net.
IN MX 10 server.localdomain.net.
router IN A 192.168.1.1
server IN A 192.168.1.11
server2 IN A 192.168.1.12
server3 IN A 192.168.1.13
win2ks IN A 192.168.1.21
win98se IN A 192.168.1.25
compaq IN A 192.168.1.31
screamer IN A 192.168.1.41
;
; foreign addresses
;
ntp1 IN A 207.126.97.57
ntp2 IN A 204.74.68.55
*****************************************
/var/named/1.168.192.in-addr.arpa.zone:
*****************************************
$TTL 86400
@ IN SOA server.localdomain.net. root.localdomain.net. (
2003100711 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)
IN NS server.localdomain.net.
IN NS compaq.localdomain.net.
IN NS win2ks.localdomain.net.
1 IN PTR router.localdomain.net.
11 IN PTR server.localdomain.net.
12 IN PTR server2.localdomain.net.
13 IN PTR server3.localdomain.net.
21 IN PTR win2ks.localdomain.net.
25 IN PTR win98se.localdomain.net.
31 IN PTR compaq.localdomain.net.
41 IN PTR screamer.localdomain.net.
*****************************************
More information about the bind-users
mailing list