Set up a dynamic dns server with bind9.2.4 on Soalris10

Source: Internet
Author: User
Tags nslookup command
Soalris10 uses bind9.2.4 to set up a dynamic dns server-Linux Enterprise Application-Linux server application information. The following is a detailed description. The view function of bind 9 is used to parse different addresses by IP address.

Dns server address: dns.test.com 192.168.0.211
Web server address: www.test.com 192.168.0.100 192.168.0.200
China Telecom address: 192.168.0.210 resolved to 192.168.0.100
China Netcom address: 192.168.0.213 resolved to 192.168.0.200


--------------------------------------------------------------------------------

Bind main configuration file named. conf

// Define global configuration options
Options {
// Working directory of the configuration file
Directory "/var/named ";
// Domain name Forwarder
Forwarders {
192.168.0.1;
};
};

Key "rndc-key "{
Algorithm hmac-md5;
Secret "dT68MZ0x70oXNKQ59NFpeQ = ";
};

// Control channel used by the rndc command
Controls {
Inet 127.0.0.1 port 953
Allow {127.0.0.1;} keys {"rndc-key ";};
};

// Ip address access list
Acl "telecom "{
192.168.0.210;
};
Acl "cnc "{
192.168.0.213;
};

// When using the view function, all zones must be included in the view
// China Telecom
View "telecom "{
// Match the acl list
Match-clients {"telecom ";};
// Recursive query
Recursion yes;
// Define the root Declaration
Zone "." IN {
Type hint;
File "named. ca ";
};
// Define the Forward Declaration of localhost in the resolution Area
Zone "localhost" IN {
Type master;
File "localhost. zone ";
Allow-update {none ;};
};
Zone "0.0.127.in-addr. arpa" IN {
Type master;
File "named. local ";
Allow-update {none ;};
};
// Define the declaration of test.com in the forward resolution Area
Zone "test.com" IN {
Type master;
File "test. zone. telecom ";
Allow-update {none ;};
};
Zone "0.168.192.in-addr. arpa" IN {
Type master;
File "0.168.192.arpa ";
Allow-update {none ;};
};
};

// China Netcom
View "cnc "{
Match-clients {"cnc ";};
Recursion yes;
Zone "." IN {
Type hint;
File "named. ca ";
};
Zone "localhost" IN {
Type master;
File "localhost. zone ";
Allow-update {none ;};
};
Zone "0.0.127.in-addr. arpa" IN {
Type master;
File "named. local ";
Allow-update {none ;};
};
Zone "test.com" IN {
Type master;
File "test. zone. cnc ";
Allow-update {none ;};
};
Zone "0.168.192.in-addr. arpa" IN {
Type master;
File "0.168.192.arpa ";
Allow-update {none ;};
};
};


--------------------------------------------------------------------------------

China telecom address zone file test. zone. telecom

// Define the default TTL value of each record in the record file
$ TTL 86400
// Set ORIGIN? Specifies the location of the record source below
$ ORIGIN test.com.
// "@" Indicates the domain name test.com after $ ORIGIN
// The FQDN of the domain name ending with ".". If there is no ".", the system will add the domain name represented "@".
@ 1D in soa test.com. root.test.com (
42
3 H
15 M
1 W
1D)
1D in ns dns.test.com.

Dns 1D in a 192.168.0.211
Www 1D in a 192.168.0.100



--------------------------------------------------------------------------------

Zone file test. zone. cnc of China Netcom address
$ TTL 86400
$ ORIGIN test.com.
@ 1D in soa test.com. root.test.com (
42
3 H
15 M
1 W
1D)
1D in ns dns.test.com.

Dns 1D in a 192.168.0.211
Www 1D in a 192.168.0.200


--------------------------------------------------------------------------------

Reverse parsing file 0.168.192.arpa
$ TTL 86400
@ In soa test.com root.test.com .(
1997022700
28800
14400
3600000
86400)
In ns dns.test.com.

100 in ptr www.test.com.
200 in ptr www.test.com.
211 in ptr dns.test.com.

The dns PTR record cannot be missing. Otherwise, an error message will be prompted when the client uses the nslookup command for query:
** Can't find server name for address 192.168.0.211: Non-existent domain
* ** Default servers are not available
Default Server: UnKnown
Address: 192.168.0.211
The Correct prompt is:
Default Server: dns.test.com
Address: 192.168.0.211

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.