Hostnames don't work with Adguard after update 4.6.2

Hostnames don't work with Adguard after update 4.6.2


Device:

Model GL.iNet GL-MT6000
Firmware Version 4.6.2

Issue:

Hostnames that were defined and working as DNS rewrites before the update, don't work after the update.

Device was running v4.5.8.
Some hostnames were defined in the Luci interface
console.gl-inet.com/cgi-bin/luci/admin/network/hosts (corresponding file /etc/config/dhcp)

ie: the default hostname for the router

config domain
        option name 'console.gl-inet.com'
        option ip '192.168.8.1'

After update to 4.6.2, this hostname doesn't direct to the router's "Admin Panel". Instead takes you to the following message:

You researched this page because you are not using a GL.iNet router

Adguard and DNS Settings:

(I think these are the relevant ones)

AdGuard Home

  • Enable AdGuard Home ON
  • AdGuard Home Handle Client Requests ON

DNS

  • DNS Rebinding Attack Protection OFF
  • Override DNS Settings of All Clients OFF
  • Allow Custom DNS to Override VPN DNS OFF
adguardhome.config.enabled='1'
adguardhome.config.dns_enabled='1'
dhcp.@dnsmasq[0].rebind_protection='0'
gl-dns.@dns[0].override_vpn='0'
gl-dns.@dns[0].mode='auto'

"Band-aid Solutions:"

Defining under "Edit Hosts" in console.gl-inet.com/#/dnsview (or the corresponding file /etc/hosts ) fixes the issue.
ie:

127.0.0.1 localhost

::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

192.168.8.1 console.gl-inet.com

Additionally, defining it under console.gl-inet.com:3000/#dns_rewrites (or corresponding file /etc/AdGuardHome/config.yaml) seems to also solve this issue

  safebrowsing_block_host: standard-block.dns.adguard.com
  rewrites:
    - domain: console.gl-inet.com
      answer: 192.168.8.1
  safebrowsing_cache_size: 1048576

Questions:

  1. Is this meant to work like that?
  2. How come the DNS rewrites were working with what was on /etc/config/dhcp before the update?
  3. Of the three places I described, which one is the proper place to define hostnames for this case?
/etc/hosts
/etc/AdGuardHome/config.yaml
/etc/config/dhcp

Thanks!

This one should skip all locally added hostnames because AdGuard Home will take care of resolving.
You might define the hostnames in AdGuard Home then.

I'm okay with doing that.
That's adding them to /etc/AdGuardHome/config.yaml

Still weird that, with "AdGuard Home Handle Client Requests ON"

  • Before the update", it worked with the ones in /etc/config/dhcp
  • After the update, it still takes the hostnames from /etc/hosts.
    Seems inconsistent that it would ignore one but not the other.

I would simply use the AdGuard Home GUI for adding them, but most likely they will end in the config.yaml anyway, yep.

After upgrade new frimware you need double check firewall with Adguard Home. There always problem syntax, something need remove space.