案例:

服务器IP192.168.127.200

www.abc.com  192.168.127.111 要求用别名www1.abc.com也可以访问

tec.abc.com    192.168.127.222

 

wKioL1OaxeGzOUyeAAHkQne6JHk825.jpg

wKiom1Oaxg_zv1PCAAHcbCJuhYY228.jpg

wKioL1OaxeGCIapeAAHQgoOb4Ow404.jpg

wKiom1Oaxg-CpqNLAAGTESUWOQ8801.jpg

wKioL1OaxeLD***yAAHyq5qMO9s402.jpg

wKiom1Oaxg_DpCWRAAA8XKhr93U404.jpg

wKiom1Oaxg-img-uAADJuwbZhc0761.jpg

Vim /etc/named.rfc1912.zone中需要添加19-23行以及31-35行的内容及要修改的地方:

zone "abc.com" IN{

    type master;

    file "abc.com.zone";

    allow-update {none;}

}

 

zone "127.168.192.in-addr.arpa" IN{

    type master;

    file "abc.com.local";

    allow-update {none;}

}

 

vim abc.com.zone:

wKioL1OayeyR2cpVAADN82PnbGo898.jpg

 

vim abc.com.local:

wKioL1OaxeKhSUOuAACzz-gtGXM390.jpg

虚拟机中测试:


wKiom1OaynqSVefzAAEpPTk26_0813.jpg

wKioL1Oaylnzd6BGAADCcTncXS0694.jpg

物理机中测试:

wKioL1OayjWTsMgDAAD7q83TJ6s611.jpg

 

wKioL1Oaw1jCamCtAAEQoD0xkLc602.jpg