smartdns
smartdns copied to clipboard
海外域名分流问题
你好下面是我的配置。其中5,6,16,18行是用来搭配起来进行海外域名分流的,但是最近发现海外域名还会被其他的server解析,我该如何配置达到专用域名到专用server解析了。
- nd [::]:53@eth0
- speed-check-mode ping,tcp:80,tcp:443
- cache-size 32768
- cache-persist yes
- server 120.133.231.75 -group oversea -exclude-default-group
- server 120.133.224.104 -group oversea -exclude-default-group
- server 114.114.114.114
- server 202.96.209.133
- server 223.5.5.5
- server 100.100.2.136 -group ubras -exclude-default-group
- server 100.100.2.138 -group ubras -exclude-default-group
- server 211.137.58.20
- server 218.104.111.114
- server-https https://8.8.4.4/dns-query -exclude-default-group
- server-https https://1.0.0.1/dns-query -exclude-default-group
- domain-set -name ad -file /etc/smartdns/ad-list.conf
- domain-set -name ubras -file /etc/smartdns/ubras_cn.conf
- nameserver /domain-set:ad/oversea
- nameserver /domain-set:ubras/ubras
- serve-expired yes
- serve-expired-ttl 259200
- serve-expired-reply-ttl 3
- prefetch-domain yes
- serve-expired-prefetch-time 21600
- cache-checkpoint-time 86400
- server-name Ubras
- expand-ptr-from-address yes
- address /it.ubras.cn/10.128.0.6
- address /it.ubras.cn/47.94.81.236
- address /test.vm/10.129.5.31
- #nameserver /www.google.com/120.133.231.107
- force-qtype-SOA 65
估计是ad-list.conf不全,一些域名对应的cname没有加进去
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