IrineSistiana / mosdns

一个 DNS 转发器
GNU General Public License v3.0
3k stars 340 forks source link

[Bug] 解析www.163.com 返回的结果是NXDOMAIN #616

Closed yyysuo closed 1 year ago

yyysuo commented 1 year ago

在提交之前,请确认

mosdns 版本

v5.1

操作系统

openwrt

Bug 描述和复现步骤

chrome访问www.163.com,提示ERR_NAME_NOT_RESOLVED,无法访问。

使用的配置文件

log:
  level: info
  file: "/tmp/mosdns.log"

plugins:
  - tag: geosite_cn
    type: domain_set
    args:
      files:
        - "/var/mosdns/geosite_cn.txt"

  - tag: geoip_cn
    type: ip_set
    args:
      files:
        - "/var/mosdns/geoip_cn.txt"

  - tag: geosite_no_cn
    type: domain_set
    args:
      files:
        - "/var/mosdns/geosite_geolocation-!cn.txt"

  - tag: whitelist
    type: domain_set
    args:
      files:
        - "/etc/mosdns/rule/whitelist.txt"

  - tag: blocklist
    type: domain_set
    args:
      files:
        - "/etc/mosdns/rule/blocklist.txt"

  - tag: greylist
    type: domain_set
    args:
      files:
        - "/etc/mosdns/rule/greylist.txt"

  - tag: hosts
    type: hosts
    args:
      files:
        - "/etc/mosdns/rule/hosts.txt"

  - tag: redirect
    type: redirect
    args:
      files:
        - "/etc/mosdns/rule/redirect.txt"

  - tag: adlist
    type: domain_set
    args:
      files:
        - "/var/disable-ads.txt"

  - tag: local_ptr
    type: domain_set
    args:
      files:
        - "/etc/mosdns/rule/local-ptr.txt"

  - tag: sp_low
    type: domain_set
    args:
      files:
        - "/usr/share/mosdns/sp_low.tdata"

  - tag: cache
    type: cache
    args:
      size: 20000000
      lazy_cache_ttl: 259200000

  - tag: forward_local
    type: forward
    args:
      upstreams:
        - addr: 10.10.10.1:8055
          bootstrap: 223.5.5.5

  - tag: forward_remote
    type: forward
    args:
      upstreams:
        - addr: 10.10.10.1:5335
          enable_pipeline: false

  - tag: modify_ttl
    type: sequence
    args:
      - exec: ttl 0-0

  - tag: local_sequence
    type: sequence
    args:
      - exec: metrics_collector $forward_local
      - exec: $forward_local

  - tag: remote_sequence
    type: sequence
    args:
      - exec: prefer_ipv4
      - exec: metrics_collector $forward_remote
      - exec: $forward_remote

  - tag: has_resp_sequence
    type: sequence
    args:
      - exec: $modify_ttl
      - matches: has_resp
        exec: accept

  - tag: query_is_local_ip
    type: sequence
    args:
      - exec: $local_sequence
      - matches: resp_ip $geoip_cn
        exec: accept
      - exec: reject

  - tag: query_is_remote
    type: sequence
    args:
      - exec: $remote_sequence
      - exec: accept

  - tag: fallback
    type: fallback
    args:
      primary: query_is_local_ip
      secondary: query_is_remote
      threshold: 500
      always_standby: false

  - tag: query_is_local_domain
    type: sequence
    args:
      - matches: qname $geosite_cn
        exec: $local_sequence

  - tag: query_is_no_local_domain
    type: sequence
    args:
      - matches: qname $geosite_no_cn
        exec: $remote_sequence

  - tag: query_is_whitelist_domain
    type: sequence
    args:
      - matches: qname $whitelist
        exec: $local_sequence
      - exec: jump has_resp_sequence

  - tag: query_is_greylist_domain
    type: sequence
    args:
      - matches: qname $greylist
        exec: $remote_sequence

  - tag: query_is_reject_domain
    type: sequence
    args:
      - matches: qname $blocklist
        exec: reject 3
      - matches: qname $adlist
        exec: reject 3
      - matches: qname $sp_low
        exec: reject 3
      - matches:
        - qtype 12
        - qname $local_ptr
        exec: reject 3
      - matches: qtype 65
        exec: reject 3

  - tag: main_sequence
    type: sequence
    args:
      - exec: $hosts
      - exec: jump has_resp_sequence
      - exec: $redirect
      - exec: jump has_resp_sequence
      - exec: $query_is_whitelist_domain
      - exec: $query_is_reject_domain
      - exec: $cache
      - exec: jump has_resp_sequence
      - exec: $query_is_greylist_domain
      - exec: jump has_resp_sequence
      - exec: $query_is_local_domain
      - exec: jump has_resp_sequence
      - exec: $query_is_no_local_domain
      - exec: jump has_resp_sequence
      - exec: $fallback

  - tag: udp_server
    type: udp_server
    args:
      entry: main_sequence
      listen: ":5454"

  - tag: tcp_server
    type: tcp_server
    args:
      entry: main_sequence
      listen: ":5454"

mosdns 的 log 记录

No response

urlesistiana commented 1 year ago

和 mosdns 无关。

检查一下你用的屏蔽列表。

yyysuo commented 1 year ago

和 mosdns 无关。

检查一下你用的屏蔽列表。

不好意思,误报了。 https://github.com/sbwml/luci-app-mosdns/tree/v5-dev 此luci引用了这个可疑网站列表:http://www.dshield.org/feeds/suspiciousdomains_Low.txt 然后这个列表不知道为什么,把www.163.com给加进去了。