服务器安装环境:
CentOS Linux release 7.9.2009 (Core)
安装包下载地址
:https://github.com/pymumu/smartdns/releases
下载安装文件文件名:
smartdns.1.2021.08.27-1923.x86-linux-all.tar.gz
如果无法访问github或者访问速度慢,可以参考这篇加速方法
https://www.toutiao.com/a6992148043852202533/?channel=&source=search_tab
安装步骤
tar xvf smartdns.1.2021.08.27-1923.x86-linux-all.tar.gz
cd smartdns
chmod +x ./install
./install -i
修改配置文件
vim /etc/smartdns/smartdns.conf
绑定任意53端口,打开文件中注释部分即可
bind [::]:53
缓存大小
cache-size 4096
禁止IPv6解析,用IPv4速度更快
force-AAAA-SOA yes
增加UDP类型上游DNS,用于国内解析域名
server 114.114.114.114
server 223.5.5.5
server 119.29.29.29
增加LTS类型,用于国外解析域名
server-tls 8.8.8.8
server-tls 8.8.4.4
server-tls 1.1.1.1
启动服务
systemctl enable smartdns
systemctl start smartdns
客户端设置此台服务器ip为dns即可。