LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Starting from scratch with BIND (https://www.linuxquestions.org/questions/linux-server-73/starting-from-scratch-with-bind-502777/)

Tralce 11-18-2006 09:45 AM

Starting from scratch with BIND
 
I have a Slackware 11 server and I am tired to death of paying No-IP for DNS. I have Webmin 1.300 to make life easier. I own 3 domains, one of which is coolspruce.net. I want to be self-contained, and not pay for DNS, but I have no idea whatsoever what to do. I'm used to fancy GUIs on the web when dealing with DNS and this obviously is nothing of the sort. Where should I start? My server has BIND on it and Webmin is set up to work with it, but I'm totally clueless, and the tutorials I've read don't mean anything to me.

trickykid 11-19-2006 07:05 AM

Okay, don't use Webmin. First step is to tell your Domain Registrar you have your own custom DNS servers and to create them, pointing to the appropiate IP Address, etc.

By default Slackware's BIND install is for a caching from the main TLD servers for all DNS resolution.

After you setup NS servers with your Registrar by using one of your domains and setting up ns1.domain.com and ns2.domain.com, the quick and easy way to setup BIND is this way:

Edit your /etc/named.conf file, it looks something like this:

Code:

options {
        version "Bind";
        directory "/var/named";
        allow-transfer { none; };
        listen-on { 66.219.45.137; };
};

zone "trickykid.org" IN {
        type master;
        file "trickykidorg.zone";
};

First option is main options, second zone is one of my own domains.

Then you'll want to create the zone file you specified from this file in /var/named/ and an example looks like this:

Code:

$TTL    86400
$ORIGIN trickykid.org.
@                      1D IN SOA      ns1.jabentley.net.      hostmaster.jabentley.net. (
                                        2006100803      ; serial
                                        6H              ; refresh 6 hours
                                        3600            ; retry 1 hour
                                        1W              ; expire 1 week
                                        1D )            ; minimum

                        1D IN NS        ns1.jabentley.net.
                        1D IN NS        ns2.jabentley.net.

        IN      MX      10      mail.trickykid.org.

        IN      A      66.219.45.137
www    IN      CNAME  @
mail    IN      CNAME  @

I'm not going to go into specifics on these files, there's plenty of documentation on the web already.

But once you've gone that far, you just fire up bind by first making it executable:

Code:

chmod +x /etc/rc.d/rc.bind
And then starting it:

Code:

/etc/rc.d/rc.bind start
Adding more zones means just adding their entries to /etc/named.conf and then the file you specify in /var/named/

Sometimes it's also a good idea to have bind running in a chroot environment.

gani 11-21-2006 05:15 AM

http://langfeldt.net/DNS-HOWTO/BIND-9/

Tralce 11-21-2006 07:18 AM

Thanks for the help guys. When I get time between school and work, I'll set it up.

mr-roboto 11-21-2006 10:03 AM

You'd serve yourself well, if you put your hands on a copy of 'DNS and Bind' by Albitz and Liu from O'Reilly. I've literally read it cover to cover and it's chocked full of useful, practical info about the range of issues of setting up and operating a name server.

I've found that (especially) when doing something for 1st time, it (ultimately) saves time and money to put your hands on one these benchmark reference books (usu from O'Reilly), to put the Web HOWTOs into perspective....

mr-roboto 11-21-2006 10:12 AM

Quote:

Originally Posted by trickykid
Okay, don't use Webmin.

<snip>

Sometimes it's also a good idea to have bind running in a chroot environment.

1) Why not use Webmin ? No criticism, just legit curiousity. I've only used it couple times and not the BIND plugin, but it was helpful.

2) Isn't best to run everything in a chroot'd env ? In some cases, it isn't pos (can't remember any off hand), otherwise isn't chroot always best ?


All times are GMT -5. The time now is 04:41 PM.