Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom reverse lookup fails on OpenWRT #7364

Open
4 tasks done
sgofferj opened this issue Oct 20, 2024 · 4 comments
Open
4 tasks done

Custom reverse lookup fails on OpenWRT #7364

sgofferj opened this issue Oct 20, 2024 · 4 comments

Comments

@sgofferj
Copy link

Prerequisites

Platform (OS and CPU architecture)

Linux, ARM64

Installation

Custom package (OpenWrt, HomeAssistant, etc; please mention in the description)

Setup

On one machine

AdGuard Home version

v0.107.53

Action

I have AGH set up on OpenWRT. Because I have different subnets with different domain names, I have multiple instances of dnsmasq running:
Port 5352 for 192.168.2.0/24
Port 5353 for 192.168.3.0/24

I can successfully resolve IP via those instances e.g. with
nslookup 192.168.3.6 127.0.0.1:5353

In AGH I have the following entries in my upstream servers list:

[/iot.gofferje.net/]127.0.0.1:5352
[/2.168.192.in-addr.arpa/]127.0.0.1:5352
[/voice.gofferje.net/]127.0.0.1:5353
[/3.168.192.in-addr.arpa/]127.0.0.1:5353
https://dns10.quad9.net/dns-query
https://dns.cloudflare.com/dns-query

Additionally, I have the following configuration in the private reverse DNS servers list:

127.0.0.1:5352
127.0.0.1:5353

"Use private reverse DNS servers" is checked.

I can successfully resolve *.iot.gofferje.net and *.voice.gofferje.net via AGH but the reverse lookups fail with NXDOMAIN. As mentioned above, I can do the reverse lookup successfully when telling nslookup to contact the respective dnsmasq instance directly, so it appears to be a problem with AGH.

Expected result

Reverse lookup

Actual result

NXDOMAIN

Additional information and/or screenshots

OpenWrt SNAPSHOT (r27777-4d81f40d63)

@sgofferj
Copy link
Author

Possibly related to #4290, however in my case no IPv6 is involved.

@sgofferj
Copy link
Author

sgofferj commented Oct 20, 2024

tcpdump seems to confirm that AGH is not querying the configured upstream servers.
Here is a tcpdump of me doing nslookup 192.168.3.6 127.0.0.1:5353

22:10:38.659540 IP localhost.34339 > localhost.5353: 39891+ PTR (QM)? 6.3.168.192.in-addr.arpa. (42)
22:10:38.659681 IP localhost.5353 > localhost.34339: 39891* 1/0/0 PTR SEPxxxxxxxxxxxx.voice.gofferje.net. (90)

And here a tcpdump of me querying AGH with nslookup 192.168.3.6 127.0.0.1:53:

22:13:39.683965 IP localhost.39241 > localhost.53: 13139+ PTR? 6.3.168.192.in-addr.arpa. (42)
22:13:39.685186 IP localhost.53 > localhost.39241: 13139 NXDomain* 0/1/0 (97)

AGH does not seem to query the upstream server 127.0.0.1:5353.

@GoetzGoerisch
Copy link

Try adding *. infront of your domains.
Although this should only appaer in 0.108.x it is already active in 0.170.53 for me.

@sgofferj
Copy link
Author

Finally had some time to debug. Turns out, the problem seems to be in the documentation. The documentation for reverse lookups says

  1. Enter the following into the “Upstream DNS servers” field on the “Settings → DNS settings” page
    [/in-addr.arpa/]192.168.8.8
    [/ip6.arpa/]192.168.8.8

and

  1. Enter the following into the “Private reverse DNS servers” field on the same page below the previous field
    192.168.8.8

That is not correct. The patterns also need to go into “Private reverse DNS servers”. Then it works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants