Quick Setting Bind on FreeBSD 8.1

I’m big fan of djbdns and I already write some post about djbdns and dnscache in the past.

Today, my friend ask me to install or configure bind for his FreeBSD that run 8.1 version. I ask him to follow FreeBSD manual but he said he already follow the guide but still face error.

I agree to help him set quick dns server using bind on his FreeBSD box. I think I have to test it first before give another suggestion and maybe I’ll need it in the future.

Lets get start!

Target : domain example.com will be resolved to

1. Enable bind on start up by add this line in /etc/rc.conf


2. Change a few things on /etc/namedb/named.conf

– Listen to ip

//      listen-on       {; };
listen-on       {; };

– Set forwarders to ip address of router / isp dns

forwarders {;

– Add zone for example.com

zone “example.com”{
type master;
file “/etc/namedb/master/example.com”;

3. Add zone file content (for example.com)

ee /etc/namedb/master/example.com

add fill this lines:

$TTL 3600        ; 1 hour default TTL
example.com.    IN      SOA      ns1.example.com. admin.example.com. (
2006051501      ; Serial
10800           ; Refresh
3600            ; Retry
604800          ; Expire
300             ; Negative Response TTL

; DNS Servers
IN      NS      ns1.example.com.
IN      NS      ns2.example.com.

; MX Records
IN      MX 10   mx.example.com.
IN      MX 20   mail.example.com.

IN      A

; Machine Names
localhost       IN      A
ns1             IN      A
ns2             IN      A
mx              IN      A
mail            IN      A
www             IN      A
@               IN      A

save the file.

4. Add the address to /etc/resolv.conf

echo ‘nameserver’ >> /etc/resolv.conf

5. Restart dns server

# /etc/rc.d/named restart

Stopping named.
Waiting for PIDS: 2130.
Starting named.

6. Testing resolver

# dig example.com

; <<>> DiG 9.6.2-P2 <<>> example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26178
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;example.com.           IN      A

example.com.    3600    IN      A

example.com.    3600    IN      NS      ns1.example.com.
example.com.    3600    IN      NS      ns2.example.com.

ns1.example.com. 3600   IN      A
ns2.example.com. 3600   IN      A

;; Query time: 0 msec
;; WHEN: Sun Jun 19 23:19:07 2011
;; MSG SIZE  rcvd: 121

Beautiful, quick and dirty way to get working dns server 🙂

Tips :

always watch /var/log/messages for error message(s).

in Unix | 391 Words

Testing Debian KFreeBSD

# uname -a
GNU/kFreeBSD debian 8.1-1-686 #0 Tue Jan  4 17:59:05 UTC 2011 i686 i386 Intel(R) Atom(TM) CPU N550   @ 1.50GHz GNU/kFreeBSD


# apt-get update
Ign cdrom://[Debian GNU/Linux 6.0.0 _Squeeze_ – Official kfreebsd-i386 CD Binary-1 20110205-22:58] squeeze Release.gpg
Media change: please insert the disc labeled
‘Debian GNU/Linux 6.0.0 _Squeeze_ – Official kfreebsd-i386 CD Binary-1 20110205-22:58’
in the drive ‘/media/cdrom/’ and press enter

hit CTRL+C to stop end edit /etc/apt/sources.list

# nano /etc/apt/sources.list

give # in front of deb cdrom:[Debian GNU/Linux 6.0.0 _Squeeze_ – Official kfreebsd-i386 CD Binary-1 20110205-22:58]/ squeeze main line.

Re try one more time.

t# apt-get update
Get:1 http://security.debian.org squeeze/updates Release.gpg [836 B]
Get:2 http://ftp.us.debian.org squeeze Release.gpg [1,671 B]
Ign http://security.debian.org/ squeeze/updates/main Translation-en
Ign http://ftp.us.debian.org/debian/ squeeze/main Translation-en
Ign http://security.debian.org/ squeeze/updates/main Translation-en_US
Hit http://security.debian.org squeeze/updates Release
Ign http://ftp.us.debian.org/debian/ squeeze/main Translation-en_US
Hit http://security.debian.org squeeze/updates/main Sources
Get:3 http://ftp.us.debian.org squeeze-updates Release.gpg [836 B]
Hit http://security.debian.org squeeze/updates/main kfreebsd-i386 Packages
Ign http://ftp.us.debian.org/debian/ squeeze-updates/main Translation-en
Ign http://ftp.us.debian.org/debian/ squeeze-updates/main Translation-en_US
Hit http://ftp.us.debian.org squeeze Release
Get:4 http://ftp.us.debian.org squeeze-updates Release [113 kB]
Hit http://ftp.us.debian.org squeeze/main Sources
Hit http://ftp.us.debian.org squeeze/main kfreebsd-i386 Packages
Hit http://ftp.us.debian.org squeeze-updates/main Sources/DiffIndex
Hit http://ftp.us.debian.org squeeze-updates/main kfreebsd-i386 Packages/DiffIndex
Hit http://ftp.us.debian.org squeeze-updates/main kfreebsd-i386 Packages
Fetched 117 kB in 12s (9,015 B/s)
Reading package lists… Done


# apt-get upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be upgraded:
base-files bind9-host dnsutils exim4 exim4-base exim4-config exim4-daemon-light host isc-dhcp-client isc-dhcp-common
kfreebsd-image-8-686 kfreebsd-image-8.1-1-686 libbind9-60 libdns69 libisc62 libisccc60 libisccfg62 liblwres60 python
python-minimal tzdata
21 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 15.8 MB of archives.
After this operation, 12.3 kB of additional disk space will be used.
Do you want to continue [Y/n]? y

Get:1 http://ftp.us.debian.org/debian/ squeeze/main base-files kfreebsd-i386 6.0squeeze1 [63.3 kB]
Get:2 http://security.debian.org/ squeeze/updates/main isc-dhcp-client kfreebsd-i386 4.1.1-P1-15+squeeze2 [253 kB]
Get:3 http://ftp.us.debian.org/debian/ squeeze-updates/main tzdata all 2011d-0squeeze1 [767 kB]
Get:4 http://security.debian.org/ squeeze/updates/main isc-dhcp-common kfreebsd-i386 4.1.1-P1-15+squeeze2 [314 kB]
Get:5 http://security.debian.org/ squeeze/updates/main dnsutils kfreebsd-i386 1:9.7.3.dfsg-1~squeeze1 [153 kB]
Get:6 http://ftp.us.debian.org/debian/ squeeze/main python all 2.6.6-3+squeeze6 [168 kB]
Get:7 http://security.debian.org/ squeeze/updates/main bind9-host kfreebsd-i386 1:9.7.3.dfsg-1~squeeze1 [67.2 kB]
Get:8 http://security.debian.org/ squeeze/updates/main libisc62 kfreebsd-i386 1:9.7.3.dfsg-1~squeeze1 [153 kB]
Get:9 http://ftp.us.debian.org/debian/ squeeze/main python-minimal all 2.6.6-3+squeeze6 [33.8 kB]
Get:10 http://ftp.us.debian.org/debian/ squeeze/main kfreebsd-image-8.1-1-686 kfreebsd-i386 8.1+dfsg-8 [10.9 MB]
Get:11 http://security.debian.org/ squeeze/updates/main libdns69 kfreebsd-i386 1:9.7.3.dfsg-1~squeeze1 [664 kB]
Get:12 http://security.debian.org/ squeeze/updates/main libisccc60 kfreebsd-i386 1:9.7.3.dfsg-1~squeeze1 [30.8 kB]
Get:13 http://security.debian.org/ squeeze/updates/main libisccfg62 kfreebsd-i386 1:9.7.3.dfsg-1~squeeze1 [50.3 kB]
Get:14 http://security.debian.org/ squeeze/updates/main liblwres60 kfreebsd-i386 1:9.7.3.dfsg-1~squeeze1 [50.0 kB]
Get:15 http://security.debian.org/ squeeze/updates/main host all 1:9.7.3.dfsg-1~squeeze1 [17.8 kB]
Get:16 http://security.debian.org/ squeeze/updates/main libbind9-60 kfreebsd-i386 1:9.7.3.dfsg-1~squeeze1 [38.3 kB]
Get:17 http://security.debian.org/ squeeze/updates/main exim4-config all 4.72-6+squeeze1 [464 kB]




Setting up exim4-daemon-light (4.72-6+squeeze1) …
Starting MTA: exim4.
Setting up exim4 (4.72-6+squeeze1) …
Setting up python-minimal (2.6.6-3+squeeze6) …
Setting up python (2.6.6-3+squeeze6) …
Setting up kfreebsd-image-8.1-1-686 (8.1+dfsg-8) …
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 8.1-1-686 /boot/kfreebsd-8.1-1-686.gz
Generating grub.cfg …
Found kernel of FreeBSD: /boot/kfreebsd-8.1-1-686.gz
Found kernel module directory: /lib/modules/8.1-1-686
grep: /proc/swaps: No such file or directory
Setting up kfreebsd-image-8-686 (8.1+dfsg-8) …

# uname -a
GNU/kFreeBSD debian 8.1-1-686 #0 Tue Jan  4 17:59:05 UTC 2011 i686 i386 Intel(R) Atom(TM) CPU N550   @ 1.50GHz GNU/kFreeBSD


How to install Debian KFreeBSD

This post got delayed very long, I’ve already create the video since Februari 22 2011 but still have no time to publish. I just curious on how Debian and FreeBSD work in one place called Debian KFreBSD and as always everything just start from installation step and that is the main reason why I write this post.

Lets get start!

Get latest version of Debian KFreeBSD  and do installation with VMWare.

Choose Default Install.


Choose English as installation language.


Select Location : I choose United States.

Continue reading

Learn MS Access 2003

A client want me to convert their application that use MS Access 2003 to web based application using php and mysql. I agree to do so and this post is just for myself future reference when I have to deal with other MS Access 2003 application.

Open MS Access 2003 in design mode

double click access file, choose block unsafe and click open button when you see ‘security warning’ menu.

while you click open button, make sure to press shift key.

open ms access after choose to block macro

you’ll see the application in design mode (you can access; tables, queries, forms and reports etc under objects)

Fix ‘invalid path error message” when you open ms access 2003 application

open the application and click Tools -> Database Utilities -> Linked Table Manager








select the linked tables to be updated and click OK.

wait for a while, new pop up will appear telling if ‘all selected linked tables were successfully refreshed’

Change ms access 2003 application title name

click Tools -> Startup

change application title as seen on the picture and click ok.

Open code editor for ms access 2003 forms

choose forms and click ‘code editor’ icon

new visual basic window will open, you can see the logic there.

convert ms access to mysql

I’ll update the post when I’m done with it.

Update : learn how to convert ms access to mysq step by step.

See you!

How to Cancel Paypal Recurring Payments

I love to try new thing, as slogan of my blog. Learning on demand, learning from anywhere 🙂 . I got email from opt-in mailing list yesterday, told me about software that will enhance my knowledge around marketing. All billing things handled by clickbank and they have recurring payment system in monthly basis. After test it in one day with $1 teaser I feel don’t get what I want to so I decide to cancel.

Since the payment using paypal I’ll share how to cancel clickbank recurring payment for any of you that might want to do the same as I did.

Login to paypal, see details of transaction to make sure you cancel the right one.

Continue reading

in Info | 233 Words