Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure the DNS server

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to configure the DNS server. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

BIND9 (the DNS server in Solaris 10 is BIND9) requires a total of these profiles:

Files in / etc/ directory (the names of these files cannot be changed):

Configuration file for / etc/named.conf-in.named daemon

/ etc/rndc.conf-BIND9 required configuration file

Files in the / etc/named/ directory (this directory name and file name can be arbitrarily defined in the / etc/named.conf file):

Named.root

Loop.back

One.rzone

One.zone

/ * contents of named.conf file * * /

/ / This is the / etc/named.boot (boot files) for the primary name server

/ / of the one.edu. Domain.

/ / first define the location of the configuration file:

Directory "/ etc/named"

/ / define transponders, all requests are sent to transponders except the domain defined locally (unofficially authorized DNS servers basically define transponders)

Forwarders {

202.101.98.54

202.101.98.55

}

}

/ / next, specify the configuration file for the root DNS server, which can be downloaded from the network:

Zone "." In {

Type hint

File "named.root"

}

/ / the forward resolution configuration file of the domain that this machine is responsible for parsing. In this case, it is the one.edu domain and the configuration file is one.zone

Zone "one.edu" in {

Type master

File "one.zone"

}

/ / reverse parsing configuration file for the domain that this machine is responsible for parsing. In this case, the one.edu domain and the configuration file one.zone

Zone "1.168.192.in-addr.arpa" in {

Type master

File "one.rzone"

}

/ / Loopback reverse parsing profile

Zone "0.0.127.in-addr.arpa" in {

Type master

File "loop.back"

}

/ / the following are the configuration contents specific to BIND9

/ / Use with the following in named.conf, adjusting the allow list as needed:

/ / See rndc-confgen command-manual

Key "rndc-key" {

Algorithm hmac-md5

Secret "/ cCelQY6sE40JIwQDtXf6g=="

}

Controls {

Inet * allow {any;} keys {"rndc-key";}

}

/ *

Controls {

Inet 127.0.0.1 port 953

Allow {127.0.0.1;} keys {"rndc-key";}

}; * /

/ * the contents of the rndc.conf file. You can use the rndc-confgen command to generate the desired content * /

Key "rndc-key" {

Algorithm hmac-md5

Secret "/ cCelQY6sE40JIwQDtXf6g=="

}

Options {

Default-key "rndc-key"

Default-server localhost

Default-port 953

}

Server localhost {

Key "rndc-key"

}

Files in / * / etc/named/ directory * * /

/ * / etc/named/named.root*/

The contents of this file can be downloaded from the Internet or not.

/ * / etc/named/loop.back*/

; / var/named/loop.back file for the primary name server.

; Start of Authority section

$ORIGIN 0.0.127.IN-ADDR.ARPA.

$TTL 8h

; The next line is very long, but is ONE line.

0.0.127.IN-ADDR.ARPA. IN SOA sys11.one.edu. Root.sys11.one.edu. (

20011225; version number

10800; refresh (3hrs.)

3600; retry (1hr.)

432000; expire (5days)

86400); ttl (1day)

0.0.127.IN-ADDR.ARPA. IN NS sys11.one.edu.

1 IN PTR localhost.one.edu.

/ * / the key is forward parsing file and reverse parsing file * /

/ * / etc/named/one.zone * /

; / var/named/one.zone file for the one.edu. Name server

; This file resolves hostnames to IP addresses in the one.edu. Domain.

$ORIGIN one.edu.

; Time to live (post BIND 8.2) 8 hours

$TTL 8h

One.edu. IN SOA sys11.one.edu. Root.sys11.one.edu. (

20011225; serial number

10800; refresh (3hrs)

3600; retry (1hr)

432000; expire (5days)

86400); ttl (1day)

; Domain Section

The following means that the one.edu domain is parsed by the host sys11.one.edu

One.edu. IN NS sys11.one.edu.

; Host Information Section

; Example; "sys12 IN A 192.168.1.2"

The following is the corresponding relationship between the host and IP. Sys11 IN A 192.168.1.1 means that the IP of the domain name sys11.one.edu is 192.168.1.1.

Sys11 IN A 192.168.1.1

Sys12 IN A 192.168.1.2

Sys13 IN A 192.168.1.3

Sys17 IN A 192.168.1.17

Gw IN A 192.168.1.254

Xp IN A 192.168.1.11

/ * / etc/named/one.rzone * /

; / var/named/one.rzone file for the one.edu. Primary name server

; This file resolves IP addresses to hostnames in the one.edu. Domain.

$ORIGIN 1.168.192.IN-ADDR.ARPA.

; Time to live (post BIND 8.2) 8 hours

$TTL 8h

1.168.192.IN-ADDR.ARPA. IN SOA sys11.one.edu. Root.sys11.one.edu. (

20011225; serial number

10800; refresh (3hrs)

3600; retry (1hr)

432000; expire (5days)

86400); ttl (1day)

1.168.192.IN-ADDR.ARPA. IN NS sys11.edu.

; In this section put ONLY the host portion of IP address for each

; host in the one.edu domain. Ex. "1 IN PTR sys11.one.edu."

1 IN PTR sys11.one.edu.

2 IN PTR sys12.one.edu.

3 IN PTR sys13.one.edu.

17 IN PTR sys17.one.edu.

254 IN PTR gw.one.edu.

This is the end of the article on "how to configure the DNS server". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report