running multiple daemonized instances of BIND9.2 on Windows 2000
Nick
nickjeffrey at hotmail.com
Mon Nov 3 21:29:04 UTC 2003
Here's the answer you've all been waiting for with baited breath!
Please be careful with line breaks if you're cutting/pasting this into
one of your own systems.
To run multiple instances of BIND9.2 on a win32 platform, you will
need a few tools from the Windows 2000 resource kit. Specifically,
you will need reg.exe, instsrv.exe, and srvany.exe. Copy these three
files to the c:\winnt\system32\dns\bin folder on your primary and
secondary name servers.
Create the services on each name server with these commands. Please
note that the names shown below are for example purposes only - you
can call your services whatever you want.
instsrv named_dmz1 c:\winnt\system32\dns\bin\srvany.exe
instsrv named_dmz2 c:\winnt\system32\dns\bin\srvany.exe
instsrv named_dmz3 c:\winnt\system32\dns\bin\srvany.exe
instsrv named_dmz4 c:\winnt\system32\dns\bin\srvany.exe
Run these commands on each name server to perform the necessary
registry updates for the services you just created. This example uses
four different services, with the names named_dmz1, named_dmz2,
named_dmz3, and named_dmz4. Adjust as necessary for your situation.
reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz1\Parameters
reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz1\Parameters
/v Application /t REG_SZ /d "c:\winnt\system32\dns\bin\named.exe"
reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz1\Parameters
/v AppParameters /t REG_SZ /d "-c
c:\winnt\system32\dns\etc\named_dmz1.conf -f"
reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz2\Parameters
reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz2\Parameters
/v Application /t REG_SZ /d "c:\winnt\system32\dns\bin\named.exe"
reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz2\Parameters
/v AppParameters /t REG_SZ /d "-c
c:\winnt\system32\dns\etc\named_dmz2.conf -f"
reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz3\Parameters
reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz3\Parameters
/v Application /t REG_SZ /d "c:\winnt\system32\dns\bin\named.exe"
reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz3\Parameters
/v AppParameters /t REG_SZ /d "-c
c:\winnt\system32\dns\etc\named_dmz3.conf -f"
reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz4\Parameters
reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz4\Parameters
/v Application /t REG_SZ /d "c:\winnt\system32\dns\bin\named.exe"
reg.exe add HKLM\SYSTEM\CurrentControlSet\Services\named_dmz4\Parameters
/v AppParameters /t REG_SZ /d "-c
c:\winnt\system32\dns\etc\named_dmz4.conf -f"
You have now completed the necessary registry modifications to make
each of services live together in harmony. Please note that since
you're now running multiple versions of BIND, each instance will need
a unique config file, which is why the "AppParameters" registry value
you created with the above commands specifies a unique config file for
each instance of BIND.
Here's another gotcha: since there a four instances of BIND running on
the same machine, you need to have four unique IP addresses on the
name server, and each instance of BIND must be listening on a
different IP address. Here's a snipped of a config file that shows
you how to force BIND to listen on a specific IP address:
options {
directory "c:\winnt\system32\dns\etc\namedb"; # Working
directory
pid-file "named_dmz2.pid"; # Put pid file in working dir
(must be unique if multiple BIND instances are running)
listen-on {192.168.2.202;}; # listen on this IP address only
};
In this example, you can start/stop the services using the GUI
interface, or the command-line equivalents would be:
net stop named_dmz1
net start named_dmz1
Ta-daa! You now have multiple instances of BIND running in a win32
environment.
More information about the bind-users
mailing list