作者pizzahut (...)
看板Linux
标题[问题] DNS (named) 主从式设定问题
时间Sun Mar 7 17:30:23 2021
手边有两台 DNS Server
一台 Master (简称为 A) 一台 Slave (简称为 B)
原本这两台是可以正常运作的
A 修改了 Serial 之後重启或 reload 後可以正常同步到 B
原始设定档案中没有 acl 跟 view,但我後来把 A 上面的
zone file 修改成类似这样:
acl aaa {
1.1.1.1/32;
2.2.2.2/32;
};
acl bbb {
! aaa;
any;
};
view stage {
match-clients { aaa; };
--- 中略 ---
zone "bbbaaa.com" {
type master;
file "data/named.ba.com.stage";
allow-transfer {
B_IP;
};
notify yes;
also-notify {
B_IP;
};
};
zone "bbbaaa.com.tw" {
type master;
file "data/named.ba.com.tw.stage";
allow-transfer {
B_IP;
};
notify yes;
also-notify {
B_IP;
};
};
};
view prod {
match-clients { bbb; };
--- 中略 ---
zone "bbbaaa.com" {
type master;
file "data/named.ba.com.internal";
allow-transfer {
B_IP;
};
notify yes;
also-notify {
B_IP;
};
};
zone "bbbaaa.com.tw" {
type master;
file "data/named.ba.com.tw.internal";
allow-transfer {
B_IP;
};
notify yes;
also-notify {
B_IP;
};
};
};
B 的设定基本上相同(换掉 type 为 slave 跟 masters { A_IP };),
但重启之後 A 原本的正反解设定都可以同步到 B,
但我新增的正解档案却好像无法正常同步到 B,
(正常应该是从 A 的 data/named.ba.com.stage 同步到 B 的
slaves/named.ba.com.stage)
反而系统会从 A 里面的 data/named.ba.com.internal 同步到
B 的 slaves/named.ba.com.stage ,弄了很久还是如此,
不知道有没有解?先感谢各位帮忙...
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 1.161.60.252 (台湾)
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Linux/M.1615109425.A.8DC.html
※ 编辑: pizzahut (1.161.60.252 台湾), 03/07/2021 17:59:37
1F:→ kenduest: 先看 log 有无什麽资讯,/var/log/messages 这类 03/08 12:13
我只有看到这个
zone ba.com.tw/IN/ba-prod: refused notify from non-master: 172.24.1.103#36206
但不是很确定有没有关,有 Google 过解法加一些设定但无效
※ 编辑: pizzahut (122.147.232.66 台湾), 03/08/2021 16:51:36
昨天改用只有 view 的方式去设定,发现只要用两个 view 的话 zone file
同步到 slave 就会有问题 @@,log 仍然没有写些什麽特殊的 error...
※ 编辑: pizzahut (122.147.232.66 台湾), 03/10/2021 10:41:29
3F:→ ketrobo: 加上TSIG 03/10 13:55
4F:→ pizzahut: TSIG好像某个版本以上才能用,看来可能要升级bind了 Orz 03/10 23:12
5F:→ pizzahut: 感谢提示,可以用了...只是不知道为什麽修改zone file或 03/12 13:24
6F:→ pizzahut: 其他设定时好像只能restart服务不能reload.. 03/12 13:24