AdGuard: Difference between revisions

From FlowerHouseWiki
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 13: Line 13:
__TOC__
__TOC__
== Basic Setup ==
== Basic Setup ==
=== Nginx Proxy Manager ===
=== Installation ===
<p>Enter this command to install AdGuard</p>
<syntaxhighlight lang="console">
curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v
</syntaxhighlight>
 
=== Configure Mikrotik Router ===
<p>Added a script to the mikrotik scheduler to secure a fallback dns if AdGuard server fails</p>
<syntaxhighlight lang="console" line>
#Set variables
:local fallbackDNS 8.8.8.8,8.8.4.4;
:local AdGuard 192.168.88.4;
:local currentDNS;
:set $currentDNS [/ip dns get servers];
 
:do {
  :put [resolve google.com server=$AdGuard];
  if ($currentDNS!=AdGuard) do={
    :log info "DNS Failover: Switching to AdGuard";
    ip dns set servers $AdGuard
    ip dns cache flush
  } else={}
} on-error={ :set $currentDNS [/ip dns get servers];
  if ($currentDNS!=$fallbackDNS) do={
    :log info "DNS Failover: Switching to FallbackDNS";
    ip dns set servers $fallbackDNS;
  } else={:log info "DNS Failover: AdGuard Unavailable"}
}
</syntaxhighlight>
 
== Sources ==
* [https://github.com/AdguardTeam/AdGuardHome#getting-started AdGuard Installation Guide]

Latest revision as of 22:43, 21 February 2022

AdGuard-LXC
AdGuard.png

Network


IP: 192.168.88.2
MAC: 8E:02:AF:95:EB:35

System


OS: Debian Bullseye
RAM: 256MB
Cores: 1
Privileged: No

The AdGuard Home is reachable under 192.168.88.2 which is located in the ServerVLAN.

AdGuard Home serves as the DNS-Server for the internal network.

Basic Setup

Installation

Enter this command to install AdGuard

curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v

Configure Mikrotik Router

Added a script to the mikrotik scheduler to secure a fallback dns if AdGuard server fails

#Set variables
:local fallbackDNS 8.8.8.8,8.8.4.4;
:local AdGuard 192.168.88.4;
:local currentDNS; 
:set $currentDNS [/ip dns get servers];

:do {
  :put [resolve google.com server=$AdGuard];
  if ($currentDNS!=AdGuard) do={
    :log info "DNS Failover: Switching to AdGuard";
    ip dns set servers $AdGuard
    ip dns cache flush
  } else={}
} on-error={ :set $currentDNS [/ip dns get servers];
  if ($currentDNS!=$fallbackDNS) do={
    :log info "DNS Failover: Switching to FallbackDNS"; 
    ip dns set servers $fallbackDNS;
  } else={:log info "DNS Failover: AdGuard Unavailable"} 
}

Sources