Skip to content

Malformed question from $dnsrewrite rules for DHCP hostnames #8068

@EugeneOne1

Description

@EugeneOne1

Prerequisites

Platform (OS and CPU architecture)

Linux, ARMv7

Installation

GitHub releases or script from README

Setup

Other (please mention in the description)

AdGuard Home version

v0.108.0-b.77

Action

  1. Disable the DHCP server on the router and configure the built-in one to use the local TLD .lan.
  2. Add a static lease with the hostname example, so that it can be resolved through example.lan.
  3. Add a custom filtering rule:
    ||example.lan^$dnsrewrite=example.lan
  4. Query a subdomain of the aforementioned client's hostname:
    dig @<AGH> service.example.lan

Expected result

At the very least the proper response with the specified CNAME record should have been returned. Ideally, the actual IP address of the DHCP client would be resolved.

Actual result

;; Question section mismatch: got example.lan/A/IN

Additional information and/or screenshots

The same scheme works works with the real-world domain names. So adding the rule:

||example.org^$dnsrewrite=example.org

makes the following request:

dig @<AGH> subdomain.example.org

resolve into a proper response with CNAME and the corresponding A records:

;; QUESTION SECTION:
;subdomain.example.org.         IN      A

;; ANSWER SECTION:
subdomain.example.org.  10      IN      CNAME   example.org.
example.org.            102     IN      A       23.215.0.133
example.org.            102     IN      A       23.220.75.235
example.org.            102     IN      A       23.220.75.238
example.org.            102     IN      A       23.215.0.132

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions