Parsing an AXFR zone transfer into a name record
Kevin Darcy
kcd at daimlerchrysler.com
Tue Dec 4 00:22:11 UTC 2001
It's still not clear what you are trying to do. Are you trying to roll your own
"named-xfer"? Why?
If you're trying to develop some sort of "zone browser" tool using Perl, why not
just use the Net::DNS module and ditch "dig" completely? That's what I do. Then
you can output the zone data any way you want.
- kevin
Jobe Bittman wrote:
> Yes. I don't like the ttls on every line either because I don't want to
> update my perl code for parsing master files. I manned dig but I dont get
> how the +<query-option> works. I can do a pfmin which I assumed was just a
> combination of some of the other query-options. But dig with +Header =no
> doesn't appear to affect the output of my dig.
>
> This is the output im shooting for:
> $TTL 86400
> $ORIGIN domain.com.
> @ IN SOA @ hostmaster.dnsserver.net. (
> 2001113003 ; serial (YYYYMMDDn)
> 108000 ; refresh
> 3600 ; retry
> 604800 ; expire
> 86400 ; minimum
> )
>
> IN NS ns1.tns.net.
> IN NS ns2.tns.net.
> IN MX 0 mail.domain.com.
> IN MX 10 mail.dnsserver.net.
> IN MX 20 mail2.dnsserver.net.
> IN A 1.1.1.1
> localhost IN A 127.0.0.1
> www IN CNAME @
> ftp IN CNAME @
> mail IN A 1.1.1.1
>
> If my format or times suck, please tell me.
>
> At 11:23 PM 12/3/2001 +0000, Barry Margolin wrote:
> >In article <9uh11j$9p2 at pub3.rc.vix.com>, Jobe Bittman <jobe at tns.net> wrote:
> > >Are there any tools out there for turning a domain transfer into a name
> > >record? I cobbled together a little perl script to do this, but it only
> > >deals with a few records types. I was hoping there was a robust tool out
> > >there to do this sort of thing.
> >
> >The output of "dig axfr" is in the same format as a DB file, so you
> >shouldn't need to do much. The only problem is that it shows the SOA
> >record twice (at the beginning and end), so you should remove one of them
> >(I'm not sure this is actually *required* -- they should be identical, so
> >BIND may allow them both).
> >
> >--
> >Barry Margolin, barmar at genuity.net
> >Genuity, Woburn, MA
> >*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
> >Please DON'T copy followups to me -- I'll assume it wasn't posted to the
> >group.
More information about the bind-users
mailing list