DNS and Bind Learning Notes 5 (Example Drill)

zhaozj2021-02-16  56

Suppose I am a DNS built in the internal local area network (only test only ~).

1. The first step is definitely how to plan it in your domain! I hope to configure the primary domain name server of My.NET to 10.1.1.198. Marco.my.net is the company's Web and FTP servers, which IP is 10.1.1.201. Yuyu.my.net is Mail Server pointing 10.1.1.202

2. Configure /etc/named.conf options {Version "4.0.0"; Directory "/ var / named"; pid-file "/var/named/named.pid";

ZONE "my.net" {type master; file "db.my.net";

Zone "0.0.127.in-addr.arpa" {Type Master; File "DB.127.0.0";

Zone "1.1.10.in-addr.Arpa" {type master; file "db.10.1.1";

3. Write a specific DNS data file according to the configuration file (1) db.my.net $ TTL 86400

@ 1D in SOA ns.my.net. Root.my.net. (20040701; Serial 3H; Refresh 15m; Retry 1W; Expiry 1D); Minimum

@ In ns ns.my.net.

NS in a 10.1.1.1.201Yuyu in A 10.1.1.202

yuyu in mx 10 yuyu

WWW in cname marcoftp in cname marcomail in cname yuyu

Note: These are all configured according to my first 2 days. Therefore, it is relatively simple. First define a $ TTL, because I am using the version of 9. Then record the SOA record, the NS record, and the order of several records in the order is not related.

(2) DB.127.0.0 $ TTL 86400

@ 1D in SOA ns.my.net. Root.my.net. (20040701; Serial 3H; Refresh 15m; Retry 1W; Expiry 1D); Minimum

@ In ns ns.my.net

1 in Ptr Localhost Description: I didn't write NS record here. However, I later looked at Log found this information. Although I didn't affect normal use, but I didn't feel uncomfortable, I added :) Error message: (/ VAR / ADM / Messages) Jul 2 11:36:01 Marco named [597]: [ID 295310 daemon.warning] zone "0.0.127.in-addr.arpa" (file db.127.0.0): no ns rrs Found At Zone Topjul 2 11:36:01 Marco named [597]: [ID 295310 daemon.warning] Master Zone "0.0.127.in-addr.arpa" (in) Rejected Due to Errors (Serial 20040701) (3) DB.10.1.1 $ TTL 86400

@ 1D in SOA ns.my.net. Root.my.net. (20040701; Serial 3H; Refresh 15m; Retry 1W; Expiry 1D); Minimum

@ In ns ns.my.net.

198 in ptr ns.my.net.201 in ptr marco.net.202 in ptr yuyu.my.net. Description: This is best written on DB.127.0.0 here, preferably written on NS records. There is also the PTR record of the record here, don't forget "." (4) Wans OK, only to start ~~~ Bash-2.03 # ndc startnew pid is 676 best tail / var / adm / messages, if it appears The following statement indicates that the syntax of at least the configuration file is correct, named has been launched: Jul 2 12:54:43 Marco named [675]: [ID 295310 daemon.notice] starting. In.named bind 8.2.2-p5 THU Jan 29 07:06:27 PST 2004 Jul 2 12:54:43 Marco Generic Patch-5.8-January 2004 Jul 2 12:54:43 Marco Named [676]: [ID 295310 Daemon.notice] Ready to Answer Queries.

(5) Set /etc/resolv.conf, set Nameserver to 10.1.1.198 (NS.MY.NET)

(6) Test with NSlookUp and DIG.

Last description: Because I am doing test in the LAN, there is no hint type. If it is formal DNS Server, you must add (add a parameter in /etc/named.conf) zone "." {Type hint; file "named.root"; then execute the command: Bash-2.03 # CD / VAR /NAMED/Bash-2.03# Dig @ a.root-servers.net. ns> named.root Question: I used clearly that bash-2.03 # named -vbind 9.3.0rc1 but why IN.NAMED BIND 8.2 is displayed in the log .2-p5? Is that in .named This file is BIND 8.2.2-P5?

Also attached to DNS and Bind learning notes

DNS with bind learning notes 1

DNS and Bind Learn Notes 2

DNS and Bind Learn Notes 3

DNS and Bind Learn Notes 4

转载请注明原文地址:https://www.9cbs.com/read-18079.html

New Post(0)