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

rDNS queries returning SERVFAIL do not show up in Query Log/FQDN rewrite bug #3256

Closed
3 tasks done
agneevX opened this issue Jun 11, 2021 · 3 comments
Closed
3 tasks done
Assignees
Milestone

Comments

@agneevX
Copy link
Contributor

agneevX commented Jun 11, 2021

Prerequisites

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

Environment

  • Version of AdGuard Home server: 0.106.3
  • How did you install AdGuard Home: GH Releases
  • How did you setup DNS configuration: N/A
  • If it's a router or IoT, please write device model: N/A
  • CPU architecture: arm64
  • Operating system and version: Ubuntu 20.04

Issue details

rDNS queries do not show up in Query Log, when SERVFAIL is returned.

E.g. with an incorrect syntax in a rule (more on that below):

||20.0.0.10.in-addr.arpa^$dnsrewrite=NOERROR;PTR;device.

Additional Information

When a custom rule is added like this, per the first example in your docs:

||20.0.0.10.in-addr.arpa^$dnsrewrite=NOERROR;PTR;device.

results in:

; <<>> DiG 9.16.1-Ubuntu <<>> -x 10.0.0.20 @10.0.0.10
...
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 60309
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

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

However, eliminate the period at the end and it works:

||20.0.0.10.in-addr.arpa^$dnsrewrite=NOERROR;PTR;device
; <<>> DiG 9.16.1-Ubuntu <<>> -x 10.0.0.20 @10.0.0.10
...
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23924
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

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

;; ANSWER SECTION:
20.0.0.10.in-addr.arpa.	10	IN	PTR	device.
...
@ainar-g ainar-g self-assigned this Jun 11, 2021
@ainar-g ainar-g added this to the v0.107.0 milestone Jun 11, 2021
@ainar-g
Copy link
Contributor

ainar-g commented Jun 11, 2021

Hello, and thank you for the report. The dot-vs-no-dot definitely seems like a bug somewhere. I'm not sure about the SERVFAIL in logs, but I'll look at it.

adguard pushed a commit to AdguardTeam/urlfilter that referenced this issue Jun 11, 2021
Updates AdguardTeam/AdGuardHome#3256.

Squashed commit of the following:

commit c32f3e3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Jun 11 13:59:01 2021 +0300

    all: imp fqdn support in ptr dnsrewrite
adguard pushed a commit that referenced this issue Jun 11, 2021
Updates #3256.

Squashed commit of the following:

commit 304c7bc
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Jun 11 14:20:45 2021 +0300

    filtering: fix fqdn support in ptr dnsrewrite
@ainar-g
Copy link
Contributor

ainar-g commented Jun 11, 2021

The dot issue is fixed as of edge version v0.107.0-a.72+813102f2. Still looking at the SERVFAIL thing.

@agneevX agneevX changed the title rDNS queries returning SERVFAIL do not show up in Query Log rDNS queries returning SERVFAIL do not show up in Query Log/FQDN rewrite bug Jun 12, 2021
@ainar-g
Copy link
Contributor

ainar-g commented Jun 16, 2021

@agneevX, it looks like the non-logging of SERVFAIL is currently intentional. We generally do not add server or configuration errors into the query log, only into the plain text log. If you think that we should, it's better to make a new feature request issue, but if we decide to do that, we'll probably not be able until the new API and the new database are in, which will probably be no sooner than v0.109.0 cycle.

The FQDN issue should be fixed in v0.107.0-b.2, so I'll close this issue if you don't mind.

@ainar-g ainar-g closed this as completed Jun 16, 2021
heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Updates AdguardTeam#3256.

Squashed commit of the following:

commit 304c7bc
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Jun 11 14:20:45 2021 +0300

    filtering: fix fqdn support in ptr dnsrewrite
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

2 participants