Having trouble configuring BIND for my webserver

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
blaszlo
Posts: 8
Joined: 2008/08/09 16:22:11
Contact:

Having trouble configuring BIND for my webserver

Post by blaszlo » 2009/04/15 15:02:35

Sorry for the newb question, but I am having a hell of a time trying to configure BIND (chrooted BIND 9.2.4 specifically) on my CentOS 4.7 machine. Very simply, I just want to make my BIND server authoritative for my domain, to let my domain name resolve by its name... Below is a copy of my named.conf

--------------------------------

//
// named.conf for Red Hat caching-nameserver
//

options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};

//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};


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

};

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

zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.ip6.local";
allow-update { none; };
};

zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};

zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};

include "/etc/rndc.key";
zone "mydomain.com" { type master; file "/var/named/chroot/var/named/mydomain.com.db"; };

--------------------------------


then, here is a copy of my zone file for mydomain.com.db


--------------------------------

$TTL 14400
@ 86400 IN SOA ns1.mydomain.com. my@emailaddress.com. (
2008021501 ; serial, todays date+todays
86400 ; refresh, seconds
7200 ; retry, seconds
3600000 ; expire, seconds
86400 ) ; minimum, seconds
mydomain.com. 86400 IN NS ns1.mydomain.com.
mydomain.com. 86400 IN NS ns2.mydomain.com.
ns1 IN A myipaddress
ns2 IN A myipaddress
mydomain.com. IN A myipaddress
localhost.mydomain.com. IN A 127.0.0.1
mydomain.com. IN MX 0 mydomain.com.
mail IN CNAME mydomain.com.
www IN CNAME mydomain.com.
ftp IN A myipaddress

--------------------------------


I am pretty much clueless... Any help is appreciated. Thanks!

finnzi
Posts: 76
Joined: 2006/01/02 21:10:55
Location: Reykjavik, Iceland
Contact:

Having trouble configuring BIND for my webserver

Post by finnzi » 2009/04/17 22:17:56

Howdy,

Try:

$TTL 14400
@ 86400 IN SOA ns1.mydomain.com. my.emailaddress.com. (
2008021501 ; serial, todays date+todays
86400 ; refresh, seconds
7200 ; retry, seconds
3600000 ; expire, seconds
86400 ) ; minimum, seconds
mydomain.com. 86400 IN NS ns1.mydomain.com.
mydomain.com. 86400 IN NS ns2.mydomain.com.
ns1 IN A myipaddress
ns2 IN A myipaddress
mydomain.com. IN A myipaddress
localhost.mydomain.com. IN A 127.0.0.1
mydomain.com. IN MX 0 mydomain.com.
mail IN CNAME mydomain.com.
www IN CNAME mydomain.com.
ftp IN A myipaddress


(Do not use @ in the SOA record. Instead replace the @ with a dot ".")

Bgrds,
Finnzi

Post Reply

Return to “CentOS 4 - Server Support”