Commit | Line | Data |
---|---|---|
b4588d5c GP |
1 | .TH axfr-get 8 |
2 | ||
3 | .SH NAME | |
4 | axfr-get \- a DNS zone-transfer client. | |
5 | ||
6 | It sends a zone-transfer request | |
7 | in DNS-over-TCP format to descriptor 7, | |
8 | reads the results from descriptor 6, | |
9 | and saves the results in a file. | |
10 | ||
11 | .SH SYNOPSIS | |
12 | Normally | |
13 | .B axfr-get | |
14 | is run under | |
15 | .BR tcpclient (1), | |
16 | which sets up descriptors 6 and 7 as a TCP connection to a remote host. | |
17 | ||
18 | .B axfr-get | |
19 | .I z | |
20 | .I fn | |
21 | .I fn.tmp | |
22 | ||
23 | .SH DESCRIPTION | |
24 | .B axfr-get | |
25 | performs a zone transfer for domain | |
26 | .IR z . | |
27 | It writes the results to | |
28 | .I fn.tmp | |
29 | in a format that can be used as input to | |
30 | .BR tinydns-data (8). | |
31 | If the zone transfer completes successfully, | |
32 | .B axfr-get | |
33 | atomically renames | |
34 | .I fn.tmp | |
35 | as | |
36 | .IR fn . | |
37 | ||
38 | .I fn.tmp | |
39 | and | |
40 | .I fn | |
41 | must be on the same filesystem. | |
42 | ||
43 | .B axfr-get | |
44 | writes the zone serial number as a comment at the top of | |
45 | .IR fn.tmp . | |
46 | It skips the zone transfer, | |
47 | leaving | |
48 | .I fn | |
49 | alone, | |
50 | if | |
51 | .I fn | |
52 | already exists, | |
53 | ||
54 | .I fn | |
55 | has a serial number | |
56 | matching the zone serial number, | |
57 | and both serial numbers are nonzero. | |
58 | ||
59 | Zone transfers often include duplicate records. | |
60 | You should feed the | |
61 | .B axfr-get | |
62 | results through | |
63 | sort -u. | |
64 | ||
65 | .B axfr-get | |
66 | discards all records outside the domain | |
67 | .IR z . | |
68 | It accepts records in child zones, | |
69 | but it marks all child zones as non-authoritative, so | |
70 | .BR tinydns (8) | |
71 | will not report those records except as glue. | |
72 | If you plan to merge the | |
73 | .B axfr-get | |
74 | results | |
75 | for a domain and a child of the same domain, | |
76 | creating a file authoritative for both zones, | |
77 | make sure to eliminate records in the first output | |
78 | that are within the child zone. | |
79 | ||
80 | .B axfr-get | |
81 | will accept arbitrarily large zone transfers. | |
82 | To limit the maximum file size to 1 megabyte, | |
83 | run | |
84 | .B axfr-get | |
85 | under | |
86 | .BR softlimit | |
87 | \-f 1048576. | |
88 | ||
89 | .SH Compatibility notes | |
90 | ||
91 | .B axfr-get | |
92 | handles | |
93 | BIND's RFC-1034-violating multiple-answers zone-transfer format. | |
94 | ||
95 | .B axfr-get | |
96 | does not precisely simulate BIND's handling of | |
97 | .IR *.dom . | |
98 | Under BIND, records for | |
99 | .I *.dom | |
100 | do not apply to | |
101 | .I y.dom | |
102 | or | |
103 | .I anything.y.dom | |
104 | if there is a normal record for | |
105 | .IR x.y.dom . | |
106 | With | |
107 | .B axfr-get | |
108 | and | |
109 | .BR tinydns (8), | |
110 | the records apply to | |
111 | .I y.dom | |
112 | and | |
113 | .I anything.y.dom | |
114 | except | |
115 | .IR x.y.dom . | |
116 | ||
117 | .B axfr-get | |
118 | does not precisely simulate BIND's handling of multiple IP addresses | |
119 | for a single name. | |
120 | When there are more than 8 addresses, | |
121 | .BR tinydns (8) | |
122 | selects a random set of 8 for each query. | |
123 | ||
124 | .SH SEE ALSO | |
125 | axfrdns(8), | |
126 | tinydns(8), | |
127 | tinydns-data(8), | |
128 | tcpclient(1), | |
129 | softlimit(8) | |
130 | http://cr.yp.to/djbdns.html |