智能dns服务器、自建DNS服务器、自架DNS服务器、DNS分流

2024-03-08 06:20

本文主要是介绍智能dns服务器、自建DNS服务器、自架DNS服务器、DNS分流,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

smart安装链接
[https://github.com/pymumu/smartdns/releases](https://github.com/pymumu/smartdns/releases)
wget https://github.com/pymumu/smartdns/releases/download/all-best-ip/smartdns.1.2022.05.03-1046.x86_64-linux-all.tar.gz[root@localhost ~]# ls
anaconda-ks.cfg  initial-setup-ks.cfg  smartdns.1.2022.05.03-1046.x86_64-linux-all.tar.gz
[root@localhost ~]# tar zxf  smartdns.1.2022.05.03-1046.x86_64-linux-all.tar.gz
[root@localhost ~]# tar zxf  smartdns.1.2022.05.03-1046.x86_64-linux-all.tar.gz
[root@localhost ~]# cd smartdns
[root@localhost smartdns]# chmod +x ./install
[root@localhost smartdns]# ./install -i
install: 正在创建目录"/etc/smartdns"
"usr/sbin/smartdns" -> "/usr/sbin/smartdns"
"etc/smartdns/smartdns.conf" -> "/etc/smartdns/smartdns.conf"
"etc/default/smartdns" -> "/etc/default/smartdns"
"etc/init.d/smartdns" -> "/etc/init.d/smartdns"
"systemd/smartdns.service" -> "/usr/lib/systemd/system/smartdns.service"
Created symlink from /etc/systemd/system/smartdns.service to /usr/lib/systemd/system/smartdns.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/smartdns.service to /usr/lib/systemd/system/smartdns.service.
[root@localhost smartdns]# vi /etc/smartdns/smartdns.confsystemctl enable smartdns
systemctl start smartdns

飞书收集

#飞书
.feishu.cn
.q9jvw0u5f5.feishu.cn
.ccm-frontier.feishu.cn
.internal-api.feishu.cn
.hryn145hsh.feishu.cn
.internal-api-drive-stream.feishu.cn
.internal-api-lark-api.feishu.cn
.slardar-bd.feishu.cn
.ccm-frontier-hl.feishu.cn
.mcs-bd.feishu.cn
.feishucdn.com
.sf3-scmcdn2-cn.feishucdn.com
.s1-imfile.feishucdn.com 
.sf6-scmcdn-cn.feishucdn.com
.ai.feishu.com
.lf9-img-sign.bytehwm.com
.lf3-short.ibytedapm.com
.mon.zijieapi.com
#百度
.baidu.com 
#京东
.jd.com
#阿里
#淘宝
.taobao.com
#wechat
.weixin.qq.com
.qq.com
.wechat.com
.wx.qq.com
#csdn
.csdn.net 

配置文件

vi /etc/smartdns/smartdns.conf# dns server name, default is host name
# server-name,
# example:
server-name smartdns1
## Include another configuration options
# conf-file [file]
# conf-file blacklist-ip.conf# dns server bind ip and port, default dns server port is 53, support binding multi ip and port
# bind udp server
#   bind [IP]:[port] [-group [group]] [-no-rule-addr] [-no-rule-nameserver] [-no-rule-ipset] [-no-speed-check] [-no-cache] [-no-rule-soa] [-no-dualstack-selection]
# bind tcp server
# option:
#   -group: set domain request to use the appropriate server group.
#   -no-rule-addr: skip address rule.
#   -no-rule-nameserver: skip nameserver rule.
#   -no-rule-ipset: skip ipset rule.
#   -no-speed-check: do not check speed.
#   -no-cache: skip cache.
#   -no-rule-soa: Skip address SOA(#) rules.
#   -no-dualstack-selection: Disable dualstack ip selection.
#   -force-aaaa-soa: force AAAA query return SOA.
# example:
#  IPV4:
#    bind :53
#    bind :6053 -group office -no-speed-check
#  IPV6:
#    bind [::]:53
#    bind-tcp [::]:53
bind [::]:53# tcp connection idle timeout
# tcp-idle-time [second]# dns cache size
# cache-size [number]
#   0: for no cache
cache-size 4096# enable persist cache when restart
# cache-persist yes# cache persist file
# cache-file /tmp/smartdns.cache# prefetch domain
# prefetch-domain [yes|no]
#启用域名预获取
prefetch-domain yes# cache serve expired
# serve-expired [yes|no]
#启用过期缓存服务
serve-expired yes# cache serve expired TTL
# serve-expired-ttl [num]
#
serve-expired-ttl 0# reply TTL value to use when replying with expired data
# serve-expired-reply-ttl [num]
# serve-expired-reply-ttl 30# List of hosts that supply bogus NX domain results
# bogus-nxdomain [ip/subnet]# List of IPs that will be filtered when nameserver is configured -blacklist-ip parameter
# blacklist-ip [ip/subnet]# List of IPs that will be accepted when nameserver is configured -whitelist-ip parameter
# whitelist-ip [ip/subnet]# List of IPs that will be ignored
# ignore-ip [ip/subnet]# speed check mode
# speed-check-mode [ping|tcp:port|none|,]
# example:
#测速模式选择,一般只检测两种协议
#   speed-check-mode ping,tcp:80speed-check-mode tcp:443,ping
#   speed-check-mode none# force AAAA query return SOA
# force-AAAA-SOA [yes|no]
#禁用IPV6解析
force-AAAA-SOA yes# force specific qtype return soa
# force-qtype-SOA [qtypeid |...]
# force-qtype-SOA 65 28# Enable IPV4, IPV6 dual stack IP optimization selection strategy
# dualstack-ip-selection-threshold [num] (0~1000)
# dualstack-ip-selection [yes|no]
dualstack-ip-selection no# edns client subnet
# edns-client-subnet [ip/subnet]
# edns-client-subnet 192.168.1.1/24
# edns-client-subnet [8::8]/56# ttl for all resource record
# rr-ttl: ttl for all record
# rr-ttl-min: minimum ttl for resource record
# rr-ttl-max: maximum ttl for resource record
# tr-ttl-reply-max: maximum reply ttl for resource record
# example:
#设置TTL最小值和最大值
#rr-ttl 300
rr-ttl-min 60
rr-ttl-max 86400
# rr-ttl-reply-max 60# set log level
# log-level: [level], level=fatal, error, warn, notice, info, debug
# log-file: file path of log file.
# log-size: size of each log file, support k,m,g
log-num: number of logs
log-level info
log-file /var/log/smartdns.log
log-size 128k
# dns audit
# audit-enable [yes|no]: enable or disable audit.
# audit-enable yes
# audit-SOA [yes|no]: enable or disable log soa result.
# audit-size size of each audit file, support k,m,g
# audit-file /var/log/smartdns-audit.log
# audit-size 128k
# audit-num 2# certificate file
# ca-file [file]
# ca-file /etc/ssl/certs/ca-certificates.crt# certificate path
# ca-path [path]
# ca-path /etc/ss/certs# remote udp dns server list
# server [IP]:[PORT] [-blacklist-ip] [-whitelist-ip] [-check-edns] [-group [group] ...] [-exclude-default-group]
# default port is 53
#   -blacklist-ip: filter result with blacklist ip
#   -whitelist-ip: filter result whth whitelist ip,  result in whitelist-ip will be accepted.
#   -check-edns: result must exist edns RR, or discard result.
#   -group [group]: set server to group, use with nameserver /domain/group.
#   -exclude-default-group: exclude this server from default group.
# server 8.8.8.8 -blacklist-ip -check-edns -group g1 -group g2#飞书
server 114.114.114.114 -group feishu -exclude-default-group
nameserver /.feishu.cn/feishu
nameserver /.feishucdn.com/feishu
nameserver /.feishu.com/feishu
nameserver /.bytehwm.com/feishu
nameserver /.ibytedapm.com/feishu
nameserver /.zijieapi.com/feishu
nameserver /.feelgood.cn/feishu
# 百度
server 114.114.114.114 -group baidu -exclude-default-group
nameserver /.baidu.com/baidu
#京东
server 114.114.114.114 -group jd -exclude-default-group
nameserver /.jd.com/jd
#淘宝天猫
server 114.114.114.114 -group taobao -exclude-default-group
nameserver /.taobao.com/taobao
nameserver /.tmall.com/taobao
#阿里
server 114.114.114.114 -group ali -exclude-default-group
nameserver /.aliyun.com/ali
#csdn
server 114.114.114.114 -group csdn -exclude-default-group
nameserver /.csdn.net/csdn
#华为
server 114.114.114.114 -group huawei -exclude-default-group
nameserver /.huaweicloud.com/huawei
#todesk
server 114.114.114.114 -group todesk  -exclude-default-group
nameserver /.todesk.com/todesk
#QQ
server 114.114.114.114 -group qq -exclude-default-group
nameserver /.qq.com/qq# remote tcp dns server list
# server-tcp [IP]:[PORT] [-blacklist-ip] [-whitelist-ip] [-group [group] ...] [-exclude-default-group]
# default port is 53
# server-tcp 8.8.8.8
server 8.8.8.8
server 8.8.4.4
##server 120.53.129.197
##server 124.70.4.50# remote tls dns server list
# server-tls [IP]:[PORT] [-blacklist-ip] [-whitelist-ip] [-spki-pin [sha256-pin]] [-group [group] ...] [-exclude-default-group]
#   -spki-pin: TLS spki pin to verify.
#   -tls-host-verify: cert hostname to verify.
#   -host-name: TLS sni hostname.
#   -no-check-certificate: no check certificate.
# Get SPKI with this command:
# default port is 853
server-tls 8.8.8.8
server-tls 1.0.0.1# remote https dns server list
# server-https https://[host]:[port]/path [-blacklist-ip] [-whitelist-ip] [-spki-pin [sha256-pin]] [-group [group] ...] [-exclude-default-group]
#   -spki-pin: TLS spki pin to verify.
#   -tls-host-verify: cert hostname to verify.
#   -host-name: TLS sni hostname.
#   -http-host: http host.
#   -no-check-certificate: no check certificate.
# default port is 443
server-https https://cloudflare-dns.com/dns-query# specific nameserver to domain
# nameserver /domain/[group|-]
# nameserver /www.example.com/office, Set the domain name to use the appropriate server group.
# nameserver /www.example.com/-, ignore this domain# specific address to domain
# address /domain/[ip|-|-4|-6|#|#4|#6]
# address /www.example.com/1.2.3.4, return ip 1.2.3.4 to client
# address /www.example.com/-, ignore address, query from upstream, suffix 4, for ipv4, 6 for ipv6, none for all
# address /www.example.com/#, return SOA to client, suffix 4, for ipv4, 6 for ipv6, none for all# enable ipset timeout by ttl feature
# ipset-timeout [yes]# specific ipset to domain
# ipset /domain/[ipset|-]
# ipset /www.example.com/block, set ipset with ipset name of block
# ipset /www.example.com/-, ignore this domain# set domain rules
# domain-rules /domain/ [-speed-check-mode [...]]
# rules:
#   [-c] -speed-check-mode [mode]: speed check mode
#                             speed-check-mode [ping|tcp:port|none|,]
#   [-a] -address [address|-]: same as address option
#   [-n] -nameserver [group|-]: same as nameserver option
#   [-p] -ipset [ipset|-]: same as ipset option
#   [-d] -dualstack-ip-selection [yes|no]: same as dualstack-ip-selection option

这篇关于智能dns服务器、自建DNS服务器、自架DNS服务器、DNS分流的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/786282

相关文章

服务器集群同步时间手记

1.时间服务器配置(必须root用户) (1)检查ntp是否安装 [root@node1 桌面]# rpm -qa|grep ntpntp-4.2.6p5-10.el6.centos.x86_64fontpackages-filesystem-1.41-1.1.el6.noarchntpdate-4.2.6p5-10.el6.centos.x86_64 (2)修改ntp配置文件 [r

嵌入式QT开发:构建高效智能的嵌入式系统

摘要: 本文深入探讨了嵌入式 QT 相关的各个方面。从 QT 框架的基础架构和核心概念出发,详细阐述了其在嵌入式环境中的优势与特点。文中分析了嵌入式 QT 的开发环境搭建过程,包括交叉编译工具链的配置等关键步骤。进一步探讨了嵌入式 QT 的界面设计与开发,涵盖了从基本控件的使用到复杂界面布局的构建。同时也深入研究了信号与槽机制在嵌入式系统中的应用,以及嵌入式 QT 与硬件设备的交互,包括输入输出设

让树莓派智能语音助手实现定时提醒功能

最初的时候是想直接在rasa 的chatbot上实现,因为rasa本身是带有remindschedule模块的。不过经过一番折腾后,忽然发现,chatbot上实现的定时,语音助手不一定会有响应。因为,我目前语音助手的代码设置了长时间无应答会结束对话,这样一来,chatbot定时提醒的触发就不会被语音助手获悉。那怎么让语音助手也具有定时提醒功能呢? 我最后选择的方法是用threading.Time

智能交通(二)——Spinger特刊推荐

特刊征稿 01  期刊名称: Autonomous Intelligent Systems  特刊名称: Understanding the Policy Shift  with the Digital Twins in Smart  Transportation and Mobility 截止时间: 开放提交:2024年1月20日 提交截止日

Linux服务器Java启动脚本

Linux服务器Java启动脚本 1、初版2、优化版本3、常用脚本仓库 本文章介绍了如何在Linux服务器上执行Java并启动jar包, 通常我们会使用nohup直接启动,但是还是需要手动停止然后再次启动, 那如何更优雅的在服务器上启动jar包呢,让我们一起探讨一下吧。 1、初版 第一个版本是常用的做法,直接使用nohup后台启动jar包, 并将日志输出到当前文件夹n

基于 YOLOv5 的积水检测系统:打造高效智能的智慧城市应用

在城市发展中,积水问题日益严重,特别是在大雨过后,积水往往会影响交通甚至威胁人们的安全。通过现代计算机视觉技术,我们能够智能化地检测和识别积水区域,减少潜在危险。本文将介绍如何使用 YOLOv5 和 PyQt5 搭建一个积水检测系统,结合深度学习和直观的图形界面,为用户提供高效的解决方案。 源码地址: PyQt5+YoloV5 实现积水检测系统 预览: 项目背景

【C++学习笔记 20】C++中的智能指针

智能指针的功能 在上一篇笔记提到了在栈和堆上创建变量的区别,使用new关键字创建变量时,需要搭配delete关键字销毁变量。而智能指针的作用就是调用new分配内存时,不必自己去调用delete,甚至不用调用new。 智能指针实际上就是对原始指针的包装。 unique_ptr 最简单的智能指针,是一种作用域指针,意思是当指针超出该作用域时,会自动调用delete。它名为unique的原因是这个

速盾:直播 cdn 服务器带宽?

在当今数字化时代,直播已经成为了一种非常流行的娱乐和商业活动形式。为了确保直播的流畅性和高质量,直播平台通常会使用 CDN(Content Delivery Network,内容分发网络)服务器来分发直播流。而 CDN 服务器的带宽则是影响直播质量的一个重要因素。下面我们就来探讨一下速盾视角下的直播 CDN 服务器带宽问题。 一、直播对带宽的需求 高清视频流 直播通常需要传输高清视频

单片机毕业设计基于单片机的智能门禁系统的设计与实现

文章目录 前言资料获取设计介绍功能介绍程序代码部分参考 设计清单具体实现截图参考文献设计获取 前言 💗博主介绍:✌全网粉丝10W+,CSDN特邀作者、博客专家、CSDN新星计划导师,一名热衷于单片机技术探索与分享的博主、专注于 精通51/STM32/MSP430/AVR等单片机设计 主要对象是咱们电子相关专业的大学生,希望您们都共创辉煌!✌💗 👇🏻 精彩专栏 推荐订

一种改进的red5集群方案的应用、基于Red5服务器集群负载均衡调度算法研究

转自: 一种改进的red5集群方案的应用: http://wenku.baidu.com/link?url=jYQ1wNwHVBqJ-5XCYq0PRligp6Y5q6BYXyISUsF56My8DP8dc9CZ4pZvpPz1abxJn8fojMrL0IyfmMHStpvkotqC1RWlRMGnzVL1X4IPOa_  基于Red5服务器集群负载均衡调度算法研究 http://ww