我在我的FreeBSD 10桌面上使用Unbound作为本地DNS缓存解析器,但是,我不知道如何在它的配置文件中为" cache -min-ttl“确定一个适当的值。我在谷歌上搜索过,但似乎没有什么明确的答案。目前,1800是我的选择,但不确定。以下是我的Unbound配置文件:
server:
interface: 0.0.0.0
verbosity: 1
cache-min-ttl: 1800
logfile: /var/unbound/unbound.log
pidfile: /var/run/local_unbound.pid
forward-zone:
name: "."
forward-addr: 114.114.114.114 # 114 DNS
forward-addr: 114.114.115.115 # 114 DNS
forward-addr: 8.8.8.8 # Google Public DNS
forward-addr: 8.8.4.4 # Google Public DNS
forward-addr: 199.85.126.10 # Norton DNS
forward-addr: 199.85.127.10 # Norton DNS发布于 2014-04-22 12:33:56
对于桌面,您不需要自己编写配置文件。脚本local-unbound-setup将自动为您执行此操作。自动生成的设置如下所示:
# Generated by local-unbound-setup
server:
username: unbound
directory: /var/unbound
chroot: /var/unbound
pidfile: /var/run/local_unbound.pid
auto-trust-anchor-file: /var/unbound/root.key(您在resolv.conf中拥有的名称服务器将添加到/var/unbound/forward.conf中。见/usr/sbin/local-unbound-setup.)
这意味着cache-min-ttl保持在它的默认值,根据unbound.conf(5)手册页,它是零;
cache-min-ttl: <seconds>
Time to live minimum for RRsets and messages in the cache.
Default is 0. If the the minimum kicks in, the data is cached
for longer than the domain owner intended, and thus less queries
are made to look up the data. Zero makes sure the data in the
cache is as the domain owner intended, higher values, especially
more than an hour or so, can lead to trouble as the data in the
cache does not match up with the actual data any more.https://stackoverflow.com/questions/21799834
复制相似问题