• DNS 子域授权


    ###子域授权###

    slave(192.168.8.12):

    [root@dns-s1 slaves]# vim /etc/named.conf

    32         forwarders      { 192.168.8.11; };           ##指明父服务器

    66 zone "ll.bss.com" IN {

    67         type master;

    68         file "ll.com.zone";

    69 };

    ##注释以下行

     78 #include "/etc/named.rfc1912.zones";

     79 #include "/etc/named.root.key";

    [root@dns-s1 slaves]# cd ..

    [root@dns-s1 named]# ls

    data  dynamic  named.ca  named.empty  named.localhost  named.loopback  slaves

    [root@dns-s1 named]# cp -p named.localhost ll.com.zone

    [root@dns-s1 named]# vim ll.com.zone

    $TTL 1D

    @       IN SOA  yy.ll.bss.com.     root (

                                            2013    ; serial

                                            1D      ; refresh

                                            1H      ; retry

                                            1W      ; expire

                                            3H )    ; minimum

            NS      yy.ll.bss.com.

    yy      A       192.168.8.12

    lyq     A       192.168.8.13

    bss     A       192.168.8.14

    [root@dns-s1 named]# vim /etc/resolv.conf

    nameserver 192.168.8.12                 ##指向本机自己

    [root@dns-s1 named]# systemctl restart named

    #########################

    master

    [root@dns named]# vim /etc/named.conf

    ###注释以下内容

    108 #include "/etc/named.rfc1912.zones";

    109 #include "/etc/named.root.key";

    [root@dns named]# vim bss.com.zone

    @       IN      SOA     dns.bss.com.    dns (

                                                    201908

                                                    1D

                                                    1H

                                                    1W

                                                    1H      )

            IN      NS      dns.bss.com.

    dns.bss.com.    A       192.168.8.11

    www             A       192.168.8.12

    ftp             A       192.168.8.13

    ll.bss.com.     NS      yy.ll.bss.com.  ##添加子域名

    yy.ll.bss.com.  A       192.168.8.12

    [root@dns named]# systemctl restart named

    ##########################################################

    测试:

    M:

    [root@dns named]# host www.bss.com

    www.bss.com has address 192.168.8.12

    [root@dns named]# host lyq.ll.bss.com

    lyq.ll.bss.com has address 192.168.8.13

    [root@dns named]# host yy.ll.bss.com

    yy.ll.bss.com has address 192.168.8.12

    S:

    [root@dns-s1 named]# host www.bss.com

    www.bss.com has address 192.168.8.12

    [root@dns-s1 named]# host lyq.ll.bss.com

    lyq.ll.bss.com has address 192.168.8.13

    [root@dns-s1 named]# host yy.ll.bss.com

    yy.ll.bss.com has address 192.168.8.12

  • 相关阅读:
    I can do more…
    在希望的田野上
    卓越管理培训笔记
    Python 学习小计
    谈谈“直抒己见”
    [更新]关于博客园不支持RSS全文输出的解决方案
    效率生活二三事
    个人阅读解决方案
    Oracle函数sys_connect_by_path 详解
    基础班-模板配置
  • 原文地址:https://www.cnblogs.com/zhengyipengyou/p/11453860.html
Copyright © 2020-2023  润新知