我得到了一份将2x BIND DNS服务器迁移到新硬件的工作。
显然他们正在使用运行 Ubuntu 服务器 8.04 的 3U 史前服务器。
我将使用 Ubuntu 服务器 9.04 安装 2 个 1U 服务器。
如何传输 DNS 设置、DNS 缓存?我需要传输哪些文件夹/配置文件?
如果我使用Webmin > 备份配置 > BIND DNS 服务器,或者我应该避免使用 Webmin,我会实现什么吗?
有没有办法自动同步BIND(9)服务器之间的所有区域,这样当我将它们添加到主服务器时,我不必向从服务器添加区域?
我在 bind9 上为我的 5 个域运行我自己的权威 DNS,流量很少。我在 2 个独立的 VPS 服务器上运行它们(所以每 Mb 内存花费我一些 $x2)。
有什么办法可以将它的内存消耗从 ~45-50Mb 降低?(我会很高兴有 10-30Mb)
我知道有更轻量级的 DNS 服务器替代方案,但这需要更换服务器管理软件,所以我更愿意坚持使用绑定。
建议?我听说 bind8 在内存消耗方面更好。我会因为使用它而堕入地狱吗?
我使用 mount -o bind 在 chroots 中挂载目录,效果非常好。问题是我希望其中一些绑定安装的目录只能在 chroot 中读取。
是否可以?如果没有 - 任何其他方式来实现它?
我正在考虑将 NFS 用于本地主机挂载,但它看起来有点矫枉过正。
更新:
绑定版本:
[root@10.224.45.130] $ named -v
BIND 9.3.6-P1-RedHat-9.3.6-16.P1.el5
Run Code Online (Sandbox Code Playgroud)
操作系统:
CentOS release 5.6 (Final)
Run Code Online (Sandbox Code Playgroud)
运行后[root@10.224.45.131] $ dig @10.224.45.130 example.com. axfr:
奴隶:
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5 <<>> @10.224.45.130 example.com. axfr
; (1 server found)
;; global options: printcmd
; Transfer failed.
Run Code Online (Sandbox Code Playgroud)
掌握:
28-Aug-2011 12:29:01.384 client 10.224.45.131#60553: query: example.com IN AXFR -
28-Aug-2011 12:29:01.384 client 10.224.45.131#60553: zone transfer 'example.com/AXFR/IN' denied
Run Code Online (Sandbox Code Playgroud)
与之前相同的错误消息。
更新 2:
[root@10.224.45.130 ~] # iptables -L -n -v
Chain INPUT (policy DROP 30235 packets, 1747K bytes)
pkts bytes target …Run Code Online (Sandbox Code Playgroud) 重新启动系统会刷新 BIND(命名)缓存吗?我使用 GNU/Linux。
在我的 DNS 服务器的 named.conf 中,我看到
rate-limit {
responses-per-second 5;
window 5;
};
Run Code Online (Sandbox Code Playgroud)
这实际上意味着什么?它会导致 DNS 客户端问题吗?这配置太紧了吗?
如果删除递归,则无法解析外部域,但仍可以解析 DNS 服务器上的域。
正确设置递归以便在不打开 DNS 服务器的情况下仍然可以解析外部域的正确方法是什么?
命名.conf.options
options {
version "One does not simply get my version";
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert …Run Code Online (Sandbox Code Playgroud) 我们刚刚使用 Bind 9.10 的最新稳定版本设置了递归 DNS 服务器
我们发现递归 DNS 查找非常慢。1 - 3 秒之间的任何时间。一旦在缓存中查找,DNS 就会按预期在几毫秒内解析。
我们正在使用 ROOT 提示进行递归查找,这似乎是缓慢的来源。如果我们配置转发器,DNS 解析将归结为 100 - 300 毫秒的合理递归时间。
对于我们正在设置的服务,我不想依赖转发器,我更喜欢使用 root 提示。
这是来自我们的named.conf文件的主要配置。任何有助于提高性能的指针都会很棒。
options{
allow-recursion { any; };
allow-query-cache { any; };
allow-query { any; };
listen-on port 53 { any; };
listen-on-v6 port 53 { any; };
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
zone-statistics yes;
max-cache-ttl 3600;
max-ncache-ttl 3600;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file …Run Code Online (Sandbox Code Playgroud) domain-name-system performance bind slow-connection recursive
我有两个测试服务器主从:
主人正在更新奴隶,但速度很慢。如何加快速度。
大师 (192.168.0.122) /etc/named.conf
zone "domain.com." {
type master;
file "caching-example/domain.com.db";
//allow-update { key rndc-key;};
notify yes;
also-notify { 192.168.0.66; };
allow-transfer { 192.168.0.66; };
};
Run Code Online (Sandbox Code Playgroud)
从 (192.168.0.66) /etc/named.conf
zone "domain.com" {
type slave;
file "caching-example/domain.com.db";
//allow-update { key rndc-key; };
//allow-transfer { none; };
allow-notify { 192.168.0.122; };
masters { 192.168.0.122; };
}
Run Code Online (Sandbox Code Playgroud)
主 /var/named/caching-example/domain.com.db 区域
$TTL 3600
$ORIGIN domain.com.
@ IN SOA darkstar.example.net. root.example.net. (
2012033101 ; Serial
3600 ; Refresh
1800 ; Retry
604800 ; Expire …Run Code Online (Sandbox Code Playgroud)