Replies: 1 comment
-
不知道。 ptr 报错看置顶的 issus。 智能设备局域网连不上很可能是你路由防火墙的问题,设备无法互相发现。和 dns 应该没什么关系。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
2022-02-21T17:33:02.181Z warn mem_cache cache/cache.go:163 failed to update lazy cache {"query": "177.20.97.202.in-addr.arpa. IN PTR 18761 1677 192.168.0.36", "error": "forward_local: context deadline exceeded"}
2022-02-21T17:33:02.210Z warn main_server dns_handler/server_handler.go:119 entry returned an err {"query": "85.102.97.202.in-addr.arpa. IN PTR 35134 1678 192.168.0.36", "error": "hosts: main_sequence: mem_cache: forward_local: context deadline exceeded"}
2022-02-21T17:33:26.090Z warn forward_remote bundled_upstream/bundled_upstream.go:91 upstream failed {"query": "76.252.55.116.in-addr.arpa. IN PTR 44749 1711 192.168.0.28", "from": "https://dns.233py.com:443/dns-query", "error": "got status code 503 from https://dns.233py.com:443/dns-query"}
2022-02-21T17:33:35.758Z warn forward_remote bundled_upstream/bundled_upstream.go:91 upstream failed {"query": "66.246.110.36.in-addr.arpa. IN PTR 41942 1733 192.168.0.36", "from": "https://dns.233py.com:443/dns-query", "error": "got status code 503 from https://dns.233py.com:443/dns-query"}
如题,查看mosdns日志,发现大量查询ip.in-addr.arpa.的错误,主要是智能家电进行查询,比如我的360扫地机,此时连局域网的时候是无法通过手机app控制扫地机,点击没反应。断开wifi走流量就能控制了。以下是我的配置:
`log:
level: info
file: ''
plugin:
################# 服务器插件 ################
启动服务器的插件
tag: main_server
type: server
args:
entry: # 这个服务器插件收到请求后会
- hosts
- main_sequence # 运行主执行序列
- modify_ttl # 修改应答的 ttl
server: # 监听以下协议和端口
- protocol: udp
addr: 0.0.0.0:53
- protocol: tcp
addr: 0.0.0.0:53
################# 可执行插件 ################
type: 'hosts'
args:
hosts: # resource record
- 'ext:/etc/mosdns/hosts' # 以
ext:
开头,从外部文件导入。- tag: arbitrary
type: 'arbitrary'
args:
rr: # resource record
- 'ext:/etc/mosdns/rr.txt' # 以
ext:
开头,从外部文件导入。包含分流的逻辑的插件
tag: main_sequence
type: sequence
args:
exec:
- if:
- qtype65
exec:
- block
- _return # 返回。不再执行后续插件
修改CDN缓存
type: 'blackhole'
args:
ipv4: '162.159.131.143' # 如果请求类型是 A,则生成 IP 为该地址的应答。请修改为自己的CDN测速结果。
缓存
type: 'cache'
args:
redis: 'redis://redis:6379/0'
size: 512000
lazy_cache_ttl: 259200
lazy_cache_reply_ttl: 30
修改应答 ttl
tag: 'modify_ttl'
type: 'ttl'
args:
minimal_ttl: 300
maximum_ttl: 3600
tag: qtype65
type: query_matcher
args:
qtype: [65]
tag: block
type: blackhole
args:
rcode: '0'
ipv4: '127.0.0.1'
ipv6: '::1'
转发请求至本地服务器的插件
type: forward
args:
upstream:
- addr: 222.172.200.68
- addr: quic://c.passcloud.xyz:784
- addr: https://i.233py.com/dns-query
转发请求至远程服务器的插件
type: forward
args:
upstream:
- addr: https://1.1.1.1/dns-query
- addr: https://dns.233py.com/dns-query
- addr: quic://c.passcloud.xyz:784
################ 匹配器插件 #################
匹配 IP 的插件
type: response_matcher
args:
ip:
- '1.1.1.0/24'
- '1.0.0.0/24'
- '1.1.1.1/32'
- '1.0.0.1/32'
- '103.21.244.0/22'
- '103.22.200.0/22'
- '103.31.4.0/22'
- '104.16.0.0/13'
- '104.24.0.0/14'
- '108.162.192.0/18'
- '131.0.72.0/22'
- '141.101.64.0/18'
- '162.158.0.0/15'
- '172.64.0.0/13'
- '173.245.48.0/20'
- '188.114.96.0/20'
- '190.93.240.0/20'
- '197.234.240.0/22'
- '198.41.128.0/17'
- '2606:4700:10::6814:0/112'
- '2606:4700:10::ac43:0/112'
- '2606:4700:3000::/48'
- '2606:4700:3001::/48'
- '2606:4700:3002::/48'
- '2606:4700:3003::/48'
- '2606:4700:3004::/48'
- '2606:4700:3005::/48'
- '2606:4700:3006::/48'
- '2606:4700:3007::/48'
- '2606:4700:3008::/48'
- '2606:4700:3009::/48'
- '2606:4700:3010::/48'
- '2606:4700:3011::/48'
- '2606:4700:3012::/48'
- '2606:4700:3013::/48'
- '2606:4700:3014::/48'
- '2606:4700:3015::/48'
- '2606:4700:3016::/48'
- '2606:4700:3017::/48'
- '2606:4700:3018::/48'
- '2606:4700:3019::/48'
- '2606:4700:3020::/48'
- '2606:4700:3021::/48'
- '2606:4700:3022::/48'
- '2606:4700:3023::/48'
- '2606:4700:3024::/48'
- '2606:4700:3025::/48'
- '2606:4700:3026::/48'
- '2606:4700:3027::/48'
- '2606:4700:3028::/48'
- '2606:4700:3029::/48'
- '2606:4700:3030::/48'
- '2606:4700:3031::/48'
- '2606:4700:3032::/48'
- '2606:4700:3033::/48'
- '2606:4700:3034::/48'
- '2606:4700:3035::/48'
- '2606:4700:3036::/48'
- '2606:4700:3037::/48'
- '2606:4700:3038::/48'
- '2606:4700:3039::/48'
匹配本地域名的插件
type: query_matcher
args:
domain:
- 'ext:./geosite.dat:cn'
匹配非本地域名的插件
type: query_matcher
args:
domain:
- 'ext:./geosite.dat:geolocation-!cn'
匹配广告域名的插件
type: query_matcher
args:
domain:
- 'ext:./geosite.dat:category-ads-all'
匹配本地 IP 的插件
type: response_matcher
args:
ip:
- 'ext:./geoip.dat:cn'`
Beta Was this translation helpful? Give feedback.
All reactions