sbwml / luci-app-mosdns

一个 DNS 转发器 - OpenWrt 🎁 MosDNS v5 is Ready! 🎉
https://github.com/IrineSistiana/mosdns
1.1k stars 214 forks source link

dnsmasq的缓存设置为0之后,DNS查询的TTL始终为0 #193

Closed returnL closed 6 months ago

returnL commented 6 months ago

使用luci-app-mosdns开启mosdns之后,dnsmasq的DNS缓存被设置为0。 通过53端口的DNS查询的TTL始终为0,导致使用该DNS的设备不断发起DNS请求。 但是如果直接使用mosdns的5335端口查询DNS,TTL不会始终为0。 请问这是预期行为吗?

sbwml commented 6 months ago

不清楚,晚点我核实下。

returnL commented 6 months ago

好的,麻烦了

sbwml commented 6 months ago

这个问题似乎我没法复现(OpenWrt 23.05.2),dnsmasq-full - 2.89-4

PS:自从我发现并使用 MosDNS 这个项目以来,Dnsmasq 缓存我一直设置为 0。 image

TTL 是上游解析到的结果 image

这是我的 dnsmasq 配置文件:/etc/config/dhcp

config dnsmasq
    option domainneeded '1'
    option localise_queries '1'
    option local '/lan/'
    option domain 'lan'
    option expandhosts '1'
    option authoritative '1'
    option readethers '1'
    option leasefile '/tmp/dhcp.leases'
    option localservice '1'
    option ednspacket_max '1232'
    option localuse '1'
    option rebind_protection '0'
    option noresolv '1'
    option cachesize '0'
    list server '127.0.0.1#5335'
sbwml commented 6 months ago

MosDNS LuCI DDNS 列表的 TTL 也可以正常被强制 5s

image

returnL commented 6 months ago

感谢。我使用的是ImmortalWrt 23.05.1,可能和OpenWrt有些不同,我自己再排查一下。

dsyo2008 commented 6 months ago

感谢。我使用的是ImmortalWrt 23.05.1,可能和OpenWrt有些不同,我自己再排查一下。

真是一样问题,看来是immortalwrt问题,始终是0

sbwml commented 6 months ago

你试试直接关闭mosdns,然后dnsmasq 设置0缓存看看是不是也是 0 ttl?

发自我的iPhone

在 2024年2月14日,22:29,dsyo2008 @.***> 写道:

 感谢。我使用的是ImmortalWrt 23.05.1,可能和OpenWrt有些不同,我自己再排查一下。

真是一样问题,看来是immortalwrt问题,始终是0

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

dsyo2008 commented 6 months ago

你试试直接关闭mosdns,然后dnsmasq 设置0缓存看看是不是也是 0 ttl? 发自我的iPhone 在 2024年2月14日,22:29,dsyo2008 @.***> 写道:  感谢。我使用的是ImmortalWrt 23.05.1,可能和OpenWrt有些不同,我自己再排查一下。 真是一样问题,看来是immortalwrt问题,始终是0 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

关闭后确实不是0 ttl,不知道哪个冲突? 图片

然后换opewrt 23.05.1解决了,应该是immortalwrt冲突吧

sbwml commented 6 months ago

不知道,没玩过imm

发自我的iPhone

在 2024年2月14日,23:47,dsyo2008 @.***> 写道:

 你试试直接关闭mosdns,然后dnsmasq 设置0缓存看看是不是也是 0 ttl? 发自我的iPhone … 在 2024年2月14日,22:29,dsyo2008 @.***> 写道:  感谢。我使用的是ImmortalWrt 23.05.1,可能和OpenWrt有些不同,我自己再排查一下。 真是一样问题,看来是immortalwrt问题,始终是0 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

关闭后确实不是0 ttl,不知道哪个冲突? default.png (view on web)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

dsyo2008 commented 6 months ago

不知道,没玩过imm 发自我的iPhone 在 2024年2月14日,23:47,dsyo2008 @.> 写道:  你试试直接关闭mosdns,然后dnsmasq 设置0缓存看看是不是也是 0 ttl? 发自我的iPhone … 在 2024年2月14日,22:29,dsyo2008 @.> 写道:  感谢。我使用的是ImmortalWrt 23.05.1,可能和OpenWrt有些不同,我自己再排查一下。 真是一样问题,看来是immortalwrt问题,始终是0 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented. 关闭后确实不是0 ttl,不知道哪个冲突? default.png (view on web) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

这imm反馈真狠心,不回应,直接ban了,不用imm吧,已经在用openwrt。建议这可以终结吧

returnL commented 6 months ago

我这关闭mosdns,把dns缓存设置为0,会出现0 ttl的情况。应该是ImmortalWrt改了什么。

sbwml commented 6 months ago

这样的话那就不是 mosdns 能解决的事情了….

发自我的iPhone

在 2024年2月15日,09:43,Lintch @.***> 写道:

 我这关闭mosdns,把dns缓存设置为0,会出现0 ttl的情况。应该是ImmortalWrt改了什么。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

returnL commented 6 months ago

把 mini_ttl(客户端缓存的最小 DNS TTL)去掉就好了

sbwml commented 6 months ago

把 mini_ttl(客户端缓存的最小 DNS TTL)去掉就好了

你把它打开,拷贝 /etc/config/dhcp 内容我看看?

returnL commented 6 months ago
config dnsmasq
        option localise_queries '1'
        option rebind_protection '0'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option localservice '1'
        option mini_ttl '3600'
        option ednspacket_max '1232'
        option domainneeded '1'
        option cachesize '0'
        option dns_redirect '1'