pve9.0容器lxc安装 AdGuardHome DNS并设置国内外自动分流


sudo apt update
sudo apt upgrade -y
apt install nano curl -y

timedatectl set-timezone Asia/Shanghai

nano /etc/ssh/sshd_config
sudo service ssh restart
curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v

https://github.com/rwx9032/AdguardHome

下载 AdGuardHome.yaml 到您的 AdGuardHome 目录
下载上游 DNS 配置文件:wget -O /root/AdguardHome_Upstreams.txt https://raw.githubusercontent.com/rwx9032/AdguardHome/refs/heads/main/AdguardHome_Upstreams_Autoupdate.txt
重启 AdGuardHome 服务
立即更改管理员密码

创建一个shell脚本文件,比如ad.sh,内容如下:

!/bin/bash

wget -O /root/AdguardHome_Upstreams.txt https://raw.githubusercontent.com/rwx9032/AdguardHome/refs/heads/main/AdguardHome_Upstreams_Autoupdate.txt
使用chmod命令添加执行权限
chmod +x ad.sh
使用crontab命令编辑定时任务
crontab -e
添加以下内容来设置定时任务
0 6 * /root/ad.sh
每天的6点0分执行

声明:It小小鸟 itxiaoniao.cn|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - pve9.0容器lxc安装 AdGuardHome DNS并设置国内外自动分流


Carpe Diem and Do what I like