AdGuardHome安装及配置

发布于 / 笔记 / 0 条评论

AdGuardHome宇宙最好用,效果最好的广告过滤工具.

刚好有台N1盒子,装在上面为局域网所有终端提供广告过滤服务.

下载

bytetoy@aml:~/apps$ aria2c -c https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.108.0-b.19/AdGuardHome_linux_arm64.tar.gz

[#6ddf51 10MiB/10MiB(99%) CN:1 DL:31KiB ETA:1s]                                                           
10/21 19:02:11 [NOTICE] Download complete: /home/bytetoy/apps/AdGuardHome_linux_arm64.tar.gz

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
6ddf51|OK  |    42KiB/s|/home/bytetoy/apps/AdGuardHome_linux_arm64.tar.gz?

安装

bytetoy@aml:~/appstar -zxvf AdGuardHome_linux_arm64.tar.gz .

bytetoy@aml:~/apps/AdGuardHome sudo ./AdGuardHome -s install
[sudo] password for bytetoy: 
2022/10/21 19:03:58 [info] AdGuard Home, version v0.108.0-b.19
2022/10/21 19:03:58 [info] service: control action: install
2022/10/21 19:03:59 [info] service: started
2022/10/21 19:03:59 [info] Almost ready!
AdGuard Home is successfully installed and will automatically start on boot.
There are a few more things that must be configured before you can use it.
Click on the link below and follow the Installation Wizard steps to finish setup.
AdGuard Home is now available at the following addresses:
2022/10/21 19:03:59 [info] Go to http://127.0.0.1:3000
2022/10/21 19:03:59 [info] Go to http://[::1]:3000
2022/10/21 19:03:59 [info] Go to http://192.168.1.102:3000
2022/10/21 19:03:59 [info] Go to http://[fe80::2617:df9e:b813:a813%eth0]:3000
2022/10/21 19:03:59 [info] service: action install has been done successfully on linux-systemd

配置

安装成功后,进入登录页面(默认3000端口),根据设置指导进行简单配置(主要设置登录账号和密码),其他基本无需设置。

  1. DNS配置

    菜单:设置–>DNS设置

    • 上游 DNS 服务器
      > 默认配置里的上游DNS可能无法访问的,也就导致后面无法更新广告规则,务必注意。
      >
      > 以下DNS是我的配置,大家根据自己网络进行选择。
      >
      > 这里的选项选择负载均衡较好.
    119.29.29.29
    223.5.5.5
    114.114.114.114
    8.8.8.8
    https://doh.pub/dns-query
    https://dns.alidns.com/dns-query
    
    • Bootstrap DNS 服务器
    223.5.5.5:53
    119.29.29.29:53
    114.114.114.114:53
    
  • 测试以上有DNS能否链接,没有提示无法链接,点击应用保存配置
  • DNS 服务配置中将速度限制设置为0
  • 以上所有配置有更改好后,务必要保存配置,否则是不会生效的.
  1. 添加广告过滤规则
    > 菜单:过滤器–>DNS拦截列表
    >
    > * 添加阻止列表
    > * 然后更新
规则 URL地址
anti-ad https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-easylist.txt
Halflife移动端 https://raw.githubusercontent.com/o0HalfLife0o/list/master/ad.txt
Halflife桌面端 https://raw.githubusercontent.com/o0HalfLife0o/list/master/ad-pc.txt
* 添加过滤规则,不用使用gitee仓库,现在gitee没有登录的话,获取不到数据;
* 以上3个规则对国内广告效果较好,比较推荐.

配置路由器

配置路由器后,N1盒子可以对局域网所有客户端的广告进行过滤,无须对电脑和手机逐台尽心配置.

“`
路由器–>DHCP服务器–>首选DNS服务器(改为N1盒子的IP,如我的N1盒子地址为:192.168.1.103)
“`

  • 路由器中是修改路由器DHCP服务器的DNS,不是修改WAN口的DNS,这里切记不要设置错了.
  • N1盒子务必在路由器中设置为固定的IP地址,否则盒子重启后,IP地址一变,就无法提供广告过滤功能.一般是在路由器的静态地址保留或者IP和MAC绑定中设置.

Not Comment Found