高速专线机场 老牌大机场

AdGuardHome – DNS服务器的安装以及设置。去广告、开源、防污染的DNS服务器教程,让你的网页秒开。

前言

上期视频我们组装了一台虚拟机,然后上面安装了PVE,并虚拟了爱快,通过简单的流控,使我们的300M电信和500M联通进行了网络叠加。但是这里有一个问题。就是我们爱快的DNS设置里面,我们到底是应该填电信的DNS,还是应该填联通的DNS?所以我们需要搭建一个DNS服务器,使得电信和联通都能够通过最快的DNS解析,并达到网页秒开的效果。这期视频还是基于我们的PVE系统,我们还是去电脑上面去操作。

AdGuardHome开源地址:点击访问

本期视频教程:点击观看

准备工作

1、基于PVE的安装

2、更改ProxmoxVE的LXC仓库为国内源

3、建立PVE – CentOS容器

创建AdGuardHome的LXC

更改LXC仓库源

首先,我们还是需要更改ProxmoxVE的LXC仓库为国内源的下载地址,不然龟速的下载,会让你怀疑人生。

SSH连接PVE,复制下面代码,并一起粘贴并输入回车运行。

grep -rn "download.proxmox.com" /usr/share/perl5/PVE/*
sed -i.bak "s#http://download.proxmox.com/images#https://mirrors.ustc.edu.cn/proxmox/images#g" /usr/share/perl5/PVE/APLInfo.pm
wget -O /var/lib/pve-manager/apl-info/mirrors.ustc.edu.cn https://mirrors.ustc.edu.cn/proxmox/images/aplinfo.dat

下载Centos7镜像文件

依次找到 “local  – 内容 – 模板 ” 然后下载Centos7的镜像文件模板。

开始创建AdGuardHome CT

开始创建CT。右键你的节点,“创建CT”,填写ROOT密码。

选择你下载的模板

根据你的内网IP段,填入你准备规划的DNS服务器的IP地址,具体如下图:

至此,CT创建完毕。

设置 第三方SSH工具登录

运行刚才创建的“AdGuardHome”的CT容器。我们转到控制台,输入刚才设置的密码。(用户名为root)

因为作者是不喜欢在控制台里面操作SSH,所以我们给他安装一个SSH连接工具,并设置允许第三方SSH工具登录。

登录控制台,首先更新源 yum -y update 然后安装 openssh-server。命令如下

yum install -y openssl openssh-server

修改配置文件 vi /etc/ssh/sshd_config ,把 #Port 22 前面的 #去掉,打开22端口,(当然你可以自定义)

然后一起贴入下面三行命令:

sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/ssh/sshd_config
reboot

开始安装AdGuardHome

1、安装依赖环境 wget,

yum -y install wget

2、下载官方AdGuardHome

wget https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.102.0/AdGuardHome_linux_amd64.tar.gz

3、解压AdGuardHome

tar xvf AdGuardHome_linux_amd64.tar.gz

4、进入AdGuardHome目录

cd AdGuardHome

5、安装AdGuardHome

./AdGuardHome -s install

开始设置AdGuardHome

按照安装完成的提示,http://你的IP:3000,访问AdGuardHome的设置网页。

设置用户名及其他,不会的请看视频教程,登录AdGuardHome。

设置完上游DNS,完工了

上游dns的意思是adguardhome查询你要用的网址时用的dns服务器

Bootstrap DNS 服务器 是adguardhome 查询dns服务器ip时用的dns服务器

上游服务器应该设置成响应最快的多个dns地址,下面为推荐的DNS地址。

https://dns.adguard.com/dns-query
https://dns.cloudflare.com/dns-query
tls://dns.google
tcp://8.8.8.8
tcp://8.8.4.4
176.103.130.130
114.114.114.114
119.29.29.29

附录AdGuardHome规则

过滤器

AdGuard Home 可以解析基础的 adblock 规则和 Hosts 语法。

 

系统自带过滤器

AdGuard Simplified Domain Names filter

https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt

AdAway

https://adaway.org/hosts.txt

hpHosts – Ad and Tracking servers only

https://hosts-file.net/ad_servers.txt

MalwareDomainList.com Hosts List

https://www.malwaredomainlist.com/hostslist/hosts.txt

 

自定义过滤器

neoHosts Full 127.0.0.1 兼容性更好

https://hosts.nfz.moe/127.0.0.1/full/hosts

Easylist 官方规则

https://easylist.to/easylist/easylist.txt

EasyList China 中文补充规则

https://easylist-downloads.adblockplus.org/easylistchina.txt

EasyList Lite 中文精简规则

https://raw.githubusercontent.com/cjx82630/cjxlist/master/cjxlist.txt

EasyPrivacy 隐私保护

https://easylist-downloads.adblockplus.org/easyprivacy.txt

CJX’s Annoyance List 去自我推广列表

https://raw.githubusercontent.com/cjx82630/cjxlist/master/cjx-annoyance.txt

ChinaList 国内大部分视频网站的广告过滤 (广告净化器)

【凉凉】http://tools.yiclear.com/ChinaList2.0.txt

【备份】https://raw.githubusercontent.com/hopol/ChinaList2.0/master/ChinaList2.0.txt

乘风 广告过滤规则

https://raw.githubusercontent.com/xinggsf/Adblock-Plus-Rule/master/ABP-FX.txt

【码云更新】https://gitee.com/xinggsf/Adblock-Rule/raw/master/rule.txt

【MV规则】https://gitee.com/xinggsf/Adblock-Rule/raw/master/mv.txt

Fanboy+Easylist-Merged Ultimate List

https://fanboy.co.nz/r/fanboy-ultimate.txt

StevenBlack

http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts

yhosts

https://raw.githubusercontent.com/vokins/yhosts/master/hosts

大圣净化

https://raw.githubusercontent.com/jdlingyu/ad-wars/master/hosts

1024_hosts

https://raw.githubusercontent.com/Goooler/1024_hosts/master/hosts

neoHosts Full

https://hosts.nfz.moe/full/hosts

Google Host

https://raw.githubusercontent.com/googlehosts/hosts/master/hosts-files/hosts

ChinaList+EasyList(修正)

http://sub.adtchrome.com/adt-chinalist-easylist.txt

以下慎用

I don’t care about cookies 屏蔽网站 cookies 相关警告!!!

https://www.i-dont-care-about-cookies.eu/abp/

 

 

技术教程软路由

DIY虚拟机,构建强大的家庭网络 - PVE虚拟机(软路由)系列 第三期

2020-5-19 18:44:19

技术教程

软路由:PVE虚拟机安装OpenWRT,直通PCI网口,作为全设备全平台的科学上网旁路由!AdGuard home没用?

2020-5-27 18:55:10

   Google提供的广告
5 条回复 A文章作者 M管理员
  1. zhattyt

    OPENWRT 里的ad好像过滤不了广告,不知道是怎么回事,好多视频站广告几乎没有拦截,但是后台却显示了。

  2. Great丶God

    不错的

  3. Shelling

    可以,支持一下

  4. coolpanda

    额,没有人来评论一下么

  5. coolpanda

    66666,很实用的一个插件