smartdns icon indicating copy to clipboard operation
smartdns copied to clipboard

海外域名分流问题

Open rumij opened this issue 1 year ago • 2 comments

   你好下面是我的配置。其中5,6,16,18行是用来搭配起来进行海外域名分流的,但是最近发现海外域名还会被其他的server解析,我该如何配置达到专用域名到专用server解析了。
  1. nd [::]:53@eth0
  2. speed-check-mode ping,tcp:80,tcp:443
  3. cache-size 32768
  4. cache-persist yes
  5. server 120.133.231.75 -group oversea -exclude-default-group
  6. server 120.133.224.104 -group oversea -exclude-default-group
  7. server 114.114.114.114
  8. server 202.96.209.133
  9. server 223.5.5.5
  10. server 100.100.2.136 -group ubras -exclude-default-group
  11. server 100.100.2.138 -group ubras -exclude-default-group
  12. server 211.137.58.20
  13. server 218.104.111.114
  14. server-https https://8.8.4.4/dns-query -exclude-default-group
  15. server-https https://1.0.0.1/dns-query -exclude-default-group
  16. domain-set -name ad -file /etc/smartdns/ad-list.conf
  17. domain-set -name ubras -file /etc/smartdns/ubras_cn.conf
  18. nameserver /domain-set:ad/oversea
  19. nameserver /domain-set:ubras/ubras
  20. serve-expired yes
  21. serve-expired-ttl 259200
  22. serve-expired-reply-ttl 3
  23. prefetch-domain yes
  24. serve-expired-prefetch-time 21600
  25. cache-checkpoint-time 86400
  26. server-name Ubras
  27. expand-ptr-from-address yes
  28. address /it.ubras.cn/10.128.0.6
  29. address /it.ubras.cn/47.94.81.236
  30. address /test.vm/10.129.5.31
  31. #nameserver /www.google.com/120.133.231.107
  32. force-qtype-SOA 65

rumij avatar Sep 04 '24 07:09 rumij

估计是ad-list.conf不全,一些域名对应的cname没有加进去

PikuZheng avatar Sep 05 '24 00:09 PikuZheng

vi /etc/smartdns/smartdns.conf

DNS 服务器名称

server-name smartdns

指定监听的端口号

bind [::]:53 -force-aaaa-soa

关闭缓存

cache-size 0

禁用全局测速

speed-check-mode none

指定上游服务器

server-tls 8.8.8.8

开启日志审计

audit-enable no audit-file /var/log/smartdns/smartdns-audit.log

屏蔽规则

domain-set -name block -file /etc/smartdns/diylist.conf address /domain-set:block/127.0.0.1

需要定期执行 getcn.sh脚本来更新规则

domain-set -name cnlist -file /etc/smartdns/chinadomainlist.conf address /domain-set:cnlist/#

vi getcn.sh

dlist=/etc/smartdns/chinadomainlist.conf curl -o $dlist https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/direct-list.txt sed -i '/:/d' $dlist service smartdns restart

hjfxyz avatar Sep 05 '24 12:09 hjfxyz