I used to use djbdns in every situation I have, so far I use it in FreeBSD and Ubuntu server 8.0.4 LTS I always try to install djbdns as first option for dns stuff.
Yesterday I met situation where clarkconnect 4.2 installed as internet gateway in internet cafe, the owner choose clarkconnect as internet gateway for it’s easy of deployment and maintenance.
The problem is dns, current ISP dns seem to work strangely. He ask me to give solution for it. After think for while I decide to learn installing djbdns in clarkconnect but due to time limit I choose to install bind 🙂
Bind Installation process in Clarkconnect I did :
1. See machine and kernel info
[root@netcafe init.d]# uname -a
Linux netcafe.net1 2.6.18-53.1.13.2.cc #1 SMP Wed Feb 27 18:26:42 EST 2008 i686 i686 i386 GNU/Linux
2. Update and upgrade
[root@netcafe ~]# apt-get update
Updating apt-get details: Ok
Get:1 ftp://apt.clarkconnect.com System release [1137B]
Get:2 ftp://rh.apt.clarkconnect.com System release [926B]
Fetched 2063B in 30s (67B/s)
Hit ftp://rh.apt.clarkconnect.com System/os pkglist
Hit ftp://apt.clarkconnect.com System/os pkglist
Hit ftp://rh.apt.clarkconnect.com System/os release
Hit ftp://apt.clarkconnect.com System/os release
Hit ftp://rh.apt.clarkconnect.com System/updates pkglist
Hit ftp://apt.clarkconnect.com System/updates pkglist
Hit ftp://rh.apt.clarkconnect.com System/updates release
Hit ftp://apt.clarkconnect.com System/updates release
Hit ftp://apt.clarkconnect.com System/contribs pkglist
Hit ftp://apt.clarkconnect.com System/contribs release
Hit ftp://apt.clarkconnect.com System/developer pkglist
Hit ftp://apt.clarkconnect.com System/developer release
Reading Package Lists…
Building Dependency Tree…
[root@netcafe ~]#
3. Install bind
[root@netcafe sources.list.d]# apt-get install bind
Reading Package Lists…
Building Dependency Tree…
The following NEW packages will be installed:
bind
0 upgraded, 1 newly installed, 0 removed and 0 not upgraded.
Need to get 595kB of archives.
After unpacking 1930kB of additional disk space will be used.
Get:1 ftp://rh.apt.clarkconnect.com System/updates bind 20:9.2.4-28.0.1.el4 [595kB]
Fetched 595kB in 1m28s (6710B/s)
Committing changes…
Preparing…               ##################################################
bind                       ##################################################
Done.
[root@netcafe sources.list.d]#
4. Start Bind
[root@netcafe init.d]# /etc/init.d/named start
Starting named:                                           [ OK ]
[root@netcafe init.d]#
[root@netcafe init.d]# ps ax | grep named
5. Testing resolve domain
[root@netcafe init.d]# dig @172.88.1.2 palcomtech.com
; <<>> DiG 9.2.4 <<>> @172.88.1.2 palcomtech.com
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47597
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 4, ADDITIONAL: 2
;; QUESTION SECTION:
;palcomtech.com.                       IN     A
;; ANSWER SECTION:
palcomtech.com.        3542   IN     A      125.162.126.142
palcomtech.com.        3542   IN     A      125.162.126.123
palcomtech.com.        3542   IN     A      125.162.126.130
;; AUTHORITY SECTION:
palcomtech.com.        86342  IN     NS     ns2.mydomain.com.
palcomtech.com.        86342  IN     NS     ns3.mydomain.com.
palcomtech.com.        86342  IN     NS     ns4.mydomain.com.
palcomtech.com.        86342  IN     NS     ns1.mydomain.com.
;; ADDITIONAL SECTION:
ns1.mydomain.com.      172722 IN     A      64.94.117.193
ns2.mydomain.com.      172722 IN     A      64.94.31.67
;; Query time: 2 msec
;; SERVER: 172.88.1.2#53(172.88.1.2)
;; WHEN: Wed Aug 20 11:17:54 2008
;; MSG SIZE rcvd: 193
Pakai server default :
[root@netcafe init.d]# dig palcomtech.com
; <<>> DiG 9.2.4 <<>> palcomtech.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28302
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;palcomtech.com.                       IN     A
;; ANSWER SECTION:
palcomtech.com.        85283  IN     A      172.88.1.8
;; Query time: 1 msec
;; SERVER: 172.88.1.10#53(172.88.1.10)
;; WHEN: Wed Aug 20 11:18:22 2008
;; MSG SIZE rcvd: 48
[root@netcafe init.d]#
[root@netcafe init.d]# dig @172.88.1.2 detik.com mx
; <<>> DiG 9.2.4 <<>> @172.88.1.2 detik.com mx
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18625
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 2
;; QUESTION SECTION:
;detik.com.                    IN     MX
;; ANSWER SECTION:
detik.com.             86400  IN     MX     10 mail3.agrakom.com.
;; AUTHORITY SECTION:
detik.com.             86394  IN     NS     ns1.detik.net.id.
detik.com.             86394  IN     NS     ns1.duniadetik.com.
detik.com.             86394  IN     NS     agra1.duniadetik.com.
;; ADDITIONAL SECTION:
ns1.detik.net.id.      86394  IN     A      203.190.240.131
ns1.detik.net.id.      2988   IN     AAAA   2402:a000:0:3::131
;; Query time: 3202 msec
;; SERVER: 172.88.1.2#53(172.88.1.2)
;; WHEN: Wed Aug 20 11:26:39 2008
;; MSG SIZE rcvd: 180
[root@netcafe init.d]#
Great, I don’t think if the process is simple 🙂
At least I learn how to use bind as dns resolver in clarkconnect 😉