AdGuard: Difference between revisions
From FlowerHouseWiki
(Created page with "{{ContainerInfo |title = AdGuard-LXC |image = AdGuard.png |MAC = 8E:02:AF:95:EB:35 |IP = 192.168.88.2 |Privileged = No |OS = Debian Bullseye |RAM = 256MB |Cores = 1 }} <p>The...") |
|||
(7 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
|Cores = 1 | |Cores = 1 | ||
}} | }} | ||
<p>The | <p>The AdGuard Home is reachable under <syntaxhighlight lang="Bash" inline>192.168.88.2</syntaxhighlight> which is located in the ServerVLAN.</p> | ||
<p> | <p>AdGuard Home serves as the DNS-Server for the internal network.</p> | ||
__TOC__ | __TOC__ | ||
== Basic Setup == | == Basic Setup == | ||
=== | === 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
IP: | 192.168.88.2 |
---|---|
MAC: | 8E:02:AF:95:EB:35 |
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"}
}