Hey everyone! I'm facing an issue with a DNS result that's not working for my device, and I hope someone here can point me in the right direction. So, my device needs to connect to a hosted service, let's just call it ABC`XYZ`com. When it queries DNS, it gets a non-authoritative result that it ignores, preventing the connection from being established. I've tried various DNS services like Google DNS (8.8.8.8) and Cloudflare (1.1.1.1), but they all return the same non-authoritative response.
To work around this, I set up a DNS record on my local DNS server that points to the non-authoritative IP. This allows the device to get a valid answer and connect. Now, I need a way to update this DNS record automatically if the IP address of the hosted service changes. Basically, I want my DNS server to act as a middle-man, converting the non-authoritative result into a proper one that my device can use. Any help would be greatly appreciated! Thanks!
5 Answers
What's the device you're using, and why does it need an authoritative answer? Typically, non-authoritative responses are common for devices due to caching and relaying. Just be cautious since faking authoritative responses can create security issues. Also, are you sure it's the lack of an authoritative response that's causing the problem and not something like a timeout?
It seems like your device is just picky about getting authoritative answers, which is not typical but can happen with some older or embedded systems. Your workaround with the local DNS server works because it's now seen as authoritative. To keep your records updated, you should set up a way to regularly fetch the real IP and update your DNS server. A cron job or scheduled task would be an effective way to automate this.
To get a proper update system, you need access to the authoritative DNS server and permission to make DDNS updates. Alternatively, you could run your own DNS server, but that would only work for you and may not be the best long-term solution. I wouldn't recommend the second option unless you really have to.
Have you checked your public DNS records to see if the hostname points correctly? If it does, just give it some time—DNS changes can take a while to propagate, sometimes up to 48 hours.
It might help to log how often the IP actually changes. This way, you can determine how frequently you need to update your DNS records.

Exactly! If you start caching or trying to force authoritative responses for things like CDNs, you could run into some serious issues. Just try to avoid hardcoding IPs or static routing for CDN addresses.