第7节. 实现internet架构和DNS服务

拓扑

image-20230228141956251

搭建权威dns的主从

67作为httpd server,提供一个测试页

image-20230228142413178

image-20230228142345903

image-20230228142438875

image-20230228142451987

image-20230228143141930

测试OK

image-20230228143218486


47上安装bind作为主MASTER

image-20230228143408311

注释掉listen-和allow-

image-20230228143535582

添加只允许从服务IP来抓取信息(-t axfr)

image-20230228143636066

image-20230228144041934

image-20230228144220210

image-20230228144302726

image-20230228144326339

57上配置从SLAVE

同样yum -y install bind

image-20230228144559902

两行注释

一行拒绝所有

image-20230228144754360

image-20230228144822002

zone数据库文件从上面就无需创建了,重启同步过来就行了。

测试主从解析情况

client的dns指一下主从

image-20230228145008642

看下是否生效--也就是/etc/resovle.conf里自动写进入了

image-20230228145052726

测试解析OK

image-20230228145119417

测试主从复制

image-20230228145221562

image-20230228145229207

slave上文件日期已经变了

image-20230228145242627

image-20230228145316126

37配置成.com域

image-20230228145733130

属于父域的知识应用

image-20230228145906318

在zone数据库里配置子域

image-20230228150404022

image-20230228150159491

magedu是com的子域,被委派给了ns2和ns3,分别对应两个ip地址。

image-20230228150418555

测试下,委派成功👇

image-20230228150643276

27作为根

image-20230228151021401

这里是自己实验里自建根,所以原来的根zone改一下

image-20230228151208979

image-20230228152628947

image-20230228152646572

chgrp named /var/named/root.zone

chmod 640 /var/named/root.zone

测试

image-20230228153113436

17作为forwardDNS

image-20230228162519333

修改默认的13个根的zone数据库文件

image-20230228162605267

image-20230228162750737

只需要写一行:27就是实验的根

image-20230228163059235

image-20230228163134061

测试下,失败:

image-20230228163152454

关闭安全选项

image-20230228163231496

image-20230228163247310

然后就OK了

image-20230228163302868

7作为LOCALDNS

image-20230228163747582

image-20230228163820443

安全关了

image-20230228163929780

测试OK👇

image-20230228163950356

测试curl之前改一下默认的dns

image-20230228164055111

image-20230228164112127

image-20230228164122263

OK

Copyright 🌹 © oneyearice@126.com 2022 all right reserved,powered by Gitbook文档更新时间: 2024-07-28 14:47:45

results matching ""

    No results matching ""