PDA

View Full Version : DNS Not able to resolve http://domainname.com


nidhintomson
25th June 2008, 15:14
Hi All
I have configured DNS as per DNS how to in howtoforge.com
http://howtoforge.com/linux_bind9_and_caching_nameserver

I configured DNS for the domain domainname.net. My setup works perfectly fine other than in one palce.

If i ping www.domainname.net it responds fine

If i ping domainname.net it says ping cannot find host name.



I am herewith attaching the zone entry for domainname.net in /etc/named.conf

zone "domainname.net" IN {
type master;
file "domainname.net.zone";
allow-update { none; };
};


and /var/named/chroot/var/named/domainname.net.zone is as follows :-




$TTL 86400
@ IN SOA @ root.nameserver.domainname.net. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS nameserver.domainname.net.
nameserver IN A 192.168.0.19
www IN A 192.168.0.19
IN A 192.168.0.19




what is wrong with my setup ? how do we setup www.domainname.net as well as domainname.net ?


I tried this setup on an FC8 Machine and installed all the packages required using yum.

Looking forward to hear from you

Thanks and Regards
Nidhin Tomson

Acidus
25th June 2008, 18:11
hi there..
check this line:

IN SOA @ root.nameserver.domainname.net.

should look like:

@ IN SOA yourhostname.yourdomain.net. root.yourhostname.yourdomain.net.

same for reverse zones.

also check yours resolv.conf file.

regards,!

nidhintomson
26th June 2008, 07:40
hi there..
check this line:



should look like:

@ IN SOA yourhostname.yourdomain.net. root.yourhostname.yourdomain.net.

same for reverse zones.

also check yours resolv.conf file.

regards,!




Hi Acidus
Thanks for the response. I changed the zone file as per ur instructions . but still ti doesnt work. This is my updated zone file.


$TTL 86400
@ IN SOA nameserver.domainname.net root.nameserver.domainname.net. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS nameserver.domainname.net.
nameserver IN A 192.168.0.19
www IN A 192.168.0.19
IN A 192.168.0.19



My /etc/resolve.conf is as follows :-

nameserver 127.0.0.1


My hostname is nameserver



But still the same error is getting

Looking forward to hear from you

Thanks and Regards
Nidhin Tomson

c4rdinal
26th June 2008, 12:00
check DNS service if it is running.
what's in the logs?

topdog
26th June 2008, 13:26
You need to add this to your zone file
@ IN A 192.168.0.19

nidhintomson
26th June 2008, 15:50
You need to add this to your zone file
@ IN A 192.168.0.19

Thanks topdog
Your help worked for me. now www.domain.net and domain.net is pinging fine.

I have one more doubt related to this.

How to we do if we have to ping www.nameserver.domain.net or www.mail.domainname.net ?

Like in real world scenarios where we have to get the mail login page if we browse

mail.domainname.net or
www.mail.domainname.net

How do we setup this ?

Looking forward to hear from you

Thanks and Regards
Nidhin Tomson

topdog
26th June 2008, 15:54
mail.domainname.net IN A ip_address
www.mail.domainname.net IN A ip_address

nidhintomson
27th June 2008, 08:16
mail.domainname.net IN A ip_address
www.mail.domainname.net IN A ip_address

Hi Topdog
Thanks for help. Now almost my problems are solved. Thanks again for the help. I am herewith pasting my latest zone file again.

$TTL 86400
@ IN SOA nameserver.domainname.net root.nameserver.domainname.net. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS nameserver.domainname.net.
@ IN A 192.168.0.19
nameserver IN A 192.168.0.19
www IN A 192.168.0.19
www.mail IN A 192.168.0.19
ftp IN A 192.168.0.19


Is there a better way of doing this (I doubt wether what i have done is a professional config) ? I mean like using CNAME and all.

If any one can reconfigure the same with using CNAME and all it would be of great help to me as well as newbies like me.


Looking forward to hear from you

Thanks and Regards
Nidhin Tomson

topdog
27th June 2008, 17:13
It seems fine to me.

nidhintomson
30th June 2008, 09:01
Thanks to all who helped me out of this trouble..

Thanks to one and all