I removed the line
listen-on { 127.0.0.1; };
from /etc/named.conf
to enable a Solaris server to listen on all IP addresses for the server, not
just the loopback address, making it usable as a
|
|
listen-on { 127.0.0.1; };
from /etc/named.conf
to enable a Solaris server to listen on all IP addresses for the server, not
just the loopback address, making it usable as a
/etc/resolv.conf
was the system itself, i.e.
its loopback address, I could not resolve system names to IP addresses.
# svcs | grep 'named'
# nslookup cisco.com
;; connection timed out; no servers could be reached
# cat /etc/resolv.conf
domain example.com
nameserver 127.0.0.1
I could run named
to start the named daemon again, so that
I could resolve names, but I wanted it to start automatically when the
system boots. To do so, I created the file /etc/init.d/named
with the following lines in the file:
#!/sbin/sh
#
# named
#
case "$1" in
start)
# Start daemon.
echo "Starting named"
/usr/sbin/named
;;
stop)
# Stop daemon.
echo "Shutting down named"
pkill named
;;
*)
echo "Usage: $0 { start | stop }"
exit 1
;;
esac
exit 0
I then changed the group ownership for the file to sys
to make
it consistent with the other files in that directory and made it executable.
# chgrp sys /etc/init.d/named
# chmod 744 /etc/init.d/named
# ls -l /etc/init.d/named
-rwxr--r-- 1 root sys 284 Aug 17 20:07 /etc/init.d/named
To have it start automatically, I also needed to add it to
/etc/init.d/rc3.d
. You need to prefix the name with
"S" and then a number to have it start automatically. You will see other
files with names beginning with Sxx where "xx" is some number. You must
pick a number that is different from any already used. I picked the next
higher number, 91, in this case.
# cp -p /etc/init.d/named /etc/rc3.d/S91named
When you reboot, you can check that the service is running with
the ps
or svcs
commands or do an nslookup
.
# ps -ef | grep named
root 537 1 0 20:42:16 ? 0:00 /usr/sbin/named
# svcs | grep named
legacy_run 20:42:18 lrc:/etc/rc3_d/S91named
# nslookup cisco.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
Name: cisco.com
Address: 198.133.219.25
References: