0

Am trying to create DNS server on Solaris 10 in VirtualBox.

Steps which I did.

Step I

vi /etc/named.conf

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";
};

Step II

cd /var/named
mv named.root db.cache #after downloading named.root from Internet

Step III

vi db.127.0.0

@IN SOA ns1.data.serv. postmaster.data.serv.(
        2014092502 ; Serial Number
        7200 ; Refresh Interval
        3600 ; Retry Interval
        86400 ; Expiry
        600 ) ; Minimum TTL

        #NS|A|CNAME|PTR|MX
        NS ns1.data.serv.

1       IN      PTR     localhost.

Step IV

vi db.192.168.16

@IN SOA ns1.data.serv.  postmaster.data.serv.(
        2014092502 ; Serial Number
        7200 ; Refresh Interval
        3600 ; Retry Interval
        86400 ; Expiry
        600 ) ; Minimum TTL

        NS ns1.data.serv.

128     IN      PTR     ns1.data.serv.

Step V

vi db.data.serv

@IN SOA ns1.data.serv. postmaster.data.serv.(
        2014092502 ; Serial Number
        7200 ; Refresh Interval
        3600 ; Retry Interval
        86400 ; Expiry
        600 ) ; Minimum TTL

        NS ns1.data.serv.

ns1     IN      PTR     192.168.16.128



svcadm restart dns/server

bash-3.2# dig @localhost  ns1.data.serv

; <<>> DiG 9.6-ESV-R8 <<>> @localhost ns1.data.serv
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

Is there anything else which needs to be done.

  • looks OK you need to start the service at the end. are you getting any error? – Raza Dec 3 '14 at 18:54
  • Tried with svcadm restart dns/server and svcadm enable dns/server. But still getting the same error. – cyrilsebastian Dec 4 '14 at 18:28
  • Just out of curiosity: if you are just starting out on Solaris why are you starting out on an old version ? – peterh Dec 5 '14 at 14:35
  • Do you perhaps want to create a cache-only DNS server for your local network? Or are you wanting to create a local internal DNS server? As I'm assuming you don't want or need an internet level DNS server. – sleepyweasel Jun 8 '17 at 22:29
1

I'm using the stack exchange app which immediately showed a syntax error in your named.conf:

file "db.cache';

you've mixed quote types.

Errors should appear in /var/adm/messages by default (methinks). You can check for syntax errors using either of these commands:

named-checkconf /etc/named.conf
named-checkzone <zone name> <zone file>
1

From your configuration listed above I do not see any major issue in it. Though you need to add your nameserver i.e your localhost and your domain which would also be your local system and the search list for the hostname lookup in your /etc/resolv.conf file. The search list is normally determined from the local domain name; by default, it contains only the local domain name.

cat /etc/resolv.conf
search domainname
nameserver 8.8.8.8
nameserver 8.8.4.4

replace the nameservers with your system IP address.

There are two major versions of BIND daemon: version 8 and version 9. Solaris 10 uses 9.x.x implementation.

The /etc/named.conf configuration file determines if the server is a primary, secondary, or cache-only name server. It also specifies the zones over which the server has authority and which data files it should read to get its initial data.

The master server is defined by the type master in the zone statement of /etc/named.conf and the slave servers are defined by the type slave argument to the zone statement in the /etc/named.conf configuration file.

Major statements that are used in named.conf

  1. options Controls global server configuration options and sets default values for other statements.

  2. zone Defines a zone. Selectively applies options on a per-zone basis, rather than to all zones.

  3. file Defines an include file that contains so called called DNS resource records. Is used to break up the configuration into more easily managed chunks.

  4. type Sets designated type associated with a server.

I have tried to re present the article written here in a readable and concise manner. You can follow the link for further reading.

  • Updated the /etc/resolv.conf file but still not working. – cyrilsebastian Dec 4 '14 at 18:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.