AdGuard Home instead of pi-hole with a Raspberry Pi 2 Model B

In the last days/weeks I'm seeing people talking about "AdGuard" instead of "pi-hole" so I decided to give it a try.

These are the steps I followed to install it using the Raspberry Pi 2 Model B where I have pi-hole running at the moment.

First, stop/disable pi-hole:

pi@localhost:~ $ pihole disable
  [i] Disabling blocking
  [✓] Reloading DNS service
  [✓] Pi-hole Disabled

pi@localhost:~ $ sudo systemctl stop lighttpd
pi@localhost:~ $ sudo systemctl disable lighttpd
Synchronizing state of lighttpd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable lighttpd

pi@localhost:~ $ sudo pihole disable
  [i] Blocking already disabled, nothing to do

pi@localhost:~ $ sudo systemctl stop pihole-FTL
pi@localhost:~ $ sudo systemctl disable pihole-FTL
pihole-FTL.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable pihole-FTL



Now proceed to download/install/configure AdGuard

pi@localhost:~ $ sudo su -
root@localhost:~# cd /usr/local
root@localhost:/usr/local# wget https://static.adguard.com/adguardhome/release/AdGuardHome_linux_armv5.tar.gz
--2020-04-06 19:34:56--  https://static.adguard.com/adguardhome/release/AdGuardHome_linux_armv5.tar.gz
Resolving static.adguard.com (static.adguard.com)... 104.20.31.130, 104.20.30.130, 2606:4700:10::6814:1e82, ...
Connecting to static.adguard.com (static.adguard.com)|104.20.31.130|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6202594 (5.9M) [application/octet-stream]
Saving to: ‘AdGuardHome_linux_armv5.tar.gz’

100%[===================================================================>] 6,202,594   4.62MB/s   in 1.3s  

2020-04-06 19:34:59 (4.62 MB/s) - ‘AdGuardHome_linux_armv5.tar.gz’ saved [6202594/6202594]

root@localhost:/usr/local# logout

pi@localhost:/usr/local $ ls -l
total 12052
-rw-r--r-- 1 root staff 6202594 Apr  6 19:35 AdGuardHome_linux_armv5.tar.gz
pi@localhost:/usr/local $ sudo tar xvf AdGuardHome_linux_armv5.tar.gz
AdGuardHome/
AdGuardHome/AdGuardHome
AdGuardHome/README.md
AdGuardHome/LICENSE.txt

pi@localhost:/usr/local/ $ cd AdGuardHome/
pi@localhost:/usr/local/AdGuardHome $ ls -l
total 12788
-rwxr-xr-x 1 1002 1002 13041664 Mar 13 03:41 AdGuardHome
-rw-r--r-- 1 1002 1002    35149 Mar 13 03:40 LICENSE.txt
-rw-r--r-- 1 1002 1002    12670 Mar 13 03:40 README.md


And I had to open the port 3000 via iptables and connect!

I added the following to the iptables configuration:

-A INPUT -p tcp -m tcp --dport 3000 -j ACCEPT

pi@localhost:/etc# sudo iptables-restore < /etc/iptables.firewall.rules

Next you install and set your user/password via http

pi@localhost:/usr/local/AdGuardHome $ sudo ./AdGuardHome -s install
2020/04/06 19:57:37 [info] Service control action: install
2020/04/06 19:57:38 [info] Service has been started
2020/04/06 19:57:38 [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.
2020/04/06 19:57:38 [info] AdGuard Home is available on the following addresses:
2020/04/06 19:57:38 [info] Go to http://127.0.0.1:3000
2020/04/06 19:57:38 [info] Go to http://192.168.1.2:3000
2020/04/06 19:57:38 [info] Action install has been done successfully on linux-systemd

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.

pi@localhost:/usr/local/AdGuardHome $ sudo /usr/local/AdGuardHome/AdGuardHome -s status
2020/04/06 19:59:37 [info] Service control action: status
2020/04/06 19:59:37 [info] Service is running
2020/04/06 19:59:37 [info] Action status has been done successfully on linux-systemd


After this open your browser, go to your ip/hostname:3000 set your user/password, finish the configuration and after this, make sure that you are really using AdGuard, that you are not using "resolver" or something similar set by the operating system.



I tried to keep my "how-to" clean and I don't think it has errors so, if you find errors please let me know.

No hay comentarios.:

// Cookie consent