- 论坛徽章:
- 0
|
请问怎么配置sco unix 5.05 的dns
***Remember to backup or make a copy of the files you want to modify. Hope this may help you.***
Pointing OpenServer to your ISPs DNS server
Edit the file /etc/resolv.conf and make sure it contains the following lines:
nameserver dns_ipaddress
hostresorder local bind
search domain
The dns_ipaddress is the address of the DNS server provided by your ISP; there are usually two, so add another nameserver entry under the first.
Setting up a DNS server on Openserver 5.0.7
OpenServer includes example DNS files located in /etc/named.d. You can use these files as templates to create the files below. (If you have SCO OpenServer 5.0.7 Update Pack 1 (or later) installed, you can use the h2n utility to simplify this task.)
When you see any of the following, replace them with your relevant information:
mars –the server name of the OpenServer machine
simpsons.com – the domain of the OpenServer machine.
In the example files below mars.simpsons.com is the OpenServer machine and pc1.simpsons.com is a workstation machine in the same network.
Log in to OpenServer as the root user and make a copy of the template files just in case with the following commands:
cd /etc
cp –r named.d named.safe
cp /etc/named.conf named.conf_safe
cd named.d
The following sample files illustrate how to set up DNS.
File – named.soa
Description – This file provides a header for each of the other DNS files.
@ IN SOA mars.simpsons.com. root (
199701141821 ; Serial
10800 ; Refresh
1800 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS mars.simpsons.com.
File – named.hosts
Description – This file provides information for forward lookups (hostnames >; IP addresses).
$INCLUDE named.soa
localhost IN A 127.0.0.1
mars IN A 192.168.1.2
pc1 IN A 192.168.1.3
simpsons.com. IN MX 0 mars.simpsons.com.
File – named.rev
Description – This file provides information for reverse lookups (IP addresses >; hostnames).
$INCLUDE named.soa
2 IN PTR mars.simpsons.com.
3 IN PTR pc1.simpsons.com.
File – named.local
Description – This file provides
$INCLUDE named.soa
1 IN PTR localhost.
File – named.conf
Description – This file is the main DNS configuration file that the named daemon looks for in /etc. It tells named where to find the other DNS files.
options {
directory "/etc/named.d"; // Tells named where DNS files are
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "named.local";
};
zone "." {
type hint; // Looks after Internet lookups
file "root.cache";
};
zone "simpsons.com" {
type master; // The internal Simpsons domain
file "named.hosts";
};
zone "1.168.192.in-addr.arpa" {
type master; // Reverse zone for the 192.168.1 network
file "named.rev";
};
Once you have modified the files to suit your server name and domain, run the following commands to complete the DNS server.
cd /etc/named.d
cp named.conf ..
Edit the file /etc/resolv.conf and make sure it contains the following lines (where domain is your domain):
nameserver 127.0.0.1
hostresorder local bind
search domain
Start the DNS service with the following command
/etc/ndc start
Test the DNS server with the following commands, remembering to change the IP address and names used to suit your setup.
nslookup ipaddress
You should get a response similar to the following:
Server: localhost
Address: 127.0.0.1
Name: mars.simpsons.com
Address: 192.168.1.2
Complete further nslookup tests for the following:
nslookup localhost
nslookup 127.0.0.1
nslookup ipaddress
nslookup www.sco.com
If you find you cannot resolve the last test to www.sco.com check to make sure you have the file root.cache in the /etc/named.d directory (it should be there by default).
After any change to the DNS configuration files, remember to restart the DNS:
/etc/ndc restart |
|