Domain Name System (DNS)
Domain Name System Server or DNS Server was developed for the purpose of converting names to digital address that a computer can understand.
As a typical example, in a school a student will have an ID with the name and the student ID number. ID number is much difficult to memorize. Imagine that in a class room with 50 students. The teacher will identify each student with its unique school ID number. Then a student ID number is called all the students will try to look at each ID’s each time they are called. On the part of the teacher multiple ID number per room will be memorized. Wow that’s a lot of headache. When compared to a name based approach the teacher can call the name of the student and the student automatically understand that he is called.
Domain Name System works in that way. The computer cannot understand named based approach but only numeric. DNS serves as the translator of named base approach to a numeric approach that is edible by computer.
OpenBSD DNS
In OpenBSD DNS is part of the base installation of the Operating System thus we need to plan for the services that we need during installation.
Assuming that we select all the base packages when installing, we are assured that DNS is installed. We only need to modify some parameters in the configuration file. By the way OpenBSD uses BIND (Berkeley Internet Name Domain) form ISC (Internet Systems Consortium, Inc).
OpenBSD DNS Configuration
Edit rc.conf.local
[mylogin@hostname folder]# vi /etc/rc.conf.local
named_flags="" # note use two double-quotes
named_user=named # note to leave this as per standard setting
named_flags="-t /var/named -u named" # note use two double-quotes
This is already tested as a chroot environment of bind
Where:
-t /var/named = specified the chroot environment
-u named = non-privileged user
Add rndc.key
As root issuse this command:
[mylogin@hostname folder]# rndc-confgen | tee /etc/rndc.conf
This will generate rndc.conf and rndc.key into /etc. From the output screen copy the bottom line that states name.conf to /var/named/etc/named.conf and uncomment it. Then issue the following command.
[mylogin@hostname folder]# kill `cat /var/run/named.pid`
/usr/sbin/named -t /var/named -u named -d 3
rndc status
Where:
-t /var/named = specified the chroot environment
-u named = non-privileged user
-d 3 = debug level of 3
restart
This will automatically start BIND DNS Service Solution every reboot.
Tell a friend
Previous page: OpenBSD Color Vi/VIM Editor Next page: Dynamic Host Configuration Protocol or DHCP Server

