一、規(guī)劃說明:
主機A:雙網(wǎng)卡
192.168.1.7——>mydomain.org主域名服務(wù)器
192.168.10.7——>myzone.org主域名服務(wù)器,其有兩個子域,為market.myzone.org和develog.myzone.org
主機B:雙網(wǎng)卡
192.168.1.6——>mydomain.org輔助域名服務(wù)器
192.168.10.6——>market.myzone.org子域名服務(wù)器
兩臺服務(wù)器均有DNS獨立的日志,用以記錄查詢(query_logs)記錄和錯誤(err_logs)記錄,以便于DNS后期管理;本文不過多涉及安全方面的問題。
安裝過程請參照另一篇文章“Bind9.4.0rc2安裝筆記(一步步學(xué)習(xí)配置簡易DNS)”。
二、主機A:
1.主配置文件/etc/named.conf
options{directory"/var/named/";version"0.0.0";};logging{channeldns_errors{file"/var/log/named/err_logs"versions3size10m;severityerror;print-categoryyes;print-severityyes
2.域mydomain.org的正向解析文件/var/named/mydomain.org.zone
$TTL1D$ORIGINmydomain.org.@1DINSOAmydomain.org.root.mail.mydomain.org.(200703011H15M1W1D)INNSns.mydomain.org.INMX10mail.mydomain.org.mydomain.org.INA192.168.1.7#泛域名解析nsINA192.168.1.7mailINA192.168.1.100wwwINCNAMEmailftpINCNAMEmail
3.域mydomain.org的反向解析文件/var/named/192.168.1.zone
$TTL1D@1DINSOAmydomain.org.root.mail.mydomain.org.(200703011H15M1W1D)INNSns.mydomain.org.7INPTRmarion.org.7INPTRns.mydomain.org.100INPTRmail.mydomain.org.
4.域myzone.org的正向解析文件/var/named/myzone.org.zone
#more/var/named/myzone.org.zone$TTL1D$ORIGINmyzone.org.@1DINSOAmyzone.org.root.mail.myzone.org.(200703011H15M1W1D)INNSns.myzone.org.INMX10mail.myzone.org.myzone.org.INA192.168.10.7nsINA192.168.10.7mailINA192.168.10.5wwwINCNAMEmailftpINCNAMEmailmarketINNSns.market#指明授權(quán)的子域marketns.marketINA192.168.10.6$ORIGINdevelop.myzone.org.#指明授權(quán)的子域develop,和上一種方法稍有不同.INNSns.develop.myzone.org.nsINA192.168.10.2
5.域myzone.org的反向解析文件/var/named/192.168.10.zone
$TTL1D@1DINSOAmyzone.org.root.mail.myzone.org.(200703011H15M1W1D)INNSns.myzone.org.6INPTRns
三、主機B:
1.named主配置文件/etc/named.conf
options{directory"/var/named/";version"unknown";forwarders{192.168.1.7;};};logging{channeldns
2.子域market.myzone.org的正向解析文件/var/named/market.myzone.org.zone
$TTL1D$ORIGINmarket.myzone.org.@1DINSOAmarket.myzone.org.root.mail.market.myzone.org.(200703011H15M1W1D)INNSns.market.myzone.org.INMX10mail.market.myzone.org.market.myzone.org.INA192.168.10.6nsINA192.168.10.6mailINA192.168.10.100wwwINCNAMEmail
3.子域market.myzone.org的反向解析文件/var/named/192.168.10.zone
$TTL1D@1DINSOAmyzone.org.root.mail.myzone.org.(200703011H15M1W1D)INNSns.myzone.org.6INPTRns.myzone.org.100INPTRmail.myzone.org.
注:輔助域的解析文件將會由區(qū)域傳送獲得,不需要手動建立。如果你想要反復(fù)嘗試區(qū)域傳送的效果,請將TTL值改小。本機的如下所示:
4.域mydomain.org的正向解析文件/var/named/mydomain.org.zone
$ORIGIN.$TTL86400;1daymydomain.orgINSOAmydomain.org.root.mail.mydomain.org.(20070301;serial3600;refresh(1hour)900;retry(15minutes)604800;expire(1week)86400;minimum(1day))NSns.mydomain.org.A192.168.1.7MX10mail.mydomain.org.$ORIGINmydomain.org.ftpCNAMEmailmailA192.168.1.100nsA192.168.1.7wwwCNAMEmail
5.域mydomain.org的反向解析文件/var/named/192.168.1.zone
$ORIGIN.$TTL86400;1day1.168.192.in-addr.arpaINSOAmydomain.org.root.mail.mydomain.org.(20070301
四:測試結(jié)果
1.主機A:
#nslookup>settype=NS>market.myzone.orgServer:127.0.0.1Address:127.0.0.1#53Non-authoritativeanswer:market.myzone.orgnameserver=ns.market.myzone.org.Authoritativeanswerscanbefoundfrom:ns.market.myzone.orginternetaddress=192.168.10.6>myzone.orgServer:127.0.0.1Address:127.0.0.1#53myzone.orgnameserver=ns.myzone.org.>mydomain.orgServer:127.0.0.1Address:127.0.0.1#53mydomain.orgnameserver=ns.mydomain.org.>2.主機B:
#nslookup>settype=NS>mydomain.orgServer:127.0.0.1Address:127.0.0.1#53mydomain.orgnameserver
本文出自:億恩科技【mszdt.com】
服務(wù)器租用/服務(wù)器托管中國五強!虛擬主機域名注冊頂級提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]
|