Technical Tip

Setting Up Bind as a Caching Name Server (DNS) on SLED 10

tip
Reads:

816

Score:
0
0
 
Comments:

0

This is a simple how to to set up bind as a caching name server (dns) on linux. I originally set this up on a SUSE 10 desktop, but it should work on almost any Linux distro.

  1. Get Bind:

    Download the bind-9.3.3.tar.gz (or a newer version) from http://www.isc.org/index.pl?/sw/bind/
    Unzip it

    hostname:~ # tar -xvzf bind-9.3.3.tar.gz
  2. Build and Install Bind, As Root:
    hostname:~ # cd bind-9.3.3
    hostname:~ # ./configure
    hostname:~ # make
    hostname:~ # make install
  3. Test Bind Install:

    hostname:~ # named -f

    In another terminal

    hostname:~ # dig adligo.com @127.0.0.1

    You should see a responce from the local named server.

  4. Add Named To Machine Startup:
    hostname:~ # cd /etc/init.d

    Create a file named named (no pun intended) that looks like this:

    NAMED_BIN=/usr/local/sbin/named
    
    case "$1" in
        start)
        echo "Starting service named"
        $NAMED_BIN
        ;;
        stop)
        echo "Stopping service named"
        killproc -TERM $NAMED_BIN
        ;;
        *)
        echo "Usage: $0 {start|stop}"
        exit 1
        ;;
    esac

    hostname:~ # chkconfig -add named

    Try starting and stopping it:

    hostname:~ # service start named
    hostname:~ # dig adligo.com @127.0.0.1

    You should see a responce from the local name server.

    hostname:~ # service stop named

    You should NOT see a responce from the local name server.

  5. Make Your Default (or 1st name server, 127.0.0.1):

    I did this through yast.

    Click to view.

    Figure 1





User Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <p> <a> <em> <i> <cite> <code> <img> <ul> <ol> <li> <div> <dl> <dt> <dd> <b> <strong> <h1> <h2> <h3> <pre> <table> <td> <tr> <th> <blockquote>
  • Lines and paragraphs break automatically.
  • Glossary terms will be automatically marked with links to their descriptions. If there are certain phrases or sections of text that should be excluded from glossary marking and linking, use the special markup, [no-glossary] ... [/no-glossary]. Additionally, these HTML elements will not be scanned: a, abbr, acronym, code, pre.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
3 + 10 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

© 2008 Novell, Inc. All Rights Reserved.