BigAdmin System Administration Portal
Community-Submitted Tech Tip
Print-friendly VersionPrint-friendly Version
This content is submitted by a BigAdmin user. It has not been reviewed for technical accuracy by Sun Microsystems, though it may have been lightly edited to improve readability. If you find an error or would like to comment on the article, please contact the submitter or use the comment field at the bottom of the article. Community submissions may not follow Sun trademark guidelines. For information on Sun trademarks, please see http://www.sun.com/suntrademarks/.
 
 

Implementing a DNS Server on the Solaris 8 OS

Yazid Mohamed, July 2006

First, we provide steps for a SPARC processor-based machine. Instructions for the x86 platform appear below.


Steps for the SPARC Platform
  1. Download bind software from Sunfreeware.com. The latest version is bind-9.2.3-sol8-sparc-local.gz.

  2. Gunzip the package that you downloaded and install it.

    # gunzip bind-9.2.3-sol8-sparc-local.gz
    # pkgadd -d bind-9.2.3-sol8-sparc-local
    # pkginfo | grep -I SMCbind
      application SMCbind  bind
    

  3. Create a DNS server configuration file named.conf in the /etc database file in the /var/named directory:

    # vi /etc/named.conf
    

    Here is the example named.conf file:

    acl "internal" {
    20.195.109.0/24;
    };
    
    options {
    	directory "/var/named";
    	forwarders { 161.142.2.17; 161.142.212.17; 202.188.0.183; 202.188.1.8;
    };
    	forward only;
    	allow-recursion { internal; };
    	recursive-clients 10000;
    };
    
    zone "0.0.127.IN-ADDR.ARPA" {
    	type master;
    	file "db.127.0.0";
    	forwarders { };
    	allow-transfer { none; };
    };
    
    zone "uesd.com" {
    	type master;
    	file "db.uesd.com";
    	forwarders { };
    	allow-transfer { none; };
    };
    
    zone "109.195.20.IN-ADDR.ARPA" {
    	type master;
    	file "db.20.195.109";
    	forwarders { };
    	allow-transfer { none; };
    };
    
    # mkdir /var/named
    # cd /var/named
    # vi  db.127.0.0
    
    

    Here is a sample db.127.0.0 file:

    $TTL 86400
    @		IN  SOA dns.uesd.com. Postmaster.dns.uesd.com. ( 
    			10    ; Serial
    			10800   ; Refresh
    			3600    ; Retry
    			604800  ; Expire
    			86400 ) ; Minimum
    		IN	NS	dns.uesd.com.
    
    1		IN	PTR	localhost.
    
    # vi db.20.195.109
    

    The following is an example of the db.20.195.109 file:

    $TTL 86400
    @		IN	SOA	dns.uesd.com. Postmaster.dns.uesd.com. (
    		11
    		10800
    		3600
    		604800
    		86400 )
    		IN	NS	dns.uesd.com.
    
    2.109.195.20.in-addr.arpa.	IN	PTR	web.uesd.com.
    3.109.195.20.in-addr.arpa.	IN	PTR	dns.uesd.com.
    
    # vi db.uesd.com
    

    This is a sample db.uesd.com file:

    $TTL 86400
    @       	IN      SOA     localhost Postmaster.dns.uesd.com. (
                            32
                            10800
                            3600
                            604800
                            86400 )
    		IN      NS      dns.uesd.com.
    
    localhost		IN      A       127.0.0.1
    dns			IN      A       20.195.109.3
    web			IN      A       20.195.109.2
    www			IN      CNAME   web
    
    

  4. The DNS server daemon is /usr/sbin/in.named. In the Solaris 8 OS, the script to start the DNS server is included in the /etc/init.d/inetsvc file. You can restart inetsvc to start the in.named daemon.

    # /etc/init.d/inetsvc stop
    # /etc/init.d/inetsvc start
    

    To check the in.named service, enter this command:

    # ps -ef | grep named
        root  553    1     0   09:59:42  ?     0:00 /usr/sbin/in.named
    

  5. You can use the nslookup command to check your DNS server. For example:

    # nslookup
    Default Server: dns.uesd.com
    Address:    20.195.109.3
    
    > www
    Server: dns.uesd.com
    Address:    20.195.109.3
    
    Name: web.uesd.com
    Address:    20.195.109.2
    Aliases:   www.uesd.com
    


Steps for the x86 Platform

For a machine using an x86 processor, please use the following steps:

  1. Download the bind package from Sunfreeware.com. You can use the package bind-9.2.3-sol8-intel-local.gz.

  2. Gunzip and install the package:

    # gunzip bind-9.2.3-sol8-intel-local.gz 
    # pkgadd -d bind-9.2.3-sol8-intel-local
    # pkginfo | grep -i SMCbind  (note: please use grep -i, not grep -I as used previously)
        application SMCbind  bind
    

  3. Follow the same procedures as for the SPARC platform, in step 3 above.

 


The information and links on this page have been provided by a BigAdmin user. The submitter is solely responsible for such information and links. Sun is not responsible for the availability of external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. Sun will not be responsible or liable, directly or indirectly, for any actual or alleged damage or loss caused by or in connection with use of or reliance on the information posted here, or goods or services available on or through any external site or resource.

Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License.


BigAdmin