安装pi-hole
参考:官方手册
curl -sSL https://install.pi-hole.net | bash
一键自动安装出错,成功率0% 手册中有手动安装
wget -O basic-install.sh https://install.pi-hole.net
sudo bash basic-install.sh
添加hosts后要手动更新下 : tools - Update Gravity -
1.yhosts: https://raw.githubusercontent.com/VeleSila/yhosts/master/hosts (国内维护者屏蔽国内网站广告)
2.大圣净化:https://raw.githubusercontent.com/jdlingyu/ad-wars/master/hosts (主要针对国内视频网站)
3.1024_hosts:https://raw.githubusercontent.com/Goooler/1024_hosts/master/hosts (1024网站和澳门皇家赌场)
4.Adaway: https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt (adaway官方)
5.Hblock:https://hblock.molinero.dev/hosts (综合多种源集合体屏蔽广告跟踪和恶意软件)
6.Mvps:https://winhelp2002.mvps.org/hosts.txt (屏蔽美欧地区英文网站相关的广告)
7.YousList: https://raw.githubusercontent.com/yous/YousList/master/hosts.txt (主要屏蔽韩国人使用的网站广告)
8.StevenBlack: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts (多源集合体偏向屏蔽国外网站广告)
9.Google hosts:https://raw.githubusercontent.com/googlehosts/hosts/master/hosts-files/hosts (提高网站访问速度)
路由端屏蔽规则
pihole 命令行操作
pihole -h # 显示 pihole 命令行帮助信息
pihole -b -l # 显示黑名单列表
pihole -b site1.com site2.com # 把 site1 和 site2 加入黑名单
pihole -b -d site1.com # 把 site1 从黑名单移除
pihole restartdns # 重启服务 而不用重启整个服务器
网友评论