DNS server configuration help! (BIND)
Results 1 to 7 of 7

Thread: DNS server configuration help! (BIND)

  1. #1
    Member
    Join Date
    Aug 2002
    Posts
    38

    DNS server configuration help! (BIND)

    Hiii,
    I have been trying to learn more about DNS servers. Soo i have read a bit and want to try to set one up on my LAN but it is a little tricky wandering if anyone can help? This is what im tyring to do: I have a LAN that has 1 Redhat machine(Firewall/Router-DNS Server) and 2 windows machines behind it.
    I want to set up the DNS server on the LINUX machine. Cause right now the WINDOWS machines are configured soo that there DNS servers are pointing to my ISP DNS server. I want the LINUX machine to do the DNS queries or FORWARD them to my ISP DNS Server.
    Im using:
    Redhat 7.3(2.4.20)
    BIND-9.2.2rc1

    Installed it by:
    ./configure
    make
    make install

    I have been using the "Redhat 7.3 Bible" as a reference.

    < EDIT > OK this is what i got soo far now:
    I created the file /etc/named.conf which has this in it:
    options {
    directory "/var/named";
    forwarders { <IP address of forwarder>; };
    forward only;
    };


    And running named-checkconf shows no errors.
    I also created a directory /var/named but am confused on the next steps! Any Help?

  2. #2
    Senior Member
    Join Date
    Jan 2003
    Posts
    274
    I'm on my way to work, so I can't post a step-by-step at this moment. In the meantime, try www.justlinux.com and search for "BIND setup" or something similar. I know I've read some detailed instructions there. If that doesn't do it for you, I'll try to walk you through it after I get home tonight.

  3. #3
    Junior Member
    Join Date
    Jan 2003
    Posts
    15
    Try this:
    http://www.zdnet.com.au/newstech/os/...0259780,00.htm
    and this too:
    google.com

  4. #4
    Senior Member
    Join Date
    Jul 2001
    Posts
    461
    Where exactly are you having trouble?

    This should actually be fairly simple. The named.conf file which comes with the RPM(or with the tar file I suspect you downloaded) should be set up exactly as it needs to be in order to perform as a caching name server. I have never set bind up as a forwarding name server, so I can't comment about that.

    If you need a named.conf for a caching name server, here is one. This comes from bind 8.1 installed via RPM on a redhat 8.0 machine I have access to.
    *****************************************************************
    // generated by named-bootconf.pl

    options {
    directory "/var/named";
    /*
    * If there is a firewall between you and nameservers you want
    * to talk to, you might need to uncomment the query-source
    * directive below. Previous versions of BIND always asked
    * questions using port 53, but BIND 8.1 uses an unprivileged
    * port by default.
    */
    // query-source address * port 53;
    };

    //
    // a caching only nameserver config
    //
    controls {
    inet 127.0.0.1 allow { localhost; } keys { rndckey; };
    };
    zone "." IN {
    type hint;
    file "named.ca";
    };

    zone "localhost" IN {
    type master;
    file "localhost.zone";
    allow-update { none; };
    };

    zone "0.0.127.in-addr.arpa" IN {
    type master;
    file "named.local";
    allow-update { none; };
    };

    include "/etc/rndc.key";
    *************************************************************************

    Then of course you need to make sure that your firewall is allowing it to make the queries.

    Assuming that the install scripts placed the proper startup scripts in the correct places, turn bind on in your default run level by

    chkconfig named on

    Then start the service

    service named start

    That should be all you need.

    Of course, make sure your firewall is allowing your internal machines to use bind for resolution.

    Good luck,

    IchNiSan

  5. #5
    Member
    Join Date
    Aug 2002
    Posts
    38


    I installed the "bind-9.2.2rc1.tar" and it didnt install the file /etc/maned.conf in its directory and didnt create the directory /var/named and i read on the mailing list you have to create those yourself.(maybe i should have installed the RPM) but im going to copy and paste this in the /etc/named.conf file and try that.... am i suppose to have anything in the /var/named directory?

  6. #6
    Senior Member
    Join Date
    Jul 2001
    Posts
    461
    Yes, there should be several files in the /var/named directory.

    I don't have time at the moment, on my way from work to a class in a moment, but there should at least be the files referenced by the named.conf file.

  7. #7
    Senior Member
    Join Date
    Jul 2001
    Posts
    461
    OK, there should be three files in /var/named, at least.

    localhost.zone
    named.ca
    named.local

    localhost.zone should look like this by default...

    ********************************************************
    $TTL 86400
    $ORIGIN localhost.
    @ 1D IN SOA @ root (
    42 ; serial (d. adams)
    3H ; refresh
    15M ; retry
    1W ; expiry
    1D ) ; minimum

    1D IN NS @
    1D IN A 127.0.0.1
    ********************************************************

    The named.ca file is a root hints file, which tells bind where to start when resolving names, you can get the current one here...

    ftp://rs.internic.net/domain/named.root

    The last file is named.local, and looks like this.
    ********************************************************

    $TTL 86400
    @ IN SOA localhost. root.localhost. (
    1997022700 ; Serial
    28800 ; Refresh
    14400 ; Retry
    3600000 ; Expire
    86400 ) ; Minimum
    IN NS localhost.

    1 IN PTR localhost.

    *******************************************************

    Also, I don't know what you have been reading, but if you are really interested in learning about this, your should pick up the Orielly book DNS and BIND 4th edition, which covers bind 9(I dont have it yet,, but Im thinking about replacing earlier version with it.) It is a bit dry, and may take a while to get through it all, but it is a very very good reference.

    Check it out here...
    http://www.oreilly.com/catalog/dns4/

    Good luck,
    IchNiSan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •