Ubuntu server 24 (Linux) AdGuard Home +SmartDNS 安装配置 搭建去广告快速DNS

一 SmartDNS 安装 ,可参考:Ubuntu server 24 (Linux) 安装部署smartdns 搭建智能DNS服务器-CSDN博客

二 安装AdGuard

1 下载地址:GitHub - AdguardTeam/AdGuardHome: Network-wide ads & trackers blocking DNS server

2 解压安装

复制代码
#下载适合的版本
wget https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.108.0-b.56/AdGuardHome_linux_amd64.tar.gz
#解压
tar  zxvf  AdGuardHome_linux_amd64.tar.gz
#
cd  AdGuardHome/
#查看帮助
test@test:~/soft/AdGuardHome$ ./AdGuardHome --help
Usage:

./AdGuardHome [options]

Options:
  -c, --config VALUE                 Path to the config file.
  -w, --work-dir VALUE               Path to the working directory.
  -h, --host VALUE                   Deprecated. Host address to bind HTTP server on. Use --web-addr. The short -h will work as --help in the future.
  -p, --port VALUE                   Deprecated. Port to serve HTTP pages on. Use --web-addr.
  --web-addr VALUE                   Address to serve the web UI on, in the host:port format.
  -s, --service VALUE                Service control action: status, install (as a service), uninstall (as a service), start, stop, restart, reload (configuration).
  -l, --logfile VALUE                Path to log file.  If empty, write to stdout; if "syslog", write to system log.
  --pidfile VALUE                    Path to a file where PID is stored.
  --check-config                     Check configuration and exit.
  --no-check-update                  Don't check for updates.
  --update                           Update the current binary and restart the service in case it's installed.
  --no-mem-optimization              Deprecated.  Disable memory optimization.
  --no-etc-hosts                     Deprecated: use clients.runtime_sources.hosts and dns.hostsfile_enabled instead.  Do not use the OS-provided hosts.
  --local-frontend                   Use local frontend directories.
  -v, --verbose                      Enable verbose output.
  --glinet                           Run in GL-Inet compatibility mode.
  --version                          Show the version and exit.  Show more detailed version description with -v.
  --help                             Print this help.
#以系统服务运行启动
sudo ./AdGuardHome -s install
#如下图

3 AdGuard Home服务管理

复制代码
#开机自启
sudo systemctl enable AdGuardHome
#服务启动
sudo systemctl start AdGuardHome
#服务重启
sudo systemctl restart AdGuardHome

三 配置系统防火墙

复制代码
#iptables放行3000端口,53端口
sudo iptables -A INPUT -p tcp --dport 53 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 3000 -j ACCEPT
sudo iptables-save
#持久保存iptables防火墙规则
sudo netfilter-persistent save

四 配置AdGuard Home

1 访问IP+3000端口

2 配置AdGuard Home 和SmartDNS 集成

DNS缓存全部留空,使用smartdns的缓存配置

过滤器,设置DNS 黑名单,建议选择 一到两个全面些的规则集

记得把SmartDNS 端口改成8053(⊙﹏⊙)

五 客户端配置

DNS 填写AdGuard Home 的ip

相关推荐
lihui_cbdd10 小时前
HPC 集群上 OpenMM GPU 多版本安装实战指南
运维·服务器·人工智能·计算化学
G_dou_10 小时前
Linux 搭建 Rust 开发环境:从 rustup 安装到 Cargo 镜像
linux·rust
Xpower 1710 小时前
MCP 服务器暴露在公网:AI Agent 工具层正在变成新的安全边界
服务器·人工智能·安全
志栋智能10 小时前
超越监控:超自动化巡检提供的主动价值
运维·网络·人工智能·自动化
java_logo10 小时前
2026 Docker 国内镜像加速配置教程
运维·docker·容器·docker镜像·docker镜像源·docker镜像加速·docker镜像国内库
搜狐技术产品小编202310 小时前
破局与重构:纯端侧 Android 自动化引擎的尝试与未来推演
android·运维·重构·自动化
bsauce11 小时前
【kernel exploit】CVE-2026-23271 perf_event竞态UAF漏洞-ROP提权
linux·linux内核·内核漏洞·内核漏洞利用
深圳市晶科鑫实业有限公司11 小时前
5G与AIoT时代:如何选择晶振常用频率?
服务器·单片机·物联网·5g·智能路由器·健康医疗·信息与通信
三十..11 小时前
Ceph分布式存储核心技术精要与运维实践指南
运维·分布式·ceph
tianyuanwo11 小时前
Jenkins × Gerrit 集成:自动触发构建的全流程解析
运维·servlet·jenkins