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

Adding a wildcard rewrite for both ipv4 & ipv6 breaks the ipv6 response #3343

Closed
skerit opened this issue Jul 12, 2021 · 2 comments
Closed
Assignees
Milestone

Comments

@skerit
Copy link

skerit commented Jul 12, 2021

Issue Details

I tried to rewrite some specific addresses to a local ipv4 and an ipv6 address.
I created 2 wildcard addresses: 1 for the ipv4 and 1 for the ipv6 address, for example:

*.kumulus.mydomain.be    192.168.50.2
*.kumulus.mydomain.be    2222:2222:2222:2222:2222:2222:2222:2222

However, this did not exactly work.
The ipv4 response is correct, like in this example:

$ dig A something.kumulus.mydomain.be

; <<>> DiG 9.16.16 <<>> A something.kumulus.mydomain.be
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39051
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;something.kumulus.mydomain.be.	IN	A

;; ANSWER SECTION:
something.kumulus.mydomain.be. 10 IN	A	192.168.50.2

;; Query time: 3 msec
;; SERVER: 192.168.50.1#53(192.168.50.1)
;; WHEN: ma jul 12 17:46:58 CEST 2021
;; MSG SIZE  rcvd: 63

But when I try to do an ipv6 lookup it gives a wrong response:

$ dig AAAA something.kumulus.mydomain.be

; <<>> DiG 9.16.16 <<>> AAAA something.kumulus.mydomain.be
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45559
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;something.kumulus.mydomain.be.	IN	AAAA

;; Query time: 3 msec
;; SERVER: 192.168.50.1#53(192.168.50.1)
;; WHEN: ma jul 12 17:48:38 CEST 2021
;; MSG SIZE  rcvd: 47

As you can see: it's a NOERROR status, but the response is empty.

When I remove the ipv4 rewrite, the ipv6 response is fixed!

  • Version of AdGuard Home server: 0.106.3
  • How did you install AdGuard Home: GitHub release
  • How did you setup DNS configuration: Router
  • If it's a router or IoT, please write device model: Asus RT-AX88U
  • CPU architecture: AMD64
  • Operating system and version: Ubuntu 20.04.2

Expected Behavior

I expect it to return the ipv6 address I configured for the wildcard address, instead of returning nothing.

Actual Behavior

The ipv4 request works and returns the ipv4 address I configured, but an ipv6 request returns an empty response.

Additional Information

This is not a problem for non-wildcard rewrites.
So my current workaround is to add a local.mydomain rewrite for both ipv4 & ipv6, and then point the wildcard rewrites to that cname.

@ainar-g ainar-g self-assigned this Jul 12, 2021
@ainar-g ainar-g added this to the v0.107.0 milestone Jul 12, 2021
adguard pushed a commit that referenced this issue Jul 12, 2021
Updates #3343.

Squashed commit of the following:

commit ab3c3e0
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Jul 12 20:58:57 2021 +0300

    filtering: fix legacy rewrite wildcards
@ainar-g
Copy link
Contributor

ainar-g commented Jul 12, 2021

Thanks for the report! This should be fixed as of snapshot 194ea6e on the edge channel. Could you please check if the problem is fixed for you as well?

@ainar-g
Copy link
Contributor

ainar-g commented Jul 26, 2021

I'll close this issue for now. Please feel free to reopen with more details if you find any issues with the fix.

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

Squashed commit of the following:

commit ab3c3e0
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Jul 12 20:58:57 2021 +0300

    filtering: fix legacy rewrite wildcards
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