forked from pymumu/smartdns
-
Notifications
You must be signed in to change notification settings - Fork 11
安装配置 smartdns 作为 dot 服务器
PikuZheng edited this page Nov 14, 2023
·
1 revision
smartdns 作为 dot 服务器,需要 v41.0.12 或更高版本
smartdns 作为 dot 服务器非常简单。此处以 debian 12系统为例作以记录:
- 建立配置文件 /etc/smartdns/smartdns.conf :
bind-tls :853
bind-cert-file /etc/smartdns/smartdns-cert.pem
bind-cert-key-file /etc/smartdns/smartdns-key.key
log-num 1
server-tls dns.google -subnet 140.238.42.0
speed-check-mode none
force-qtype-SOA 28 65
response-mode fastest-response
serve-expired no
dualstack-ip-selection no
其他配置取默认值。请按自己需要增减配置。
- 下载 smartdns 运行时必要的文件。目前(此 wiki 编辑时)最新版本是 v43.0.32
wget https://github.com/PikuZheng/smartdns/raw/master/systemd/smartdns.service -O /etc/systemd/system/smartdns.service
wget https://raw.githubusercontent.com/PikuZheng/smartdns/master/etc/default/smartdns -O /etc/default/smartdns
wget https://github.com/PikuZheng/smartdns/releases/download/1.2023.v43.0.32/smartdns-x86_64 -O /usr/sbin/smartdns
chmod +x /usr/sbin/smartdns
systemctl daemon-reload
systemctl enable smartdns
systemctl start smartdns #立即启动
- 检查运行情况
netstat -tnlp | grep smartdns
如果正确显示了853端口监听,即为运行正常。