2
Vote

Add Support for Zone Transfers (AXFR)

description

A Zone Transfer allows a resolver to pull a copy of the a zone file from a DNS server.
 
NOTE: "Because accuracy is essential, TCP or some other reliable protocol must be used for AXFR requests.", RFC 1024
 
References:
Updates: 1034, 1035 (if approved) - DNS Zone Transfer Protocol (AXFR)
http://www.ietf.org/internet-drafts/draft-ietf-dnsext-axfr-clarify-07.txt
"This document concentrates on just the definition of AXFR."
 
RFC 1034 - DOMAIN NAMES - CONCEPTS AND FACILITIES
http://www.ietf.org/rfc/rfc1034.txt
 
RFC 1035 - DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION
http://www.ietf.org/rfc/rfc1035.txt
 
RFC 1996 - A Mechanism for Prompt Notification of Zone Changes (DNS NOTIFY)
http://www.ietf.org/rfc/rfc1996.txt
 
Notes on Implementing AXFR Zone Transfers (from DJB)
See: http://cr.yp.to/djbdns/axfr-notes.html
 
Also explore IXFR, RFC 1995 - Incremental Zone Transfer in DNS
http://www.ietf.org/rfc/rfc1995.txt

file attachments

comments

MIC42 wrote Aug 3, 2010 at 4:25 PM

The AXFR can be used with this library, all you have to do is use TCP protocol and a minor code modification - Resolve and ResolveTcp methods must be able to receive and return multiple DNS answers instead of only one.
I modified the source to return List of DnsQueryResponse objects instead of a single one (see attachment), and it works fine.
New methods: ResolveEx (both overloads)
Modified methods: Resolve (both overloads), ResolveTcp.
I did not modify ResolveUdp method, as the AXFR query cannot be done over Udp anyway.
Please feel free to use the code (or part, or modified version, etc.) in future releases.

softlion wrote Jan 30, 2012 at 4:03 PM

the code is missing, the file is incomplete ?

wrote Mar 7, 2012 at 6:58 PM

wrote Feb 14, 2013 at 3:47 AM