Using EDNS0 to identify my nodes in custom DNS server
Hi everyone,
I have a bit of a technical conundrum on my side: I am not a professional networking engineer but for some reason or another I am now in this rabbit hole of making my own DNS server in my k8s to handle various paths of updates based on ingress config (some tailscale stuff, some cloudflare stuff, but also exposes port :53 with DNS mapping for some internal configurations).
I have managed to sniff what dnsmasq does when CPE ID is added to the configuration for the reason of correctly routing the DNS queries in NextDNS, so that's all fine: my forwarder for all other cases (which are not statically mapped in my DNS server) work perfectly. Basically, I figured out how I can add extra EDNS0 "extra" to send the CPE ID in a way that NextDNS accepts and applies my configurations - and I can see now my device popping up in the DNS logs on NextDNS!
But, here comes now my question, is there any way to construct a UDP DNS query that will send... something... (I guess another EDNS0 extra?) that will identify my device in NextDNS logs? UDP is the only one that I can make at this time, since Golang library I am using supports only those.
Is that even possible? Is there some other way that I can do when constructing UDP query so I see my dns server as a device in the listing of recognized devices in DNS logs on NextDNS?
Kind Regards & thanks for help
5 replies
-
I would love to offer some help here, but I'm pretty confused at the moment as to what you are conveying. You said:
said:
and I can see now my device popping up in the DNS logs on NextDNS!But then follow up with this:
said:
is there any way to construct a UDP DNS query that will send... something... (I guess another EDNS0 extra?) that will identify my device in NextDNS logs?The two sound contradictory. Are you saying your k8s DNS server is successfully communicating with NextDNS over DoH or DoT and providing client names via EDNS0, but is not identifying itself as a device in NextDNS logs?
Hopefully some clarification can get this ironed out and we'll see what we can figure out. -
Hi Mark!
I am successfully using an extra in my forwarded query to refer to my NextDNS... identifier (I guess that's what you call that shirt unique string that identifies the target configuration which is something like a391735 -which I just invented now as an example?). WhatI mean by saying that is that I can verify that my NextDNS configuration is applied (for example if I blocked some annoying website on my nextdns configuration I can verify that I am getting correct information back from nextDNS, meaning my a391735 is correct). So this part is fine I believe.
But, I don't know how to get my machine name attached to my queries, so that I can identify my service "kube-home-dns" as the source of the query. That's what I can't figure out. Maybe it's even impossible without actually using more advanced approaches as DoH? I would just like to understand the mechanism at play that alows NextDNS to figure out the originating device doing the queries - it seems like a nice to have in my case?
Thanks a lot for jumping in and trying to help :)
-
You can pass device IP for identification using DNS0 subnet with a /32 or /128. Our resolver will interpret this as a client identification. You can’t pass names over UDP. I’d recommend using our CLI for your use case.
Content aside
- 2 hrs agoLast active
- 5Replies
- 66Views
-
3
Following