Operating System - HP-UX
1819814 Members
4187 Online
109607 Solutions
New Discussion юеВ

Re: setting up a dns server

 
curt larson_1
Honored Contributor

setting up a dns server

i'm trying to set up a dns server that is on it's own isolated network without any internet access. But, after setting things up, I get this message when using nslookup:

nslookup
**** Can't find server name for address 155.44.33.15: Server failed
**** Default servers are not available

Here are the steps I took setting dns up:

mkdir /etc/named.data
cd /etc/named.data
hosts_to_named -r -d div.inc.com -n 155.44.33
mv named.boot /etc

/etc/resolv.conf:
domain div.inc.com
nameserver 155.44.33.15

cp /etc/nsswitch.hp_default /etc/nsswitch.conf
hosts: dns [NOTFOUND=return] nis [NOTFOUND=return] files
#not using nis

ch_rc -a -p NAMED='1' /etc/rc.config.d/namesvrs
ch_rc -a -p NAMED_ARGS='"-c /etc/named.boot"' /etc/rc.config.d/namesvrs
/sbin/init.d/named start

named is running but i get the above error messages when running nslookup on the server (155.44.33.15).

any suggestions?
thanks
12 REPLIES 12
Sanjay Kumar Suri
Honored Contributor

Re: setting up a dns server

Have you defined the host in /etc/hosts file?

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Elmar P. Kolkman
Honored Contributor

Re: setting up a dns server

You need to check the named.boot file. I think something went not right for your environment when creating it, resulting in the wrong datadirectory being used or some such. Also make sure your named is using the named.boot and not the named.conf (difference between versions up to bind4 (named.boot) and bind8 and up (named.conf))
Perhaps your named was already running, for instance, before doing the start. You can check this using 'ps -ef | grep named'. On the command line of named you should see the '-c /etc/named.boot' you defined.

Also check your /var/adm/syslog/syslog.log for messages from your named. Problems in the configurations are written there, normally.

Perhaps posting your named.boot will give us some more info on how to check and repair this...
Every problem has at least one solution. Only some solutions are harder to find.
curt larson_1
Honored Contributor

Re: setting up a dns server

yes it most certainly is defined in the /etc/hosts file
curt larson_1
Honored Contributor

Re: setting up a dns server

/etc/named.boot
;
; .....
;

directory /etc/named.data ; ...

primary 0.0.127.IN-ADDR.ARPA db.127.0.0
primary div.inc.com db.div
primary 33.44.155.IN-ADDR.ARPA db.155.44.33
primary . db.root

yes, i've stopped and restarted named few times while trying out a few things already

in syslog.log
starting named ...
/etc/named.boot:1: syntax error near ;
listening on [155.44.33.15].53 (lan0)
listening on [127.0.0.1].53 (lo0)
forwarding source address is [0.0.0.0].57135
ready to answer queries.
curt larson_1
Honored Contributor

Re: setting up a dns server

also in syslog.log, after a while this message will appear:
No root nameservers for class IN

and in /etc/named.boot the first line is just the semi-colon nothing else. Adding a blank line to the top of the file just moves the syntax error to line 2.
/etc/named.boot:2: syntax error near ;
Elmar P. Kolkman
Honored Contributor

Re: setting up a dns server

Question: what is the version of your named?

And the reason it is not working: it complains about the named.boot having a incorrect syntax. This could be caused by the named needing a named.conf if you specify -c. Try replacing the 'c' with a 'b': NAMED_ARGS="-b /etc/named.boot"
Every problem has at least one solution. Only some solutions are harder to find.
curt larson_1
Honored Contributor

Re: setting up a dns server

version of named is 8.1.2

and just using the named.conf file instead of named.boot, without any arguments (/etc/named.conf is the default) is working just fine.

using -b /etc/named.boot gave the same errors as before

thanks for the assistance
Rgomes
Valued Contributor

Re: setting up a dns server

Hi,

I guess you have to add the IP address of your DNS server in db.root file.

regards,
Richard
Steven E. Protter
Exalted Contributor

Re: setting up a dns server

hosts_to_named

builds the database for dns off /etc/hosts

That is not the only way to go.

You can do it manually too.

Here is a guide.

http://www.tldp.org/HOWTO/DNS-HOWTO-5.html

This is a linux document. It worked perfectly on HP-UX

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Artyom Voronchihin
Respected Contributor

Re: setting up a dns server

Hello!
As it is NS for internal use only, try to set localhost as nameserver on this machine, i.e.

/etc/resolv.conf:
domain div.inc.com
nameserver 127.0.0.1

Also try to set "files" before "dns" in nsswitch.conf. or set
hosts: dns [NOTFOUND=continue] dns [NOTFOUND=return]
to proceed to /etc/hosts if hostname was not found in DNS.


"Intel inside" is not a label, it's a warning.
Artyom Voronchihin
Respected Contributor

Re: setting up a dns server

Ops. I have made a little mistake. Correct would be
hosts: dns [NOTFOUND=continue] files [NOTFOUND=return]
"Intel inside" is not a label, it's a warning.
Danny Webster
Advisor

Re: setting up a dns server

Hello,

It sounds like you want to do non-recursive DNS, as you won't have an internet connection. In case you are not aware, this means that your DNS will not do lookups on domains that it is not authoritive for. This is most likely where the server failed error is coming from, especially as you have define a DNS root server file, db.root.

You can do non-recursion with BIND8 in the named.conf file with

"recursion no;"

in your options {} config block.

HTH

dan.
feck