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

Bug with NXDOMAIN PR #40

Closed
BrianInAz opened this issue Aug 8, 2023 · 3 comments
Closed

Bug with NXDOMAIN PR #40

BrianInAz opened this issue Aug 8, 2023 · 3 comments

Comments

@BrianInAz
Copy link

The most recent PR looks to have introduced a bug where a valid response from NetBox returns the proper address in addition to NXDOMAIN. I'm very new to Go so I wanted to post it here as I continue to look into it. Thx

I have the following defined in my NetBox:

devkea.homelab.bjzy.me 192.168.50.2
devcoredns.homelab.bjzy.me 192.168.50.60
devnetbox.homelab.bjzy.me 192.168.50.7

When querying nonexistent names, everything is expected:

❯ nslookup something.homelab.bjzy.me 192.168.50.60
Server:		192.168.50.60
Address:	192.168.50.60#53

** server can't find something.homelab.bjzy.me: NXDOMAIN

❯ nslookup else.homelab.bjzy.me 192.168.50.60
Server:		192.168.50.60
Address:	192.168.50.60#53

** server can't find else.homelab.bjzy.me: NXDOMAIN

But when query a valid name, it returns proper IP in addition to NXDOMAIN:

❯ nslookup devkea.homelab.bjzy.me 192.168.50.60
Server:		192.168.50.60
Address:	192.168.50.60#53

Name:	devkea.homelab.bjzy.me
Address: 192.168.50.2
** server can't find devkea.homelab.bjzy.me: NXDOMAIN

❯ nslookup devcoredns.homelab.bjzy.me 192.168.50.60
Server:		192.168.50.60
Address:	192.168.50.60#53

Name:	devcoredns.homelab.bjzy.me
Address: 192.168.50.60
** server can't find devcoredns.homelab.bjzy.me: NXDOMAIN

❯ nslookup devnetbox.homelab.bjzy.me 192.168.50.60
Server:		192.168.50.60
Address:	192.168.50.60#53

Name:	devnetbox.homelab.bjzy.me
Address: 192.168.50.7
** server can't find devnetbox.homelab.bjzy.me: NXDOMAIN

Corefile:

#/etc/coredns/Corefile
homelab.bjzy.me {
    netbox {
        token ba5b0d53c7968ebbe15a47d9ab891b512f50e46a
        url https://devnetbox.homelab.bjzy.me/api/ipam/ip-addresses
    }
    whoami
    health
    prometheus 0.0.0.0:9153
    log
    errors
}
@BrianInAz
Copy link
Author

Upon further review of the logs, it was because I did not have AAAA records. After adding IPV6 addresses to NetBox, everything is good. Thanks

@oz123
Copy link
Owner

oz123 commented Aug 10, 2023

Well, maybe it's still a valid issue. Do we want to force users to have both types of records?
Some people don't know\aren't interested in ipv6.

@oz123
Copy link
Owner

oz123 commented Aug 10, 2023

Related #33

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