openwrt使用docker部署adguard home

发布时间:2024年01月04日

docker创建macvlan,目的使adguard home具备宿主机同网段IP

docker network create -d macvlan --subnet=192.168.88.0/24 --gateway=192.168.88.254 -o parent=br-lan bridge-host(虚拟网卡名字)

在这里插入图片描述

拉取adguard home镜像

docker pull adguard/adguardhome:latest

运行容器

docker run -itd \
    --name adguardhome \
    --network bridge-host \
    --ip=192.168.88.53 \
    -v /opt/op/docker/adguard/work:/opt/adguardhome/work \  #自定义路径
    -v /opt/op/docker/adguard/conf:/opt/adguardhome/conf \  #自定义路径
    --restart=always \
adguard/adguardhome:latest

加多一个docker默认网卡,否则adguard home无法访问互联网

在这里插入图片描述

添加上游DNS服务器

94.140.14.15
94.140.15.15
223.5.5.5
119.29.29.29
https://dns10.quad9.net/dns-query
https://dns.alidns.com/dns-query
https://dns.adguard-dns.com/dns-query
https://120.53.53.53/dns-query
2400:3200::1
1.1.1.1
8.8.8.8

添加过滤规则


https://anti-ad.net/easylist.txt

https://raw.githubusercontent.com/o0HalfLife0o/list/master/ad.txt

https://mirror.ghproxy.com/https://raw.githubusercontent.com/217heidai/adblockfilters/main/rules/adblockdns.txt

https://mirror.ghproxy.com/https://raw.githubusercontent.com/217heidai/adblockfilters/main/rules/adblockfilters.txt

https://gist.githubusercontent.com/Ewpratten/a25ae63a7200c02c850fede2f32453cf/raw/b9318009399b99e822515d388b8458557d828c37/hosts-yt-ads

https://raw.githubusercontent.com/BlueSkyXN/AdGuardHomeRules/master/all.txt

自定义过滤规则包括微信订阅号广告

||wxsnsdy.wxs.qq.com^
127.0.0.1 wxsnsdy.wxs.qq.com
||wxa.wxs.qq.com^
127.0.0.1 wxa.wxs.qq.com
||wxsnsdythumb.wxs.qq.com^
127.0.0.1 wxsnsdythumb.wxs.qq.com
||is.snssdk.com^
||i.snssdk.com^
||p3-tt.byteimg.com^
||success.ctobsnssdk.com^
||sf16-static.i18n-pglstatp.com^
||sf3-fe-tos.pglstatp-toutiao.com^
||ad.zijieapi.com^
||api-access.pangolin-sdk-toutiao.com^
||mobads.baidu.com^
||ad.qq.com^
||ks.pull.yximgs.com^
||open.e.kuaishou.com^
||open.e.kuaishou.cn^
||open.e.kuaishou^
||open.kwaizt.com^
||bd.pull.yximgs.com^
||jstatic.3.cn^
||p1-lm.adukwai.com^
||p2-lm.adukwai.com^
||p3-lm.adukwai.com^
||p4-lm.adukwai.com^
||p5-lm.adukwai.com^
||m.jingxi.com^
||chat1.jd.com^
127.0.0.1 www.csjplatform.com
127.0.0.1 www.googleadservices.com
||www.csjplatform.com^
||xlmzc.cnjp-exp.com^
||lm10111.jtrincc.cn^
||ali-ad.a.yximgs.com^
||qqdata.ab.qq.com^
||tx-ad.a.yximgs.com^
||p1-lm.adkwai.com^
||video-dsp.pddpic.com^
||v1-lm.adukwai.com^
||v2-lm.adukwai.com^
||v3-lm.adukwai.com^
||v4-lm.adukwai.com^
||v5-lm.adukwai.com^
||pgdt.ugdtimg.com^
||tx-kmpaudio.pull.yximgs.com^
||hmma.baidu.com^
||apiyd.my91app.com^
||open.kuaishouzt^
||qzs.gdtimg.com^
||sdkoptedge.chinanetcenter.com^
||roi.soulapp.cn^
||bd.pull.yximgs.com^
||bd-adaptive.pull.yximgs.com^
||bd-livemate.pull.yximgs.com^
||bd-origin.pull.yximgs.com^
||bd-pclivemate.pull.yximgs.com^
||bd-proxy.pull.yximgs.com^
||bd-rwk.pull.etoote.com^
||httpdns.bcelive.com^
||skdisplay.jd.com^
||p9-be-pack-sign.pglstatp-toutiao.com^
||v6-be-pack.pglstatp-toutiao.com^
||log-api.pangolin-sdk-toutiao-b.com^
||api-access.pangolin-sdk-toutiao-b.com^
||pangolin-sdk-toutiao-b.com^
||pig.pupuapi.com^
||pglstatp-toutiao.com^
||thumb.1010pic.com^
||thumb2018.1010pic.com^
||1010pic.com^

将路由器DNS指向adguard home的IP,爱快在DHCP里可以设置终端设备DNS

在这里插入图片描述

文章来源:https://blog.csdn.net/m0_37264220/article/details/135385946
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。