您好,登錄后才能下訂單哦!
訪問主機用戶過多,開啟分機減輕負擔
主機
zone "taxing.com" IN {
type master;
file "taxing.com.zone";
allow-update { none; };
allow-transfer {172.25.254.224;};
從機
zone "taxing.com" IN {
type slave;
masters {172.25.254.124;};
file "slaves/taxing.com.zone";
allow-update { none; };
時時同步
主機
vim /var/namedtaxing.com.zone
$TTL 1D
@ IN SOA dns.taxing.com. root.taxing.com. (
201611261 ; serial #最大為十位 文件在更新時查看比較的值,不同則更新 (rm -rf /var/name/slaves/taxing.com.zone; systemctl restart named)
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS dns
dns A 172.25.254.124
www A 172.25.254.138
~
每次修改ip的時候都要修改serial值
vim /etc/name.rfc1912.zones
zone "taxing.com" IN {
type master;
file "taxing.com.zone";
allow-update { none; };
allow-transfer {172.25.254.224;};
also-notify {172.25.254.224;}; ##修改完通知從機
};
遠程控制修改
客戶端
setenforce 0
[root@localhost slaves]# nsupdate
> server 172.25.254.124
> update delete www.taxing.com
> update add www.taxing.com 86400 A 172.25.254.138 #86400s 緩存時間
> send
> quit
主機
setenforc 0
vim /etc/named.rfc1912.zones
zone "taxing.com" IN {
type master;
file "taxing.com.zone";
allow-update { 172.25.254.224; };
};
chmod 770 /var/name/
reboot后會同步更新后的內容,先備份cp -p taxing.com.zone /mnt 重起后再刪除taxing.com.zone.jnl 和已經同步了的taxing.com.zone 把備份了的taxing.com.zone 復制回來 cp -p /mnt/taxing.com.zone .
密鑰匙認證
主機
dnssec-keygen -a HMAC-MD5 -b 128 -n HOST taxing
cat Ktaxing.+157+22634.key
cat Ktaxing.+157+22634.private
cp -p /etc/rndc.key /etc/taxing.key
vim /etc/taxing.key
key "taxing" {
algorithm hmac-md5;
secret "YtJ6Y7kyfL5moClanMIS6Q==";
};
vim /etc/named.rfc1912.zones
zone "taxing.com" IN {
type master;
file "taxing.com.zone";
allow-update { key taxing; };
};
systemctl restart named
scp Ktaxing.+157+22634.* root@172.25.254.224:/mnt/
客戶機
[root@localhost mnt]# nsupdate -k Ktaxing.+157+22634.private
> server 172.25.254.124
> update delete www.taxing.com
> send
> quit
花生殼動態dhcp DNS獲取
主機
vim /etc/dhcp/dhcpd.conf
# Use this to enble / disable dynamic dns updates globally.
ddns-update-style interim;
subnet 172.25.254.0 netmask 255.255.255.0 {
range 172.25.254.224 172.25.254.242;
option routers 172.25.254.124;
}
key taxing {
algorithm hmac-md5;
secret YtJ6Y7kyfL5moClanMIS6Q==;
};
zone taxing.com.{
primary 127.0.0.1;
key taxing;
}
vim /var/name/taxing.com.zone
41,1-8 90%
客戶端
打開動態獲取dhcp
hostnamectl set-hostname timo.taxing.com
dig timo.taxing.com
gnome-screenshot -a #截圖
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。