daeuniverse / dae

eBPF-based Linux high-performance transparent proxy solution.
GNU Affero General Public License v3.0
3.15k stars 194 forks source link

[Bug Report] When using the latest build version, the IPV6 DNS server is not functioning. #358

Closed tty228 closed 11 months ago

tty228 commented 11 months ago

Checks

Current Behavior

When using the latest build version, the IPV6 DNS server is not functioning. It was working fine in v0.4.0rc1. It is related to the update mentioned in https://github.com/daeuniverse/dae/pull/301.

nslookup qq.com DNS request timed out. timeout was 2 seconds. 服务器: UnKnown Address: fd00::1

DNS request timed out. timeout was 2 seconds.

nslookup qq.com 240e:351:d66e:8900:2cb8:91ff:fe64:2d66 DNS request timed out. timeout was 2 seconds. 服务器: UnKnown Address: 240e:351:d66e:8900:2cb8:91ff:fe64:2d66

DNS request timed out. timeout was 2 seconds.

Expected Behavior

DNS server is functioning properly.

v0.4.0rc1:

nslookup qq.com 服务器: UnKnown Address: fd00::1

非权威应答: 名称: qq.com Addresses: 123.150.76.218 113.108.81.189

nslookup qq.com 240e:351:d66e:8900:2cb8:91ff:fe64:2d66 服务器: UnKnown Address: 240e:351:d66e:8900:2cb8:91ff:fe64:2d66

非权威应答: 名称: qq.com Addresses: 123.150.76.218 113.108.81.189

Steps to Reproduce

I am using a single Ethernet port OpenWrt X86/64 router with DAE. On this machine, once upgraded to the latest build version, this issue reoccurs, whether it's dae-linux-x86_64 or dae-linux-x86_64_v3_avx2.

I attempted to restore the DNS and routing rules to the default values below, but it had no effect.

dns {
  upstream {
    googledns: 'tcp+udp://dns.google.com:53'
    alidns: 'udp://dns.alidns.com:53'
  }
  routing {
    # According to the request of dns query, decide to use which DNS upstream.
    # Match rules from top to bottom.
    request {
      # Lookup China mainland domains using alidns, otherwise googledns.
      qname(geosite:cn) -> alidns
      # fallback is also called default.
      fallback: googledns
    }
  }
}

routing {
  pname(NetworkManager, systemd-resolved, dnsmasq) -> must_direct
  dip(224.0.0.0/3, 'ff00::/8') -> direct

  ### 以下为自定义规则

  # 禁用 h3,因为它通常消耗很多 CPU 和内存资源
  l4proto(udp) && dport(443) -> block
  dip(geoip:private) -> direct
  dip(geoip:cn) -> direct
  domain(geosite:cn) -> direct

  fallback: proxy
}

In the initial query, only these two relevant logs were displayed: level=info msg="[fd00::201]:62166 <-> 223.5.5.5:53" _qname=qq.com. dialer=direct dscp=0 mac="24:4b:fe:87:0c:a2" network="udp4(DNS) " outbound=direct pid=0 pname= policy=fixed qtype=A level=info msg="[fd00::201]:62167 <-> 223.5.5.5:53" _qname=qq.com. dialer=direct dscp=0 mac="24:4b:fe:87:0c:a2" network="udp4(DNS) " outbound=direct pid=0 pname= policy=fixed qtype=AAAA

Subsequent queries only show logs similar to the following: level=debug msg="UDP(DNS) [fd00::201]:52000 <-> Cache: qq.com. A" level=debug msg="UDP(DNS) [fd00::201]:52001 <-> Cache: qq.com. AAAA" level=debug msg="UDP(DNS) [fd00::201]:52002 <-> Cache: qq.com. A" level=debug msg="UDP(DNS) [fd00::201]:52003 <-> Cache: qq.com. AAAA"

Environment

Anything else?

More logs: dae.log

dae-prow[bot] commented 11 months ago

Thanks for opening this issue!

tty228 commented 11 months ago

和群友讨论之后确定是我旁路网关环境的问题,主路由不能复现,先关闭了