Configuration of BIND DNS server, I'm lost
Question
I hope you'll forgive me for thinking that configuring a DNS server would be easy. It turns out it is quite hard... especially if you never did it before.
To recap a little, I previously asked if someone could recommend a personal DNS server for Windows XP for use in a development project.
My basic wish is to host a DNS server that represents the following lookup table:
Address | IP
------------------+--------------
*.devdomain1.dev | 192.168.10.2
*.devdomain2.dev | 192.168.10.2
Do you know how to setup this in BIND 9? Or maybe there is an easier solution that I've overlooked. I know I could add the individual subdomains in my HOSTS file but since we have a lot of subdomains which has to be maintained on several dev machines I would rather have a simple wildcard setup.
Solution
A zone file like this should suffice (on my system this would be in /etc/bind/zones/devdomain2.dev.hosts)
devdomain2.dev. IN SOA localhost. johannesh.devdomain2.dev. (
1102522753
10800
3600
604800
38400
)
devdomain2.dev. IN NS localhost.
*.devdomain2.dev. IN A 192.168.10.2
Then my /etc/bind/named.conf.local would reference this as follows
zone "devdomain2.dev" {
type master;
file "/etc/bind/zones/devdomain2.dev.hosts";
};
(Note you could adapt this just wildcard .dev domain entirely, or set up another zone for devdomain1)
OTHER TIPS
How far have you got?
You could just create a zone for .dev and use a wildcard record