dnsmasq如何设置本地缓存的时间,超过这个时间向上游发起请求再次查询?

新手上路,请多包涵

dnsmasq如何设置本地缓存的时间,超过这个时间向上游发起请求再次查询?

阅读 2.2k
1 个回答

dnsmasq 的配置文件/etc/dnsmasq.conf:

# Set the cache size
cache-size=1000

# Set the minimum TTL for entries in the cache.
# The default is 0, which means "use the TTL from the upstream server"
min-cache-ttl=3600

保存然后关闭配置文件。

最后重启 一下dnsmasq 服务 sudo systemctl restart dnsmasq 或 sudo service dnsmasq restart

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题