Domain Name Service(DNS) is an Internet naming system which resolves host names to IP addresses and IP addresses to host names. We will be creating DNS server, to do so we need to configure ‘named’ and ‘zone’ files.
[symple_box color=”blue” fade_in=”false” float=”center” text_align=”left” width=””]
Things to do
[/symple_box]
- Check for BIND files or install it.
- Create and configure /etc/named.conf.
- Create /var/named and download root server files.
- Configure zone files.
- enable DNS services.
Note: server IP is 192.168.16.128 and DNS server name is data.serv
Steps to configure BIND DNS in Oracle Solaris 10.
[symple_box color=”gray” fade_in=”false” float=”center” text_align=”left” width=””]
Step 1
pkginfo -x | grep -i bind #check for installed DNS files
SUNWbind BIND DNS Name server and tools
SUNWbindr BIND Name server Manifest
SUNWdbus-bindings-priv Simple IPC library based on messages
SUNWdbus-bindings-priv-devel Simple IPC library based on messages – development files
SUNWlxml-python The XML library – Python bindings
SUNWlxsl-python The XSLT library – Python bindings
SUNWpostgr-82-tcl Tcl binding library for PostgreSQL 8.2
SUNWpostgr-83-tcl Tcl binding library for PostgreSQL
SUNWpython26-lxml Pythonic 2.6 binding for the libxml2 and libxslt libraries
[/symple_box]
[symple_box color=”gray” fade_in=”false” float=”center” text_align=”left” width=””]
Step 2
vi /etc/named.conf #create named.conf file
options {
directory “/var/named”;
};
zone “.” {
type hint;
file “db.cache”;
};
#Reverse Zones###
zone “0.0.127.in-addr.arpa” {
type master;
file “db.127.0.0”;
};
zone “16.168.192.in-addr.arpa” {
type master;
file “db.192.168.16”;
};
###Forward Zone###
zone “data.serv” {
type master;
file “db.data.serv”;
};
[/symple_box]
[symple_box color=”gray” fade_in=”false” float=”center” text_align=”left” width=””]
Step 3
cd /var/named
/usr/sfw/bin/wget ftp://ftp.rs.internic.net/domain/named.root
mv named.root db.cache #after downloading named.root from Internet
[/symple_box]
[symple_box color=”gray” fade_in=”false” float=”center” text_align=”left” width=””]
Step 4
vi /var/named/db.127.0.0
@ IN SOA ns1.data.serv. postmaster.data.serv.(
2014092502 ; Serial Number
7200 ; Refresh Interval
3600 ; Retry Interval
86400 ; Expiry
600 ) ; MINTTL
NS ns1.data.serv.
1 IN PTR localhost.
[/symple_box]
[symple_box color=”gray” fade_in=”false” float=”center” text_align=”left” width=””]
Step 5
vi /var/named/db.192.168.16
@ IN SOA ns1.data.serv. postmaster.data.serv.(
2014092502 ; Serial Number
7200 ; Refresh Interval
3600 ; Retry Interval
86400 ; Expiry
600 ) ; MINTTL
NS ns1.data.serv.
128 IN PTR ns1.data.serv.
[/symple_box]
[symple_box color=”gray” fade_in=”false” float=”center” text_align=”left” width=””]
Step 6
vi /var/named/db.data.serv
@ IN SOA ns1.data.serv. postmaster.data.serv.(
2014092502 ; Serial Number
7200 ; Refresh Interval
3600 ; Retry Interval
86400 ; Expiry
600 ) ; MINTTL
NS ns1.data.serv.
ns1 IN PTR 192.168.16.128
[/symple_box]
[symple_box color=”gray” fade_in=”false” float=”center” text_align=”left” width=””]
Step 7
svcadm restart dns/server
svcs -a | grep dns/server
online 23:06:06 svc:/network/dns/server:default
dig @localhost ns1.data.serv #check if DNS is configured properly.
; <<>> DiG 9.6-ESV-R8 <<>> @localhost ns1.data.serv
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56010
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;ns1.data.serv. IN A
;; AUTHORITY SECTION:
data.serv. 600 IN SOA ns1.data.serv. postmaster.data.serv. 2014092502 7200 3600 86400 600
;; Query time: 19 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Apr 16 23:06:22 2015
;; MSG SIZE rcvd: 78
[/symple_box]
Errors may come, you can check errors in /var/adm/messages by default. You can also check for syntax errors using either of these commands:
[symple_box color=”gray” fade_in=”false” float=”center” text_align=”left” width=””]
named-checkconf /etc/named.conf
named-checkzone <zone name> <zone file>
[/symple_box]
[symple_divider style=”solid” margin_top=”20px” margin_bottom=”20px”]
[symple_box color=”gray” text_align=”left” width=”100%” float=”none”]
If you like the blog please follow us [icon name=”icon-facebook”] [icon name=”icon-twitter”] [icon name=”icon-google-plus-sign”]
[/symple_box]