树莓派安装AdGuard Home

本文详细指导如何在Raspberry Pi上下载并安装AdGuardHome,设置DNS过滤,验证其工作,并配置Web界面及密码保护。适合了解如何在家庭网络中使用AdGuard作为DNS代理以实现广告拦截。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

AdGuard Home官网:https://adguard.com/zh_cn/adguard-home/overview.html

github:https://github.com/AdguardTeam/AdGuardHome/

下载:https://github.com/AdguardTeam/AdGuardHome/releases/tag/v0.105.2

wget https://static.adguard.com/adguardhome/release/AdGuardHome_linux_armv7.tar.gz
tar xvf AdGuardHome_linux_armv7.tar.gz

It will unpack into a new directory called AdGuardHome.

All you have to do is simply type this command to the Terminal:

cd AdGuardHome
sudo ./AdGuardHome -s install

Here are the other commands you might need to control the service.

  • AdGuardHome -s uninstall - uninstalls the AdGuard Home service.
  • AdGuardHome -s start - starts the service.
  • AdGuardHome -s stop - stops the service.
  • AdGuardHome -s restart - restarts the service.
  • AdGuardHome -s status - shows the current service status.

Visit the web interface

Once it's up and running, you can access your AdGuard Home web interface on port 3000 by typing this in your browser — http://192.168.10.20:3000/

Don't forget to substitute 192.168.10.20 with IP of your Pi.

Verify DNS filtering

You can verify that it's working properly by running this on your Pi:

host doubleclick.net 127.0.0.1

If everything works correctly, you will get this output:

Using domain server:
Name: 127.0.0.1
Address: 127.0.0.1#53
Aliases:

Host doubleclick.net not found: 3(NXDOMAIN)

Configure your devices to use your AdGuard Home

Now, once we've established that AdGuard Home works on our Raspberry Pi, you can use it on other computers in your network by changing their system DNS settings to use Pi's IP address (which is 192.168.10.20 in our case).

(Optionally) password-protect web interface

You have an option to password-protect your AdGuard Home's web interface so only you can access it.

To do so, stop it first:

sudo ./AdGuardHome -s stop

Then edit the configuration file:

sudo nano /home/pi/AdGuardHome/AdGuardHome.yaml

Find lines containing auth_name: "" and auth_pass: "" and replace them with username and password:

auth_name: "your-secret-name"
auth_pass: "your-secret-password"

Substitute name and password with your own, of course.

After you're done editing, save the file and start your AdGuard Home again:

sudo ./AdGuardHome -s start

After that, visiting web interface in a browser will ask for username and password.

 

查看cpu架构:

root@mv100:~# lscpu 
Architecture:          armv7l
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值