Originally Posted by
hogman23
One more step to get it to work:
You must rename the named.conf.local to named.conf
I want to point out that this isn't correct. The default setup is for named.conf to include named.conf.local. There should be a line at the end of your named.conf which looks like this:
Code:
include "/etc/bind/named.conf.local";
For my setup, I wanted to use BIND to divert all domains ending in ".dev" to a local IP, and to act as a cache for all other requests. This is a nice easy way to set up a local testing environment. Here's how my setup looks:
named.conf.local:
Code:
zone "dev" {
type master;
file "/etc/bind/db.dev";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.192.168.1";
};
db.dev:
Code:
;
; BIND data file for dev sites
;
$TTL 604800
@ IN SOA dev. root.dev. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS dev.
@ IN A 192.168.1.10
*.dev. 14400 IN A 192.168.1.10
db.192.168.1:
Code:
;
; BIND reverse data file for dev domains
;
$TTL 604800
@ IN SOA dev. root.dev. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS dev.
10 IN PTR dev.
In this example, 192.168.1.10 is the computer hosting the ".dev" sites. I'm not an expert in this, but my setup seems to be working well. I think it's unfortunate that the syntax of these files is so obscure, compared to Apache's easy-to-read config files.
Bookmarks