我正在使用另一个dns解析器,blocky,并与systemd-resolved一起使用。blocky已经有了缓存和预取等功能。因此,我不希望systemd-resolved运行一个缓存并干扰blocky's预取,但是如何禁用系统解析的“缓存”呢?
配置文件:
/etc/systemd/resolved.conf.d/dns.conf
[Resolve]
#blocky
DNS=127.0.0.10
DNSSEC=yes
# how to disable cache?
cache=no
FallbackDNS=84.200.69.80 8.8.8.8 2001:1608:10:25::9249:d69b 2001:4860:4860::8844
Domains=~.设置cache=no没有任何效果。systemd-resolved统计:
❯ systemd-resolve --statistics
DNSSEC supported by current servers: yes
Transactions
Current Transactions: 2
Total Transactions: 4008
Cache
Current Cache Size: 189
Cache Hits: 1044
Cache Misses: 3072
DNSSEC Verdicts
Secure: 230
Insecure: 410
Bogus: 731
Indeterminate: 0PS:我可以直接使用blocky,但systemd-resolved更好地处理各种网络场景中的DNS。
发布于 2022-09-28 12:40:14
它是‘缓存’,而不是缓存。系统d配置区分大小写.
https://unix.stackexchange.com/questions/718999
复制相似问题