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

Cannot use 127.0.0.1 as private rDNS server (but adding port fixes it) #6231

Closed
4 tasks done
mxk opened this issue Sep 17, 2023 · 2 comments
Closed
4 tasks done

Cannot use 127.0.0.1 as private rDNS server (but adding port fixes it) #6231

mxk opened this issue Sep 17, 2023 · 2 comments
Assignees
Milestone

Comments

@mxk
Copy link

mxk commented Sep 17, 2023

Prerequisites

Platform (OS and CPU architecture)

OpenBSD, AMD64 (aka x86_64)

Installation

GitHub releases or script from README

Setup

On a router, DHCP is handled by the router

AdGuard Home version

0.107.38

Action

Configured 127.0.0.1 under "Private reverse DNS servers" (local_ptr_upstreams), which is my dnsmasq server.

If I change the server IP to either 127.0.0.1:53 or 10.0.0.1, both of which point to the same dnsmasq instance, then everything works correctly.

Expected result

PTR queries for private IPs should be forwarded to dnsmasq and resolved correctly.

Actual result

I get a SERVFAIL response. Adding :53 to the upstream server IP fixes the problem.

Additional information and/or screenshots

Debug log output:

[debug] dnsproxy: handling new udp packet from 10.0.0.3:11768
[debug] github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).logDNSMessage(): IN: ;; opcode: QUERY, status: NOERROR, id: 12254
;; flags: rd ad; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version 0; flags:; udp: 4096

;; QUESTION SECTION:
;1.1.0.10.in-addr.arpa.        IN       PTR

dnsforward: started processing recursion
dnsforward: finished processing recursion
dnsforward: started processing initial
applying filters: looking for client with ip 10.0.0.3 and clientid ""
applying filters: no clients with ip 10.0.0.3 and clientid ""
clients: processing 10.0.0.3 with rdns
dnsforward: finished processing initial
dnsforward: started processing ddr
clients: finished processing 10.0.0.3 with rdns in 175.332M-BM-5s
dnsforward: finished processing ddr
clients: processing 10.0.0.3 with whois
clients: finished processing 10.0.0.3 with whois in 26.731M-BM-5s
dnsforward: started processing local detection
dnsforward: finished processing local detection
dnsforward: started processing dhcp hosts
dnsforward: finished processing dhcp hosts
dnsforward: started processing local restriction
dnsforward: addr 10.0.1.1 is from locally served network
dnsforward: finished processing local restriction
dnsforward: started processing dhcp addrs
dnsforward: finished processing dhcp addrs
dnsforward: started processing filtering before req
dnsforward: finished processing filtering before req
dnsforward: started processing local ptr
dnsproxy: cache: disabled; not caching
dnsforward: resolving private address: selecting general upstream: no upstream specified
dnsforward: finished processing local ptr
github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).logDNSMessage(): OUT: ;; opcode: QUERY, status: SERVFAIL, id: 12254
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;1.1.0.10.in-addr.arpa.        IN       PTR
@ainar-g ainar-g added this to the v0.107.39 milestone Sep 19, 2023
adguard pushed a commit that referenced this issue Sep 28, 2023
Merge in DNS/adguard-home from 6231-filter-local-addrs to master

Updates #6231.

Squashed commit of the following:

commit 9a60d4e
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Thu Sep 28 18:59:51 2023 +0300

    dnsforward: imp code

commit f0c3452
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Wed Sep 27 18:12:47 2023 +0300

    all: don't match nets

commit 572dc0f
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Wed Sep 27 13:37:48 2023 +0300

    dnsforward: move some code, rm dups

commit 3af627c
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Mon Sep 25 19:21:05 2023 +0300

    dnsforward: imp naming

commit cad1e4e
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Mon Sep 25 19:17:53 2023 +0300

    dnsforward: imp code

commit 23d6970
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Mon Sep 25 19:08:48 2023 +0300

    dnsforward: add upstream matcher

commit 5819c59
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Fri Sep 22 18:31:37 2023 +0300

    all: imp code, docs

commit d07ea96
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Fri Sep 22 18:09:09 2023 +0300

    all: imp code

commit 38a912a
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Fri Sep 22 15:48:25 2023 +0300

    all: imp code

commit 811212f
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Thu Sep 21 19:05:07 2023 +0300

    all: imp addrs detection
@EugeneOne1
Copy link
Member

EugeneOne1 commented Sep 28, 2023

@mxk, hello and apologies for delayed response. We've tried to fix it in the latest edge build, so could you please try it? AdGuard Home should now consider the port while filtering its own listening addresses from private upstreams.

@mxk
Copy link
Author

mxk commented Sep 29, 2023

Can confirm that this is fixed in the edge build. Thanks!

@ainar-g ainar-g modified the milestones: v0.107.40, v0.107.39 Oct 11, 2023
annguyen0 pushed a commit to annguyen0/AdGuardHome that referenced this issue Nov 27, 2023
Merge in DNS/adguard-home from 6231-filter-local-addrs to master

Updates AdguardTeam#6231.

Squashed commit of the following:

commit 9a60d4e
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Thu Sep 28 18:59:51 2023 +0300

    dnsforward: imp code

commit f0c3452
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Wed Sep 27 18:12:47 2023 +0300

    all: don't match nets

commit 572dc0f
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Wed Sep 27 13:37:48 2023 +0300

    dnsforward: move some code, rm dups

commit 3af627c
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Mon Sep 25 19:21:05 2023 +0300

    dnsforward: imp naming

commit cad1e4e
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Mon Sep 25 19:17:53 2023 +0300

    dnsforward: imp code

commit 23d6970
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Mon Sep 25 19:08:48 2023 +0300

    dnsforward: add upstream matcher

commit 5819c59
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Fri Sep 22 18:31:37 2023 +0300

    all: imp code, docs

commit d07ea96
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Fri Sep 22 18:09:09 2023 +0300

    all: imp code

commit 38a912a
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Fri Sep 22 15:48:25 2023 +0300

    all: imp code

commit 811212f
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Thu Sep 21 19:05:07 2023 +0300

    all: imp addrs detection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants