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

新手上路,请多包涵

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

阅读 2.4k
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

推荐问题