-
DNS help PLEASE!!
i have been struggling with this DNS setup on Red Hat 9 for about 3 days now and i just can seem to get things working. any advice would be a great help here. here is what i have as of now:
(named.conf):
Code:
options {
directory "/var/named"; }
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";
allow-update { none; };
};
zone "mydomain.com" IN {
type master;
file "mydomain.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
include "/etc/rndc.key";
and here is the other file
(mydomain.zone)
Code:
$TTL 86400
$ORIGIN localhost.
@ SOA mydomain.com. root.mydomain.com. (
420012
3H
15M
1W
1D
)
NS ns1.mydomain.com.
NS ns2.mydomain.com.
A xxx.xxx.xxx.xxx
ftp CNAME mydomain.com.
mail CNAME mydomain.com.
ns CNAME mydomain.com.
www CNAME mydomain.com.
-
First of all, is it really "mydomain.com" you are trying to configure?
And are you the owner of it?
Anyhow, you have to configure ns1 and ns2 as well.
I.e.
Code:
NS ns1.mydomain.com.
NS ns2.mydomain.com.
A xxx.xxx.xxx.xxx
ns1 A xxx.xxx.xxx.xxx
ns2 A xxx.xxx.xxx.xxx
ftp CNAME mydomain.com.
mail CNAME mydomain.com.
ns CNAME mydomain.com.
www CNAME mydomain.com.
Important that you do NOT use CNAME on those two records!
When you have done so, can you use another computer on the same network, pointing it's DNS server to this server, and try to ping "www.mydomain.com"
Or from this server you should try
Code:
dig @127.0.0.1 mydomain.com any any
The result should be something like
Code:
; <<>> DiG 9.2.4 <<>> @127.0.0.1 mydomain.com any any
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6864
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 4
;; QUESTION SECTION:
;mydomain.com. IN ANY
;; ANSWER SECTION:
mydomain.com. 14400 IN SOA ns1.mydomain.com. root.mydomain.com. 420012 10800 900 604800 86400