Unix Web Hosting for Developers

Unix - Unix Like Operating Systems

There are two types of entries in named.conf:

Filed under: Guide To FreeBSD — webmaster @ 2:35 pm

There are two types of entries in named.conf: options and zones. Everything in your configuration file should be either an option, a zone, or a comment. A zone is a fancy name for a domain (while they aren’t, strictly speaking, identical, they’re close enough for our purposes). Options control how BIND operates. Options If you ignore the comments in the default named.conf, the file opens with a list of options, most of which are obscure and are commented out by default. You use options by putting them in the options section of the file, which contains the word options and a set of curly brackets. The actual options go between the brackets and are separated from one another by semicolons. Here’s a very simple options section from a named.conf file: ………………………………………………………………………………………. options { directory “/var/named”; listen-on {127.0.0.1; 209.69.178.18; }; }; ………………………………………………………………………………………. In this example, the option directory has the value /var/named , and the listen-on option lists two IP addresses. Let’s first look at the directory option, which specifies the directory where named.conf will look for and store DNS files. Beginning here will make setting up your server more straightforward. The default directory (/etc/namedb) should be fine if all you want to do is provide a nameservice for a couple of domains. However, if you are providing DNS for dozens or hundreds of clients, this directory will quickly become painfully full and will be unable to live on the root partition. The standard alternative to /etc/namedb is /var/named, which is the location for nameservice files on larger servers. I generally use /var/named even when I have just a few domains to serve, as these files tend to accumulate. The listen-on option controls which IP addresses named will accept connections on. If you have dozens of IP addresses on a single network card, you might want to confine your named to attaching to only one of those addresses. (This is particularly valuable if you have jails on your system.) BIND supports many more options, but these are perhaps the most popu- lar. You can check the full BIND Operators Guide (at http://www.isc.org/) for the complete list of options and their usage. Zones The default named.conf defines three zones, or domains, that the nameserver handles by default: the root zone, the IPv4 localhost, and the IPv6 localhost. Each of these zones has an entry in named.conf, beneath the options list. You shouldn’t need to tweak the default zones in fact, if you’re thinking of changing them, you’re almost certainly doing something wrong. But we’ll discuss what these zones are for and what they do. 279

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost PHP Web Hosting services

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Sorry, the comment form is closed at this time.

Powered by Unix Web Hosting