Bind host

From 42Experiment

Jump to: navigation, search
Language: English  • Français

Contents

[edit] Hosting one's domain with BIND on Linux

[edit] Install bind

Distribution-specific ... Might be:

 sudo apt-get install bind9

[edit] Configure bind in order to resolve other .42 domains

As seen on this page, one has to edit the file named.conf, often located under /etc/bin, and add the following lines:

 zone "42" IN { 
     type forward;
     forwarders {91.191.147.246; 91.191.147.243; 79.143.244.68; };
 };


[edit] Adapt one's named.conf

Then, you have to tell bind that you want to manage a DNS zone (yourdomain.42). In order to do so, you must again edit the file named.conf. On some distributions, you should rather edit named.conf.local for this.

 zone "yourdomain.42" {
   type master;
   file "/etc/bind/zones/yourdomain.42";
   allow-query { any; };
 };

TODO: we should talk about slaves, here.

[edit] Create the zone file

Now you have to create your so-called zone file, which contains actual information that BIND will answer when it is queried them for. To help you, you might use yoyo's generator: http://pgl.yoyo.org/as/bind-zone-file-creator.php It will make basic information for you, so that you have only to complete them. FIXME

[edit] Check the files

Once these files have been edited, and zone files created/modified, it is wiser to check them before asking bind to actually use them. No bad surprise this way. In order to do so, there are two small tools:

 named-checkconf

Pass it the path to named.conf on the command-line, and it will tell you about any error there might be. If it outputs nothing, then everything is OK.

 named-checkzone

Pass it your domain name (e.g. yourdomain.42) as first argument, and the path to a zone file (e.g. yourdomain.42) as second argument. If everything's fine, it should give you a nice OK.

[edit] Taking the new information into account

Now that you're pretty sure your configuration is OK, you must tell bind to take them into account. There's the rude way: close bind and rerun it. However bind is nicely designed, so it can reload information without restarting. Use the command:

 rndc reload

[edit] Dig

Dig is the most popular of the tools to test DNS servers. It certainly requires a full page only for himself.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox