LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   how to set up a DNS server on solaris 10? (https://www.linuxquestions.org/questions/solaris-opensolaris-20/how-to-set-up-a-dns-server-on-solaris-10-a-474733/)

xpucto 08-17-2006 08:01 AM

how to set up a DNS server on solaris 10?
 
Hi!
I'm running solaris 10 and the server is supposed to solve names for a 2 domains. I'm not very familiar with this dns server topic though.
The solaris server hosts also an apache server where 2 websites are hosted. The name for the 2 websites should be resolved from this solaris server itself, is it understandable? So I have 1 IP for 2 websites. The apache is well configured for the virtual hosts. I'm only missing the DNS server.

Do I just need to fill /etc/hosts and /etc/resolv.conf or is it a bit more complicated than this? Is ther a daemon for this?

Thanks for any help.

xpucto 08-17-2006 09:10 AM

I've imported the named.conf and all the files in namedb from the previous solaris server, which was replaced by the solaris that I'm using now (that means, that it has inherited the IP from the previous server). /etc/hosts and /etc/resolv.conf

Then I did: svcadm -v enable /network/dns/server
And got
Quote:

# svcs -l /network/dns/server
fmri svc:/network/dns/server:default
enabled true
state online
next_state none
state_time Thu Aug 17 16:02:18 2006
logfile /var/svc/log/network-dns-server:default.log
restarter svc:/system/svc/restarter:default
contract_id 116
dependency require_all/none file://localhost/etc/named.conf (online)
dependency require_all/none svc:/system/filesystem/minimal (online)
dependency require_any/error svc:/network/loopback (online)
dependency optional_all/error svc:/milestone/network (online)
the domains are still unreachable though.
In the log files is nothing wrong.
As I've mentioned before: the configurations (named.conf and all the files in namedb) comes from a previous solaris server (solaris 8) where it worked fine. This new server has replaces the old one (same IP, same domain...).
What did I forget?

jlliagre 08-17-2006 09:48 AM

What do you mean by "the domains are still unreachable though" ?

xpucto 08-17-2006 05:55 PM

Quote:

Originally Posted by jlliagre
What do you mean by "the domains are still unreachable though" ?

when I try to reach the website by typing the address, I can't reach it. Just as before when the DNS Server wasn't started.

jlliagre 08-17-2006 11:22 PM

From where are you trying to connect to the web sites, a different machine than the server or the same one ?

In any case, what are the DNS client settings on that machine ?

xpucto 08-21-2006 02:55 AM

Quote:

Originally Posted by jlliagre
From where are you trying to connect to the web sites, a different machine than the server or the same one ?

In any case, what are the DNS client settings on that machine ?

Yes, DNS Server and web-sites are on the same machine.

the settings are:
Quote:

cat /etc/hosts
127.0.0.1 localhost
111.111.11.1 mywebsite.com mywebsite loghost
Quote:

cat /etc/nsswitch.conf
#
# /etc/nsswitch.dns:
#
# An example file that could be copied over to /etc/nsswitch.conf; it uses
# DNS for hosts lookups, otherwise it does not use any other naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.

# DNS service expects that an instance of svc:/network/dns/client be
# enabled and online.

passwd: files
group: files

# You must also set up the /etc/resolv.conf file for DNS name
# server lookup. See resolv.conf(4).
hosts: files dns

# Note that IPv4 addresses are searched for in all of the ipnodes databases
# before searching the hosts databases.
ipnodes: files dns

networks: files
protocols: files
rpc: files
ethers: files
netmasks: files
bootparams: files
publickey: files
# At present there isn't a 'files' backend for netgroup; the system will
# figure it out pretty quickly, and won't use netgroups at all.
netgroup: files
automount: files
aliases: files
services: files
printers: user files

auth_attr: files
prof_attr: files
project: files
Quote:

cat /etc/resolv.conf
domain mywebsite.com
nameserver 222.222.2.21
nameserver 222.222..22
search mywebsite.com
In the meantime, I found an explanation for 1 of the 2 websites: I forgot to allow DNS in ipf.conf!
Here are the added lines:
Quote:

block out proto udp all
pass out proto udp from any to any port = 53 keep state
pass out proto udp from any to any port = 53 keep state
block in proto udp all
the 2nd web-site still doesn't work though.

In the old web-sites (solaris 8) from the html-files come, apache was called http. In the new server (solaris 10), it is called webservd. html-files'ownerships are ether with users'names or still with http. I added http in passwd and in group like this:
Quote:

http:x:1000:100:http Server:/servers/http:/bin/bash
and
Quote:

http::100:http,user1,user2
http::201:user1,user,user3,http
Could it be a reaseon for my problem? Everything else works fine I must say. Should I change all files'ownership to webservd? If yes how (some files are owned by http, but other from other users. doing chown -R would change all files.
thanks.


All times are GMT -5. The time now is 11:36 PM.