0X01 安装 CentOS7.9 Minimal版
https://mirrors.aliyun.com/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso
0X02 手动配置CentOS的静态IP地址
ipconfig查看当前网卡名称,如果没有ifconfig可以使用ip addr命令,我这边为en192,
然后进入/etc/sysconfig/network-scripts目录,vi ifcfg-ens192,配置如下:
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens192
UUID=8211acc2-51ea-4824-8071-ef86714a6f6a
DEVICE=ens192
ONBOOT=yes
IPADDR=192.168.1.210
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
配置完后systemctl restart network重启网络即可。
0x03 防火墙开端口
3000是AdGuard Home默认端口,53为dns端口
# firewall-cmd --zone=public --add-port=3000/tcp --permanent
# firewall-cmd --zone=public --add-port=80/tcp --permanent
# firewall-cmd --zone=public --add-port=53/tcp --permanent
# firewall-cmd --zone=public --add-port=53/udp --permanent
# firewall-cmd --reload
# firewall-cmd --list-all
0x04 安装AdGuard Home
curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v
基本上就是命令一键安装的,安装好之后直接访问http://ip:3000/即可。
0x06 一些好用的过滤规则
adbyby-lazy
https://cdn.jsdelivr.net/gh/adbyby/xwhyc-rules@master/lazy.txt
乘风广告过滤
https://gitee.com/xinggsf/Adblock-Rule/raw/master/rule.txt
乘风视频广告过滤
https://gitee.com/xinggsf/Adblock-Rule/raw/master/mv.txt
anti-AD
https://anti-ad.net/adguard.txt
ADgk
https://banbendalao.coding.net/p/adgk/d/ADgk/git/raw/master/ADgk.txt
大圣净化
https://raw.githubusercontent.com/jdlingyu/ad-wars/master/hosts
小米盒子广告
https://cdn.jsdelivr.net/gh/lhbill/xiaomiad@master/xiaomi.txt
0x07 上游DNS服务器地址推荐
223.5.5.5
223.6.6.6
119.29.29.29
218.30.118.6
8.8.8.8
发表评论