zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    2018-2019-2 20165235 《网络对抗技术》 Exp6 信息搜集与漏洞扫描
    2018-2019 20165235 网络对抗 Exp5 MSF基础
    2018-2019 20165235 网络对抗 Exp4 恶意代码分析
    2018-2019-3 网络对抗技术 20165235 Exp3 免杀原理与实践
    2018-2019-2 20165235《网络对抗技术》Exp2 后门原理与实践
    Exp1 PC平台逆向破解 20165235 祁瑛
    2018-2019 20165235 网络对抗技术 Exp0:kali的安装
    20165302 Exp9 Web安全基础
    20165302 Exp 8 Web基础
    2018-2019-2 20165302 Exp7 网络欺诈防范
  • 原文地址:https://www.cnblogs.com/zhengyipengyou/p/11453860.html
Copyright © 2011-2022 走看看