

Note: If your router is not at 192.168.1.1 then replace the router IP address used in the commands below accordingly. This is a known good default and should always work. This script uninstalls AGH and resets your router DNS to Google DNS. An alternative is creating a custom init script that runs the ipset create command earlier than the START value of AGH. It is possible to potentially encounter a race condition on startup if the ipset chains are not created in time when AGH attempts to start. Note: The ipset chains must exist before being used or referenced as AGH does not initialise them. Further information on ipset functionality can be found on the official AdGuard Home wiki under “other settings”. Like dnsmasq, an ipset policy in AGH can have one or more domains as well as be assigned to multiple ipset chains. When specifying the ipset chain, a comma is used in both examples to denote multiple chains if required. A forward slash denotes the end of a domain rule with AGH. The main syntax differences is each domain is separated using a comma ( ,) not a forward slash ( /). Using the following example ipset rules in dnsmasq as a reference, the AGH equivalent is demonstrated.
#ADGUARD RASPBERRY PI INSTALL#
If ipset is not already installed, install it: The configuration/syntax is slightly different and you will need to migrate any existing dnsmasq ipset policies to the AGH format and apply these to AGH instead.Īn ipset policy is defined in the adguardhome.yaml file, there is currently no web interface available to add these policies, therefore you must add these to the yaml config manually. Set allow_unencrypted_doh to false in adguardhome.yaml to allow AdGuard Home respond to DoH requests without TLS encryption.įor users using ipset policies for purposes such as VPN split tunnelling, AGH provides ipset functionality similar to dnsmasq. If you have configured TLS on LuCI, there's no need to use TLS on AdGuard Home. If your router IP or AdGuard Home http_port value is different, change it accordingly.Īccessing in your browser: You can read more reverse proxy configurations from the Nginx docs. The following example will allow accessing the AdGuard Home interface as a sub directory path /adguard-home. Using a reverse proxy also means you don't have to specifically configure HTTPS access through AdGuard Home and can instead utilise the HTTPS configuration of LuCI instead. This can simplify accessing the AdGuard Home interface and not having to worry about URLs with non standard HTTP ports. If you already use Nginx with LuCI rather than uHTTPd you can reverse proxy the AdGuard Home interface. etc /init.d /dnsmasq restart Setup AGH through the web interface NET_ADDR=$ ( /sbin / ip -o -4 addr list br-lan | awk 'NR=1' ) do echo "Adding $OUTPUT to IPV6 DNS" # Get the first IPv4 and IPv6 Address of router and store them in following variables for use during the script. This will demote dnsmasq to an internal DNS resolver only. These instructions assume you are using dnsmasq. After installing the opkg package, run the following commands through SSH to prepare for making AGH the primary DNS resolver.
