Notice: Undefined index: scheme in /www/wwwroot/qq.wanuse.com/wp-includes/canonical.php on line 751

Notice: Undefined index: host in /www/wwwroot/qq.wanuse.com/wp-includes/canonical.php on line 716

Notice: Undefined index: host in /www/wwwroot/qq.wanuse.com/wp-includes/canonical.php on line 727

Notice: Undefined index: host in /www/wwwroot/qq.wanuse.com/wp-includes/canonical.php on line 730

Notice: Undefined index: scheme in /www/wwwroot/qq.wanuse.com/wp-includes/canonical.php on line 751
Alpine linux系统安装smartDNS服务器实现DNS防污染快速查询 - DDD网络科技
使用互联网记录分享(Wide Area Network use :更好地使用互联网。)
Alpine linux系统安装smartDNS服务器实现DNS防污染快速查询

Alpine linux系统安装smartDNS服务器实现DNS防污染快速查询

Alpine linux系统安装smartDNS服务器实现DNS防污染快速查询

alpine是一个轻量级的Linux发行版本,体积非常小。

smartdns支持配置多个上游 DNS 服务器,并同时进行查询,并且支持加密协议(Dot和Doh)以及非 53 端口查询。

首先安装alpine(以前已经写过记录地址在这里:VMware ESXI Alpine Linux 安装记录)

alpine安装后 到官网下载https://github.com/pymumu/smartdns/releases

网盘下载地址:https://cowtransfer.com/s/1c636fb665174f [ smartdns-x86_64] ,输入传输口令 vs9ahb

wget https://github.com/pymumu/smartdns/releases/download/Release38/smartdns-x86_64

重命名

mv ./smartdns-x86_64 ./smartdns

设置权限

chmod +x ./smartdns

移动

mv ./smartdns /sbin

创建配置文件目录

mkdir /etc/smartdns/

编辑配置文件

vi /etc/smartdns/smartdns.conf

我的smartdns配置文件内容

server-name smartdns
bind :53
bind-tcp :53
cache-size 1536
cache-persist yes
cache-file /tmp/smartdns.cache
tcp-idle-time 120
rr-ttl 600
rr-ttl-min 60
rr-ttl-max 600
rr-ttl-reply-max 60
local-ttl 60
prefetch-domain yes
max-reply-ip-num 1
log-level info
log-size 128K
server-tls 8.8.4.4:853
server-tls 9.9.9.9:853
server-tcp 114.114.114.114:53
server-tcp 223.5.5.5:53
server-tcp 180.76.76.76:53
server-tcp 202.99.160.68:53
speed-check-mode ping,tcp:80,tcp:443
response-mode first-ping
serve-expired yes
force-AAAA-SOA yes

测试前台运行

smartdns -f -c /etc/smartdns/smartdns.conf

现在smartdns已经正常工作,我的smartdns服务器地址是192.168.1.53设置电脑dns地址192.168.1.53

在win10中测试 点击搜索cmd打开命令窗口 输入

#清除dns缓存命令
ipconfig /flushdns
#查看dns服务名称命令
nslookup -querytype=ptr smartdns  
#查看dns解释结果命令
nslookup www.baidu.com
#查看dns解释结果命令指定dns服务器返回结果
nslookup www.baidu.com 114.114.114.114

正常运行则返回 dns名称 smartdns 测试完成 ctrl+c

加入开机 启动

#把这条命令加到下面 smartdns.start
nohup smartdns -f -c /etc/smartdns/smartdns.conf >/dev/null 2>&1 &

编辑启动文件

vi /etc/local.d/smartdns.start
完成后执行下面
cd  /etc/local.d
chmod +x smartdns.start
rc-update add local

重启主机完成。

2022年10月7日 13:55:58更新smartdns安装方式

登录终端后
cd ..
wget https://github.com/pymumu/smartdns/releases/download/Release37.2/smartdns.1.2022.08.28-1734.x86_64-linux-all.tar.gz
tar zxf smartdns.1.2022.08.28-1734.x86_64-linux-all.tar.gz
cd smartdns
chmod +x ./install
mkdir /etc/default/
./install -i
编辑配置
vi /etc/smartdns/smartdns.conf
-------------------------------------------
server-name smartdns
bind :53
bind-tcp :53
cache-size 3096
cache-file /tmp/smartdns.cache
cache-persist yes
tcp-idle-time 120
rr-ttl 600
rr-ttl-min 60
rr-ttl-max 600
rr-ttl-reply-max 60
local-ttl 60
prefetch-domain yes
max-reply-ip-num 1
log-level info
log-size 128K
#-------dns-----------
server-https https://cloudflare-dns.com/dns-query
server-tls 1.1.1.1:853
server-tls 8.8.4.4:853
server-tls 9.9.9.9:853
server-tcp 114.114.114.114:53
server-tcp 223.5.5.5:53
server-tcp 180.76.76.76:53
server-tcp 202.99.160.68:53
server-tpc 8.8.4.4:53                            
server-tpc 9.9.9.9:53        
#----------------            
speed-check-mode ping,tcp:80,tcp:443
response-mode fastest-ip            
serve-expired yes                   
force-AAAA-SOA yes 
         
   
---------------------------


重启
service smartdns restart
启动
service smartdns start
停止
service smartdns stop
加入开机启动
rc-update add smartdns boot

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注