Getting started with bind how to build and run named with a basic recursive configuration


There are also other default locations for configuration and runtime variable files. If you have a version of named installed already, and it's a new enough version of BIND to support the -V option, you can find out what configure options were used when it was built by typing: Alternatively, you might prefer not to overwrite the files provided with the OS and want to run BIND independently - in which case you would supply options to configure to avoid collisions.

If you're happy with the defaults, then just go ahead and perform the configure step. The example below is ensuring that the build will be multi-threaded, uses OpenSSL and also includes links to libxml2 so that XML-based statistics can be configured and generated: You need current versions of openssl and libxml2. You will most likely also need libssl-dev and libxml2-dev.

This step assumes that you're not not already running BIND. If you are already running BIND , them make sure that you have a backup, or at least a plan to 'go back' to how things were, before doing this!

If you prefer, you can stop after the 'make' step and copy the binaries into place manually, renaming the older versions first. You'll either need to be running as root, or use sudo to obtain root privileges to do this: BIND will run as a recursive server with default options - all you need to do is to create an empty named.

Now you can test that the binary and your environment is good by starting named running in the foreground with the logging directed to stdout. The -g option is very useful for troubleshooting problems with named:.

You're now ready to run named as a background daemon. Before launching it, it's a good idea to set up the default options for the management tool rndc.

Launch the named daemon this is bypassing any system administration tools that your OS environment offers:. Above the dig tool is simply sending a query to your nameserver asking it for the list of NS records authoritative for ".

The steps above are really basic, but they're only intended to be a starting point. There are many options and topics that haven't been addressed, but now you have the framework, you can develop from there according to your needs.

Some things you'll most likely want to research consider are:. Best Practices for those running Recursive Servers. Best Practices for those running Authoritative Servers. The bind-users and the dhcp-users lists particularly have a long-standing and active membership. Because of this, World Wide Web WWW hyperlinks and Internet contact information can remain consistent and constant even if the current Internet routing arrangements change or the participant uses a mobile device.

Internet domain names are easier to remember than IP addresses such as Users take advantage of this when they recite meaningful Uniform Resource Locators URLs and e-mail addresses without having to know how the computer actually locates them. DNS servers there are a lot, but BIND may be the most used on the web, I will not start a discussion about if it is the best or there are better, just that it is one of the most used. On Unix-like operating systems it is the de facto standard.

Other important features of BIND 9 include: But for sure it is in your software repository, I will focus this tutorial on Debian, Arch Linux and Slackware, of course Ubuntu and other Debian derivatives are also covered.

The file we need to edit to configure master and slave zones is: You may want to save a copy of every file you will edit before doing so, in case you screw things up. The first thing you may want to check is where your zone files are stored, and that is not the same for each distribution, but you can change that if you want.

Where your zone files are, is defined in the options section of the named. To create a master zone, edit the file named.

Then create the file linux For the visitors of your servers, any DNS server is the same and there is no difference between masters or slaves, so you should define one master and as many slaves as you want anything between 2 to 4 slaves is OK.