[GH-ISSUE #1483] DDNS Update Request With InMemoryAuthority? #682

Closed
opened 2026-03-15 23:47:48 +03:00 by kerem · 3 comments
Owner

Originally created by @mhfowler on GitHub (May 10, 2021).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1483

hey, I've started trying to build a dynamic DNS server for a project, using trust-dns.

So far I've been using InMemoryAuthority and its working well for serving lookups.

I'm now trying to send an ddns udpate to the server using nsupdate, and I'm getting a TIMP response. Here is the log of what I see on the trust_dns_server:

 INFO 2021-05-10T10:55:38Z: trust_dns_server::server::server_future: request: 51878 type: Query op_code: Update dnssec: false name: dyn.commoninternet.net. type: SOA class: IN
DEBUG 2021-05-10T10:55:38Z: trust_dns_server::authority::catalog: update received: 51878
DEBUG 2021-05-10T10:55:38Z: trust_dns_server::authority::catalog: searching authorities for: dyn.commoninternet.net.
 WARN 2021-05-10T10:55:38Z: trust_dns_server::authority::catalog: Consider replacing the usage of master/slave with primary/secondary, see Juneteenth.
 INFO 2021-05-10T10:55:38Z: trust_dns_server::server::response_handler: response: 51878 response_code: 4
DEBUG 2021-05-10T10:55:38Z: trust_dns_proto::tcp::tcp_stream: sending message len: 12 to: 127.0.0.1:53946
DEBUG 2021-05-10T10:55:38Z: trust_dns_proto::tcp::tcp_stream: zero bytes read, stream closed?

From looking at the documentation and source code https://docs.rs/trust-dns-server/0.20.2/src/trust_dns_server/store/in_memory/authority.rs.html#67-102, I see there is a stale comment saying there used to be an allow_update argument, which now no longer exists.

This made me wonder if maybe InMemoryAuthority was in a sort of in between state with updating, and that maybe updating was actually TIMP (function not implemented).

I saw you said the project was under active development, so figured I'd leave a message to ask if I should be using something other than InMemoryAuthority (or something is wrong on my end) or if handling ddns Update Requests were being developed or in a state of change.

thanks for any guidance!

Originally created by @mhfowler on GitHub (May 10, 2021). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1483 hey, I've started trying to build a dynamic DNS server for a project, using trust-dns. So far I've been using InMemoryAuthority and its working well for serving lookups. I'm now trying to send an ddns udpate to the server using nsupdate, and I'm getting a TIMP response. Here is the log of what I see on the trust_dns_server: ``` INFO 2021-05-10T10:55:38Z: trust_dns_server::server::server_future: request: 51878 type: Query op_code: Update dnssec: false name: dyn.commoninternet.net. type: SOA class: IN DEBUG 2021-05-10T10:55:38Z: trust_dns_server::authority::catalog: update received: 51878 DEBUG 2021-05-10T10:55:38Z: trust_dns_server::authority::catalog: searching authorities for: dyn.commoninternet.net. WARN 2021-05-10T10:55:38Z: trust_dns_server::authority::catalog: Consider replacing the usage of master/slave with primary/secondary, see Juneteenth. INFO 2021-05-10T10:55:38Z: trust_dns_server::server::response_handler: response: 51878 response_code: 4 DEBUG 2021-05-10T10:55:38Z: trust_dns_proto::tcp::tcp_stream: sending message len: 12 to: 127.0.0.1:53946 DEBUG 2021-05-10T10:55:38Z: trust_dns_proto::tcp::tcp_stream: zero bytes read, stream closed? ``` From looking at the documentation and source code https://docs.rs/trust-dns-server/0.20.2/src/trust_dns_server/store/in_memory/authority.rs.html#67-102, I see there is a stale comment saying there used to be an allow_update argument, which now no longer exists. This made me wonder if maybe InMemoryAuthority was in a sort of in between state with updating, and that maybe updating was actually TIMP (function not implemented). I saw you said the project was under active development, so figured I'd leave a message to ask if I should be using something other than InMemoryAuthority (or something is wrong on my end) or if handling ddns Update Requests were being developed or in a state of change. thanks for any guidance!
kerem closed this issue 2026-03-15 23:47:53 +03:00
Author
Owner

@bluejekyll commented on GitHub (May 10, 2021):

I don't think we every added support to the InMemoryAuthority for Dynamic DNS. If I remember correctly, I only implemented that on the SqliteAuthority. There are a few things that we really should improve to make DynamicDNS more viable. One is having a checkpoint type operation on the journal so that it can be safely replicated or backed up. The other main one would be to improve the implementation of the AXFR. It would also be nice to properly support IXFR.

You should be aware that right now the server only supports SIG0 based auth for Dynamic DNS. There is a TSIG based option being added in #1459, though right now that is only the client-side.

I suppose if you wanted to, you could add DynamicDNS to the InMemoryAuthority, though I'd be curious about the use case, and what you would expect to happen between restarts?

<!-- gh-comment-id:836832681 --> @bluejekyll commented on GitHub (May 10, 2021): I don't think we every added support to the InMemoryAuthority for Dynamic DNS. If I remember correctly, I only implemented that on the SqliteAuthority. There are a few things that we really should improve to make DynamicDNS more viable. One is having a checkpoint type operation on the journal so that it can be safely replicated or backed up. The other main one would be to improve the implementation of the AXFR. It would also be nice to properly support IXFR. You should be aware that right now the server only supports SIG0 based auth for Dynamic DNS. There is a TSIG based option being added in #1459, though right now that is only the client-side. I suppose if you wanted to, you could add DynamicDNS to the InMemoryAuthority, though I'd be curious about the use case, and what you would expect to happen between restarts?
Author
Owner

@mhfowler commented on GitHub (May 11, 2021):

@bluejekyll thanks for the info! for what I'm working on right now, right now I'm planning to have a separate HTTP server which the user/client interacts with (sends IP updates to) and handles authentication. After getting these IP updates, the HTTP server then passes them onto the DNS server so that they are actually updated in the zones being served. The HTTP server has its own database (in sled) where it can store the IP addresses in a persistent way, so InMemoryAuthority is fine for now for the DNS server as it just needs to build the catalog and then serve the records, and I can store them separately.

Of course, if more of the functionality you described were available, I could do more of this within the DNS server itself, but doing it outside is also a workable solution for me. The main thing I need is a way for the HTTP server to talk to the DNS server and get it to update its records, ideally without restarting the server and rebuilding the catalog every time. For now I'm trying using the trust-dns client.

I see that SqliteAuthority is also not present in the latest release? so it sounds like dynamic dns the official way is not really possible at the moment? Maybe further down the line I could also change up my code to use more of the features of trust-dns when they are available, or implement DynamicDNS for InMemoryAuthority, or for a different type of Authority.

<!-- gh-comment-id:837833940 --> @mhfowler commented on GitHub (May 11, 2021): @bluejekyll thanks for the info! for what I'm working on right now, right now I'm planning to have a separate HTTP server which the user/client interacts with (sends IP updates to) and handles authentication. After getting these IP updates, the HTTP server then passes them onto the DNS server so that they are actually updated in the zones being served. The HTTP server has its own database (in sled) where it can store the IP addresses in a persistent way, so InMemoryAuthority is fine for now for the DNS server as it just needs to build the catalog and then serve the records, and I can store them separately. Of course, if more of the functionality you described were available, I could do more of this within the DNS server itself, but doing it outside is also a workable solution for me. The main thing I need is a way for the HTTP server to talk to the DNS server and get it to update its records, ideally without restarting the server and rebuilding the catalog every time. For now I'm trying using the trust-dns client. I see that SqliteAuthority is also not present in the latest release? so it sounds like dynamic dns the official way is not really possible at the moment? Maybe further down the line I could also change up my code to use more of the features of trust-dns when they are available, or implement DynamicDNS for InMemoryAuthority, or for a different type of Authority.
Author
Owner

@mhfowler commented on GitHub (May 15, 2021):

I think I will just wait to use TrustDNS until there's a bit more documentation, so I'm closing this for now. Looking forward to see the project progress!

<!-- gh-comment-id:841602737 --> @mhfowler commented on GitHub (May 15, 2021): I think I will just wait to use TrustDNS until there's a bit more documentation, so I'm closing this for now. Looking forward to see the project progress!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#682
No description provided.