首页 > 代码库 > DNS实用脚本: 快速配置正向区域的slave
DNS实用脚本: 快速配置正向区域的slave
#!/bin/bash
read -p "set master eg: 192.168.1.1 ; enter ‘quit‘ for quit:" master
if [ $master == "quit" ];then
echo "bye"
exit 0
fi
read -p "enter zone eg:baidu.com; enter ‘quit‘ for quit:" netAddress
mkSlave()
{
echo -e "\nzone \""$1"\" IN {
type slave;
masters { $master; };
file \""slaves/$1.zone"\";
allow-update { none; };
};" >> /etc/named.rfc1912.zones
}
while [ $netAddress != "quit" ];do
mkSlave $netAddress
echo "success"
read -p "enter zone eg:baidu.com; enter ‘quit‘ for quit:" netAddress
done
echo "bye"
使用方法:
DNS实用脚本: 快速配置正向区域的slave
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。