CentOS 7 DNS 伺服器設定

來源:互聯網
上載者:User

標籤:dns

vim /etc/sysconfig/network-scripts/ifcfg-eno16777736DNS1=192.168.1.100vim /etc/sysconfig/networkNETWORKING=yesHOSTNAME=lin01.example.localvim /etc/hosts127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4::1         localhost localhost.localdomain localhost6 localhost6.localdomain6vim /etc/resolv.confnameserver 192.168.1.100systemctl restart network.serviceyum install bind bind-utilsservice named startcp /etc/named.conf /etc/named.conf.bakvim /etc/named.confoptions {        listen-on port 53 { 127.0.0.1; 192.168.1.100; }; #need change        listen-on-v6 port 53 { ::1; };        directory       "/var/named";        dump-file       "/var/named/data/cache_dump.db";        statistics-file "/var/named/data/named_stats.txt";        memstatistics-file "/var/named/data/named_mem_stats.txt";        allow-query     { localhost; 192.168.1.0/24;}; #need change        recursion yes;        dnssec-enable yes;        dnssec-validation yes;        dnssec-lookaside auto;        /* Path to ISC DLV key */        bindkeys-file "/etc/named.iscdlv.key";        managed-keys-directory "/var/named/dynamic";        pid-file "/run/named/named.pid";        session-keyfile "/run/named/session.key";};logging {        channel default_debug {                file "data/named.run";                severity dynamic;        };};zone "." IN {        type hint;        file "named.ca";};include "/etc/named.rfc1912.zones";include "/etc/named.root.key";#add followingzone "example.local" IN {        type master;        file "example.zone";};zone "1.168.192.in-addr.arpa" IN {        type master;        file "192.168.1.zone";cp /var/named/named.localhost /var/named/example.zonevim /var/named/example.zone$TTL 1D@       IN      SOA     lin01.example.local. root.example.local. (                0       ; serial                1D      ; refresh                1H      ; retry                1W      ; expire                3H )    ; minimum@       IN      NS      lin01.example.local.@       IN      A       192.168.1.100@       IN      A       192.168.1.91@       IN      A       192.168.1.92lin01   IN      A       192.168.1.100lin10   IN      A       192.168.1.91lin09   IN      A       192.168.1.92cp /var/named/named.localhost /var/named/192.168.1.zonevim /var/named/192.168.1.zone$TTL 1D@       IN      SOA     lin01.example.local. root.example.local. (                0       ; serial                1D      ; refresh                1H      ; retry                1W      ; expire                3H )    ; minimum@       IN      NS      lin01.example.local.@       IN      PTR     example.local.lin01   IN      A       192.168.1.100lin09   IN      A       192.168.1.92lin10   IN      A       192.168.1.91100     IN      PTR     lin01.example.local.91      IN      PTR     lin10.example.local.92      IN      PTR     lin09.example.local.systemctl start named.servicesystemctl status named.servicesystemctl restart named.servicesystemctl enable named


CentOS 7 DNS 伺服器設定

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.