多海外出口dns
问题现象
目前有10个海外出口,有10个上游地址,不同用户走不同的海外出口,dns这面根据不同的源地址进行区分用户组,也就是英国源地址走英国dns请求,但是还需要增加一个海外域名表,命中才能解析走海外。我该怎么配置了。
下面是我的配置文件
International upstream DNS groups.
Add "-interface " or "-set-mark " to each line
when the DNS query itself must be forced through a particular egress.
server India -group India -exclude-default-group server Turkey -group Turkey -exclude-default-group server Germany -group Germany -exclude-default-group server Jakarta -group Jakarta -exclude-default-group server Singapore -group Singapore -exclude-default-group server US -group US -exclude-default-group server HK -group HK -exclude-default-group server Japan -group Japan -exclude-default-group
Domain sets.
domain-set -name overseas -file /etc/smartdns/ad-list.conf domain-set -name feishu -file /etc/smartdns/feishu.conf
Client source-address files: one client IP/CIDR may belong to one file only.
ip-set -name users-india -file /etc/smartdns/users/india.conf ip-set -name users-turkey -file /etc/smartdns/users/turkey.conf ip-set -name users-germany -file /etc/smartdns/users/germany.conf ip-set -name users-jakarta -file /etc/smartdns/users/jakarta.conf ip-set -name users-singapore -file /etc/smartdns/users/singapore.conf ip-set -name users-us -file /etc/smartdns/users/us.conf ip-set -name users-hk -file /etc/smartdns/users/hk.conf ip-set -name users-japan -file /etc/smartdns/users/japan.conf
Client source address -> egress DNS group.
client-rules ip-set:users-india -group India client-rules ip-set:users-turkey -group Turkey client-rules ip-set:users-germany -group Germany client-rules ip-set:users-jakarta -group Jakarta client-rules ip-set:users-singapore -group Singapore client-rules ip-set:users-us -group US client-rules ip-set:users-hk -group HK client-rules ip-set:users-japan -group Japan
A client selected into a group uses only that group's upstream DNS when the
queried domain matches the overseas domain set. All other domains inherit the
default DNS rules above.
group-begin India -inherit default nameserver /domain-set:overseas/India group-end
group-begin Turkey -inherit default nameserver /domain-set:overseas/Turkey group-end
group-begin Germany -inherit default nameserver /domain-set:overseas/Germany group-end
group-begin Jakarta -inherit default nameserver /domain-set:overseas/Jakarta group-end
group-begin Singapore -inherit default nameserver /domain-set:overseas/Singapore group-end
group-begin US -inherit default nameserver /domain-set:overseas/US group-end
group-begin HK -inherit default nameserver /domain-set:overseas/HK group-end
group-begin Japan -inherit default nameserver /domain-set:overseas/Japan group-end
Feishu domains always use the Feishu DNS group.
nameserver /domain-set:feishu/feishu
force-qtype-SOA 65 audit-enable yes audit-num 16 audit-size 16M audit-file /var/log/smartdns/smartdns-audit.log
Source: pymumu/smartdns