DNS rewrites not working
I want to use NextDNS in my future setup. Right now I have some instances which are hosted at my home server and are accessible from outside. However, if I'm connected with my home network I obviously want that the connection is not routed via external (public IP) and rather routed within the local network.
To achieve this, I want to use the DNS rewrite feature of NextDNS so that a specific record (let's say for e.g. cloud.mydomain.com) is redirect to 192.168.1.25 instead of 85.xx.xx.xx (enter random public IPv4 address here).
Unfortunately, this seems not to work right now for me. I have set multiple records which are pointing to the internal IP address 192.168.1.25 for e.g. for cloud.mydomain.com, news.mydomain.com, lib.mydomain.com and so on. The result is always the same: NextDNS does not show the IP address. The result is always empty (the DNS requests are routed over my home router and my router is asking NextDNS via DNS-over-TLS).
When I'm configuring a client in my network to directly talk to the NextDNS servers (over IPv4 or v6), I'm getting the public IP address for that instance instead. In the logs I can see the DNS requests coming from my network and NextDNS seems to answer them (at least that's what the logs are saying. Unfortunately I can't see what exactly NextDNS is returning as a result).
What am I missing here?
Thanks in advance
I fixed the issue! Thank you for your help!
I have to list all the records that are going to be rewritten by NextDNS in my FritzBox "DNS rebind protection" list. This list ensures, that an answer which comes from a DNS resolver outside of my local network and is pointing to a IP address in my local network is being discarded. After listing all the subdomains in the DNS rebing protection list, the result as exactly as it should be.