Bind to Bind DNS Lookup - Returns wildcard value for defined A record
OwN-3m-All
own3mall at gmail.com
Tue Jul 25 22:26:33 UTC 2023
Ok, I fixed the problem.
I changed the zonefile templates for dynamic DNS used at dynamix.run to the
following:
$TTL 60
@ IN SOA ns.{domainname}. admin at dynamix.run (
{serial} ;
30 ; Refresh
20 ; Retry
1209600 ; Expire
30 ) ; Minimum
{domainname}. IN NS ns.{domainname}.
ns.{domainname}. IN A {serverip}
ns.{domainname}. IN A {serveripBackup}
Rather than:
$TTL 60
@ IN SOA ns.{domainname}. admin at dynamix.run (
{serial} ;
30 ; Refresh
20 ; Retry
1209600 ; Expire
30 ) ; Minimum
{domainname}. IN NS ns.{domainname}.
ns.{domainname}. IN A {dnsip}
{dnsip} would get updated with the user's dynamic IP address. Thus, if you
were to query specific.wildcard-test.dynx.me, it would send the traffic to
their IP address to resolve, which is not correct, since the record is
defined on the main server, not theirs.
This makes it so queries for that subdomain resolve to that same specific
server, rather than the IP address provided by the end user since it is
acting as the main DNS server, in this case.
But, it still makes no sense to me how google's DNS (and others) was able
to resolve everything just fine... google's dns must not be asking
ns.{domainname}. for the records?
How crazy. I still don't fully understand why this happens, but I could
clearly see tcpdump asking 23.29.117.19 for the A record for
specific.wildcard-test.dynx.me which it has no information about since
there is no zonefile on 23.29.117.19 for wildcard-test.dynx.me...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20230725/5e3471cb/attachment.htm>
More information about the bind-users
mailing list