DNS resolver ignore type of requested records and returns wrong result #1740

Closed
opened 2025-11-20 06:05:46 -05:00 by saavagebueno · 1 comment
Owner

Originally created by @strmaks on GitHub (Mar 19, 2025).

Describe the problem

Found as part of work on the https://github.com/netbirdio/netbird/issues/3419 issue.
Netbird resolver completely ignores (or forgets) the requested record type.

without netbird

[user@localhost ~]$ host -t mx google.com
google.com mail is handled by 10 smtp.google.com.
[user@localhost ~]$ host -t a google.com
google.com has address 172.217.16.14
[user@localhost ~]$ host -t aaaa google.com
google.com has IPv6 address 2a00:1450:401b:80d::200e

with netbird

[user@localhost ~]$ host -t mx google.com
google.com has IPv6 address 2a00:1450:4001:81d::200e
google.com has address 142.250.186.142
[user@localhost ~]$ host -t a google.com
google.com has IPv6 address 2a00:1450:4001:81d::200e
google.com has address 142.250.186.142
[user@localhost ~]$ host -t aaaa google.com
google.com has IPv6 address 2a00:1450:4001:81d::200e
google.com has address 142.250.186.174

I.e., the resolver responds to any request of any type with the same response containing A and AAAA records.

To Reproduce

Route domain google.com though the exit node using the Networks.
Trying to receive the MX record for this domain.

Expected behavior

Data in the response should be expected
AAAA request should return only ipv6 results
A request should return only ipv4 results
MX should return MX records

Are you using NetBird Cloud?

Reproduced on both, Cloud and Self Hosted

NetBird version

0.37.2
0.38.2

MacOs 15 arm64 and Ubuntu Linux 24.04

Is any other VPN software installed?

no

Originally created by @strmaks on GitHub (Mar 19, 2025). **Describe the problem** Found as part of work on the https://github.com/netbirdio/netbird/issues/3419 issue. Netbird resolver completely ignores (or forgets) the requested record type. without netbird [user@localhost ~]$ host -t mx google.com google.com mail is handled by 10 smtp.google.com. [user@localhost ~]$ host -t a google.com google.com has address 172.217.16.14 [user@localhost ~]$ host -t aaaa google.com google.com has IPv6 address 2a00:1450:401b:80d::200e with netbird [user@localhost ~]$ host -t mx google.com google.com has IPv6 address 2a00:1450:4001:81d::200e google.com has address 142.250.186.142 [user@localhost ~]$ host -t a google.com google.com has IPv6 address 2a00:1450:4001:81d::200e google.com has address 142.250.186.142 [user@localhost ~]$ host -t aaaa google.com google.com has IPv6 address 2a00:1450:4001:81d::200e google.com has address 142.250.186.174 I.e., the resolver responds to any request of any type with the same response containing A and AAAA records. **To Reproduce** Route domain google.com though the exit node using the Networks. Trying to receive the MX record for this domain. **Expected behavior** Data in the response should be expected AAAA request should return only ipv6 results A request should return only ipv4 results MX should return MX records **Are you using NetBird Cloud?** Reproduced on both, Cloud and Self Hosted **NetBird version** 0.37.2 0.38.2 MacOs 15 arm64 and Ubuntu Linux 24.04 **Is any other VPN software installed?** no
saavagebueno added the triage-needed label 2025-11-20 06:05:46 -05:00
Author
Owner

@lixmal commented on GitHub (Apr 26, 2025):

Fixed by https://github.com/netbirdio/netbird/pull/3615

@lixmal commented on GitHub (Apr 26, 2025): Fixed by https://github.com/netbirdio/netbird/pull/3615
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1740