Install and Configure DJBDNS

Posted on Updated on


Hanya mendokumentasikan tutorial dari Pak Arief Yudhawarman

Howto Install DJBDNS

THE SOURCE CODE IS OBTAINED FROM www.djbdnsrocks.org
ALSO INCLUDED THE PATCH FOR DAEMONTOOLS, UCSPI & DJBDNS
THE SOURCE: djbdnsrocks.tar.gz

By xwings and edited by awarmanf@mega-plasma.net
Created 10/16/2003 – 21:47

Title : Install and configure djbdns
Os : Linux
Distro : Actually made for slackware but can be installed
on RedHat 9 and Fedora Core (at last FC3)
URL : … (sorry, lupa )

Domain: yourdomain.org
Another domain: yourdomain.com
IP Server: 192.168.0.254

i. Install Daemontools

# mkdir -p /var/package
# chmod 1755 /var/package
# cd /var/package
# tar zxvf daemontools-0.76.tar.gz
# cd admin
# cd daemontools-0.76
# patch -p1 < daemontools_errnopatch
# package/install

ii. Install ucspi-tcp

# cd /tmp
# tar zxvf ucspi-tcp-0.88.tar.gz
# cd ucspi-tcp-0.88
# patch -p1 < ucspi-tcp_errnopatch
# make
# make setup check

iii. Editing daemontools

# mkdir /var/service
# cd /command
# vi svscanboot

— Notes : Add /var infront of all the /service directory
/command/svc -dx /var/service/* /var/service/*/log
env – PATH=$PATH svscan /var/service 2>&1 | \

# vi /etc/inittab

— Notes : Comment out SVSCAN part

# init q
# vi /etc/inittab

— Notes : Uncomment out SVSCAN part

# ps -aux

— Check and see SVS is running on /var/service

iv. Edit /etc/resolv.conf

— Add in —
domain yourdomain.org
nameserver 192.168.0.254
————

v. Preparing for djbdns

# mkdir /var/dns
# groupadd dns
# useradd dnscache -g dns -d /var/dns -s /bin/false
# useradd dnslog -g dns -d /var/dns -s /bin/false
# useradd dns -g dns -d /var/dns -s /bin/false

vi. Install djbdns

# cd /tmp
# tar xvzf djbdns-1.05.tar.gz
# cd djbdns-1.05
# patch -p1 < djbdns_errnopatch
# make
# make setup check

vii. Bringing up djbdns – dns server

# tinydns-conf dns dnslog /var/dns/namedb 127.0.0.1
# ln -s /var/dns/namedb /var/service
# cd /var/dns/namedb/root
# ./add-ns yourdomain.org 127.0.0.1
# ./add-ns 0.168.192.in-addr.arpa 127.0.0.1
# ./add-host proxy.yourdomain.org 192.168.0.254
# ./add-mx yourdomain.org 192.168.0.254
# ./add-ns yourdomain.com 127.0.0.1
# ./add-host http://www.yourdomain.com 192.168.0.254
# ./add-alias webmail.yourdomain.com 192.168.0.254
# ./add-alias ftp.yourdomain.com 192.168.0.254
# ./add-alias groupware.yourdomain.com 192.168.0.254
# ./add-alias forum.yourdomain.com 192.168.0.254
# ./add-alias postfix.yourdomain.com 192.168.0.254
# ./add-mx yourdomain.com 192.168.0.254
# make

viii. Bringing up djbdns – dns cache server

# dnscache-conf dnscache dnslog /var/dns/dnscache 192.168.0.254
# ln -s /var/dns/dnscache /var/service
# touch /var/dns/dnscache/root/ip/192.168.0
# echo 127.0.0.1 > /var/dns/dnscache/root/servers/yourdomain.org
# echo 127.0.0.1 > /var/dns/dnscache/root/servers/yourdomain.com
# echo 127.0.0.1 > /var/dns/dnscache/root/servers/1.0.0.127.in-addr.arpa
# echo 127.0.0.1 > /var/dns/dnscache/root/servers/0.168.192.in-addr.arpa

ix. Forwarding ISP external cache
# echo 202.134.1.10 > /var/dns/dnscache/root/servers/@
# echo 202.134.0.155 >> /var/dns/dnscache/root/servers/@
# echo 1 > /var/dns/dnscache/env/FORWARDONLY
# echo 1000000 > /var/dns/dnscache/env/CACHESIZE
# echo 3000000 > /var/dns/dnscache/env/DATALIMIT
# svc -t /var/service/dnscache

Testing :

# dnsqr a http://www.yourdomain.com
1 http://www.yourdomain.com:
54 bytes, 1+1+0+0 records, response, noerror
query: 1 http://www.yourdomain.com
answer: http://www.yourdomain.com 86168 A 192.168.0.254

Maintain SVC

Restart Service
# svc -t /var/dns/dnscache
Stop
# svc -d /var/dns/dnscache

Semoga bermanfaat…. Amien…🙂

13 thoughts on “Install and Configure DJBDNS

    rocarobin at yahoo.com said:
    August 27, 2006 at 8:22 am

    good job

    awarmanf said:
    November 15, 2006 at 3:57 pm

    Link ini aku masukkan ke blogku ya? Daripada capek2 nulis lagi🙂

    Setup Linux untuk Speedy « Arief Yudhawarman said:
    November 15, 2006 at 4:14 pm

    […] Untuk install name server dan dns caching, penulis biasanya memakai djbdns karena dijamin oleh pembuatnya lebih secure (lihat The djbdns security guarantee), untuk instalasinya kebetulan rekan milis tanya-jawab@linux.or.id telah membuat blog Install and Configure DJBDNS. Jadi untuk menggunakan dns lokal tinggal menjalankan perintah ini echo “nameserver 192.168.0.254″ > /etc/resolv.conf di mana 192.168.0.254 adalah ip address linux server. […]

    invaleed responded:
    November 16, 2006 at 12:54 am

    Buat Pak Arief Yudharmawan, silahkan aja Pak, kan itu “ASLI” tulisan bapak… malah saya harusnya yg minta maaf, dah mendokumentasikannya tanpa minta izin🙂, saya pikir tutorial ini berguna bagi saya, daripada ilang ya saya dokumentasikan, maaf…🙂

    Setup Linux untuk Speedy(Copy) « azka gunawan said:
    November 16, 2006 at 2:47 am

    […] Untuk install name server dan dns caching, penulis biasanya memakai djbdns karena dijamin oleh pembuatnya lebih secure (lihat The djbdns security guarantee), untuk instalasinya kebetulan rekan milis tanya-jawab@linux.or.id telah membuat blog Install and Configure DJBDNS. Jadi untuk menggunakan dns lokal tinggal menjalankan perintah ini echo “nameserver 192.168.0.254″ > /etc/resolv.conf di mana 192.168.0.254 adalah ip address linux server. […]

    editasia said:
    January 6, 2007 at 2:59 am

    Hi P’Arif

    Saya Baca Artikel Pak Arif CUkup Bagus…., Tapi saya masih Bingung, jikalau saja mau buat DNS Cache dg Mempergunakan IP Public yg kami dapat dari Provider , apa yg kami lakukan…

    invaleed responded:
    January 6, 2007 at 4:52 am

    Kan sama aja Prinsipnya🙂

    ayat said:
    January 22, 2007 at 5:51 pm

    Pa Arif
    Salam kenal
    pa setiap saya abis extrax filenya, waktu saya kasih command patch ko sll gagal, apa saya mesti buat direktorinya dulu ..?

    patch -p1

    invaleed responded:
    January 23, 2007 at 12:59 am

    masuk dulu ke directory nya, baru di patch..🙂
    Btw, errornya apa?

    Btw lagi, nama saya bukan Pak Arif, Pak arif itu adalah yg buat Tulisan ini, dan saya hanya mendokumentasikannya di blog saya🙂

    Setup ADSL Bridge pada LINUX « BLOGnya NEWBIE said:
    July 10, 2007 at 2:49 pm

    […] guarantee), untuk instalasinya kebetulan rekan milis tanya-jawab@linux.or.id telah membuat blog Install and Configure DJBDNS. Jadi untuk menggunakan dns lokal tinggal menjalankan perintah ini echo “nameserver […]

    rahman said:
    November 13, 2007 at 9:47 am

    haduhh….. maap nih mas2 yang dah expert gtu….

    saya pke debian etch.
    Saya dah ikuti tutor di atas dari yang V. cos klo di debian kan cma pke jurus pamungkas “apt-get”

    Nah, saat semuanya selesai saya gak bisa jalanin svc ntuh….

    dnsqr a mail.jatmiko.web.id
    1 mail.jatmiko.web.id:
    connection refused

    hasilnya kek gtuh…

    bisa da yang bantu????

    plisss… NEED HELP ASAP (alagh, lebay:p

    toloooooooooooooooonnnnnnnnnnggggg

    Setup Linux untuk Speedy « Adhiewibowo’s Weblog said:
    January 3, 2008 at 3:41 pm

    […] guarantee), untuk instalasinya kebetulan rekan milis tanya-jawab@linux.or.id telah membuat blog Install and Configure DJBDNS. Jadi untuk menggunakan dns lokal tinggal menjalankan perintah ini echo “nameserver […]

    nirwanasembilanbenua said:
    October 15, 2008 at 8:46 am

    om…saya coba pake fedora 9
    ini hasil installnya untuk : ./load tcpserver rules.o remoteinfo.o timeoutconn.o cdb.a \
    dns.a time.a unix.a byte.a `cat socket.lib`
    /usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference in tcpserver.o
    /lib/libc.so.6: could not read symbols: Bad value
    collect2: ld returned 1 exit status
    make: *** [tcpserver] Error 1
    [root@localhost ucspi-tcp-0.88]# cat soket.lib
    cat: soket.lib: No such file or directory
    [root@localhost ucspi-tcp-0.88]# make
    ./load tcpserver rules.o remoteinfo.o timeoutconn.o cdb.a \
    dns.a time.a unix.a byte.a `cat socket.lib`
    /usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference in tcpserver.o
    /lib/libc.so.6: could not read symbols: Bad value
    collect2: ld returned 1 exit status
    make: *** [tcpserver] Error 1

    trus untuk djbdnsnya : ( cat warn-auto.sh; \
    echo ‘main=”$1″; shift’; \
    echo exec “`head -1 conf-ld`” \
    ‘-o “$main” “$main”.o ${1+”$@”}’ \
    ) > load
    chmod 755 load
    ( cat warn-auto.sh; \
    echo exec “`head -1 conf-cc`” ‘-c ${1+”$@”}’ \
    ) > compile
    chmod 755 compile
    ( cat warn-auto.sh; \
    echo CC=\’`head -1 conf-cc`\’; \
    echo LD=\’`head -1 conf-ld`\’; \
    cat find-systype.sh; \
    ) | sh > systype
    ( case “`cat systype`” in \
    sunos-5.*) cat hasdevtcp.h2 ;; \
    *) cat hasdevtcp.h1 ;; \
    esac ) > hasdevtcp.h
    ( ( ./compile tryulong32.c && ./load tryulong32 && \
    ./tryulong32 ) >/dev/null 2>&1 \
    && cat uint32.h2 || cat uint32.h1 ) > uint32.h
    rm -f tryulong32.o tryulong32
    cat warn-auto.sh choose.sh \
    | sed s}HOME}”`head -1 conf-home`”}g \
    > choose
    chmod 755 choose
    ./choose clr tryulong64 uint64.h1 uint64.h2 > uint64.h
    ./compile dnscache-conf.c
    ./compile generic-conf.c
    ./compile auto-str.c
    auto-str.c:7: warning: conflicting types for built-in function ‘puts’
    ( cat warn-auto.sh; \
    echo ‘main=”$1″; shift’; \
    echo ‘rm -f “$main”‘; \
    echo ‘ar cr “$main” ${1+”$@”}’; \
    case “`cat systype`” in \
    sunos-5.*) ;; \
    unix_sv*) ;; \
    irix64-*) ;; \
    irix-*) ;; \
    dgux-*) ;; \
    hp-ux-*) ;; \
    sco*) ;; \
    *) echo ‘ranlib “$main”‘ ;; \
    esac \
    ) > makelib
    chmod 755 makelib
    ./compile buffer.c
    ./compile buffer_1.c
    ./compile buffer_2.c
    ./compile buffer_copy.c
    ./compile buffer_get.c
    ./compile buffer_put.c
    ./compile strerr_die.c
    ./compile strerr_sys.c
    ./makelib buffer.a buffer.o buffer_1.o buffer_2.o \
    buffer_copy.o buffer_get.o buffer_put.o strerr_die.o \
    strerr_sys.o
    ./compile buffer_read.c
    ./compile buffer_write.c
    ./compile error.c
    ./compile error_str.c
    ./compile ndelay_off.c
    ./compile ndelay_on.c
    ./compile open_read.c
    ./compile open_trunc.c
    ./compile openreadclose.c
    ./compile readclose.c
    ./compile seek_set.c
    seek_set.c: In function ‘seek_set’:
    seek_set.c:7: warning: implicit declaration of function ‘lseek’
    ./compile socket_accept.c
    ./compile socket_bind.c
    ./compile socket_conn.c
    ./compile socket_listen.c
    ./compile socket_recv.c
    ./compile socket_send.c
    ./compile socket_tcp.c
    ./compile socket_udp.c
    ./makelib unix.a buffer_read.o buffer_write.o error.o \
    error_str.o ndelay_off.o ndelay_on.o open_read.o \
    open_trunc.o openreadclose.o readclose.o seek_set.o \
    socket_accept.o socket_bind.o socket_conn.o socket_listen.o \
    socket_recv.o socket_send.o socket_tcp.o socket_udp.o
    ./compile byte_chr.c
    ./compile byte_copy.c
    ./compile byte_cr.c
    ./compile byte_diff.c
    ./compile byte_zero.c
    ./compile case_diffb.c
    ./compile case_diffs.c
    ./compile case_lowerb.c
    ./compile fmt_ulong.c
    ./compile ip4_fmt.c
    ./compile ip4_scan.c
    ./compile scan_ulong.c
    ./compile str_chr.c
    ./compile str_diff.c
    ./compile str_len.c
    ./compile str_rchr.c
    ./compile str_start.c
    ./compile uint16_pack.c
    ./compile uint16_unpack.c
    ./compile uint32_pack.c
    ./compile uint32_unpack.c
    ./makelib byte.a byte_chr.o byte_copy.o byte_cr.o \
    byte_diff.o byte_zero.o case_diffb.o case_diffs.o \
    case_lowerb.o fmt_ulong.o ip4_fmt.o ip4_scan.o scan_ulong.o \
    str_chr.o str_diff.o str_len.o str_rchr.o str_start.o \
    uint16_pack.o uint16_unpack.o uint32_pack.o uint32_unpack.o
    ./load auto-str buffer.a unix.a byte.a
    /usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference in buffer.a(buffer_put.o)
    /lib/libc.so.6: could not read symbols: Bad value
    collect2: ld returned 1 exit status
    make: *** [auto-str] Error 1

    tolong pencerahannya…maklum baru belajar mas

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s