注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

天高云淡的博客

A bad beginning makes a bad ending.

 
 
 

日志

 
 

MyDNS 1.0.0 reference manual (3)  

2010-05-18 20:59:06|  分类: DNS |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

5. Utilities

MyDNS includes several helpful utilities.

All utilities support the `--host', `--database',`--user', and `--password' options.

5.1 mydnscheck

The `mydnscheck' program scans one more more zones and reports onsyntax and consistency problems in the zone data. When used withoutany zone arguments, `mydnscheck' checks all zones by default.

`mydnscheck' outputs lines of tab-delimited data. This is so that it willhopefully be easier for experienced users to write scripts to automate fixups,in the event that they have created a new database that has many problems. Eachline contains seven fields:

  1. A brief, human-readable string describing the error found.

  2. The zone ID, or `-' if no zone ID is applicable.

  3. The resource record ID, or `-' if no resource record ID is applicable.

  4. The name, or `-' if no name is applicable.

  5. The ttl (time-to-live) value, or `-' if no ttl is applicable.

  6. The resource record type, or `-' if no type is applicable.

  7. The data value, or `-' if no data value is applicable.

The most useful way for an administrator to use `mydnscheck' is withoutany arguments (indicating a scan of all zones) and with the databaseconsistency check option enabled. This will perform a thorough analysis ofyour database. To perform this type of check, you would run:

 
# mydnscheck --consistency

You can also run `mydnscheck' on a single zone only. This might beuseful if invoked from a CGI script, to offer customers or clients the abilityto check their zone:

 
$ mydnscheck -uUSER -pPASS example.com

For an explanation of all available options, please see the `mydnscheck'(8)man page.

5.2 mydnsexport

The `mydnsexport' program outputs zone data in various formats understoodby DNS servers other than MyDNS.

By default, `mydnsexport' exports a single zone specified on the commandline in BIND format. The following command would output the example.comzone in BIND zone file format:

 
# mydnsexport example.com

`mydnsexport' can also output tinydns-data style data files, as used bythe tinydns name server, by specifying the `-t, --tinydns-data'option. If this output format is specified, and no zone names are provided onthe command line, `mydnsexport' will output all zones.

For an explanation of all available options, please see the`mydnsexport'(8) man page.

5.3 mydnsimport

The `mydnsimport' program can be used to import data into your MyDNSdatabase from external sources. This is the simplest way to seed yourdatabase when migrating from another name server to MyDNS.

The only import option supported at this time is the `-a, --axfr'option. Pretty much every name server on the market supports DNS-basedzone transfers via AXFR. Make sure your MyDNS server haspermission to request a zone transfer for the zone you wish to import,then specify the host name and zone name with the `--axfr' option.

If you want to test permissions, you can use the `dig' command, like:

 
# dig @bind.example.com axfr example.com

Let's say you have a BIND server located at bind.example.com andyou are going to get rid of it and switch to MyDNS. Great! You want toimport the zones example.com and example.net, as well asthe PTR records from 1.168.192.in-addr.arpa. You would issuethe following commands:

 
# mydnsimport --axfr=bind.example.com example.com example.net
# mydnsimport --axfr=bind.example.com 1.168.192.in-addr.arpa

For an explanation of all available options, please see the`mydnsimport(8)' man page.

A. Troubleshooting

Of the problems you may encounter while running MyDNS, the vast majority willbe caused by inappropriate data in your tables. MyDNS does not know whatyour intentions are, and will serve the data as you have specified it. Thebest way to make sure your data seems reasonable is to run the provided datavalidation utility. (See section 5.1 mydnscheck.)If you give the `--enable-debug' option to the `configure' script,MyDNS will be compiled with built-in debug messages. You can then run MyDNSwith the `-d, --debug' flag, and it will output copious amounts ofdebugging information. If you are trying to debug, do not run MyDNS as adaemon, as the debugging information will not be output.

B. Configuration

The `mydns.conf' file has a simple, familiar format. It consistsof lines that may contain variables and values, in the format

 
variable = value

Blank lines are allowed. The `#' character begins comments, whichare ignored.

The `--dump-config' option of the mydns program will outputall possible variables in `mydns.conf' format. (See section 2.5 Creating `mydns.conf'.)

Boolean values can be `yes', `no', `1', `0', `on', or `off'.

B.1 Database configuration

db-host
(string) The hostname where your database server is located. May be overridden by the`-h' (`--host') command-line option.

db-user
(string) The username to provide to the database server during authentication. May beoverridden by the `-u' (`--user') command-line option.

db-password
(string) The password to provide to the database server during authentication. May beoverridden by the `-p' (`--password') command-line option.

database
(string) The name of the database containing DNS data.

B.2 Name daemon configuration

user
(string) Run with the permissions of this user.

group
(string) Run with the permissions of this group.

listen
(string) Listen and accept requests on this address only. If this is `*',the server will accept connections on all addresses. This must be an IP addressin numbers-and-dots format, or `*'. Multiple addresses may be specified,as a comma-delimited list of addresses or on separate `listen' lines. Tospecify a port other than port 53, append `:port' to the address.

no-listen
(string) Do not listen on this address. This must be an IP addressin numbers-and-dots format, or `*'. Multiple addresses may be specified,as a comma-delimited list of addresses or on separate `no-listen' lines. Tospecify a port other than port 53, append `:port' to the address. Thisoption may be used to easily tell MyDNS not to listen on the address `127.0.0.1',on which you are running a recursive name server.

B.3 Cache configuration

zone-cache-size
(integer) The number of items stored in the DNS server's internal zone data cache.Set this to `0' to disable the zone data cache entirely. (See section 4.1 Caching.)

zone-cache-expire
(integer) Number of seconds after which cached items expire. If this is `0', thezone data cache is not used. The TTL value for any RR may override this value if it isa shorter amount of time. (See section 4.1 Caching.)

reply-cache-size
(integer) The number of items stored in the DNS server's internal reply cache.Set this to `0' to disable the reply cache entirely. (See section 4.1 Caching.)

reply-cache-expire
(integer) Number of seconds after which cached replies expire. If this is `0', thereply cache is not used. (See section 4.1 Caching.)

B.4 Miscellaneous configuration options.

log
(string) The name daemon should log via the syslog facility specified,which may be `LOG_DAEMON' or any of `LOG_LOCAL0' through`LOG_LOCAL7'. If the argument is `stderr' or `stdout',program output will go to that stream only. If the argument is afilename, program output will go to that file.

pidfile
(string) The mydns program will write its PID to this file on startup.

timeout
(integer) Number of seconds after which queries should time out.

multicpu
(integer) Number of processors in your system.

allow-axfr
(boolean) Should DNS-based zone transfers be enabled?

allow-tcp
(boolean) Should TCP queries be allowed? Use of this option is usuallynot recommended. However, TCP queries should be enabled if you think yourserver will be serving out answers larger than 512 bytes.

ignore-minimum
(boolean) Should MyDNS ignore the minimum TTL specified in the SOArecord for each zone?

soa-table
(string) Name of the table containing SOA records.

rr-table
(string) Name of the table containing resource record data.

soa-where
(string) An additional SQL `WHERE' clause to use when retrievingrecords from the soa table (see section 3.1 The `soa' table).

rr-where
(string) An additional SQL `WHERE' clause to use when retrievingrecords from the rr table (see section 3.2 The `rr' table).

recursive
(string) Forward recursive requests to a DNS server at this addressand return its response to the client.

C. References

RFC 1034
Mockapetris, P., "Domain Names - Concepts and Facilities", STD 13, RFC 1034, November 1987.

RFC 1035
Mockapetris, P., "Domain Names - Implementation and Specification", STD 13, RFC 1035, November 1987.

RFC 1537
Beertema, P., "Common DNS Data File Configuration Errors", RFC 1537, October 1993.

RFC 2317
Eidnes, H., et. al., "Classless IN-ADDR.ARPA delegation", BCP 20, RFC 1537, March 1998.

RFC 2782
Gulbrandsen, et al., "A DNS RR for specifying the location of services (DNS SRV)", RFC 2782, February 2000.

D. GNU Free Documentation License

Version 1.1, March 2000

 
Copyright ? 2000 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307, USA

Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

  1. PREAMBLE

    The purpose of this License is to make a manual, textbook, or otherwritten document free in the sense of freedom: to assure everyonethe effective freedom to copy and redistribute it, with or withoutmodifying it, either commercially or noncommercially. Secondarily,this License preserves for the author and publisher a way to getcredit for their work, while not being considered responsible formodifications made by others.

    This License is a kind of "copyleft", which means that derivativeworks of the document must themselves be free in the same sense. Itcomplements the GNU General Public License, which is a copyleftlicense designed for free software.

    We have designed this License in order to use it for manuals for freesoftware, because free software needs free documentation: a freeprogram should come with manuals providing the same freedoms that thesoftware does. But this License is not limited to software manuals;it can be used for any textual work, regardless of subject matter orwhether it is published as a printed book. We recommend this Licenseprincipally for works whose purpose is instruction or reference.

  2. APPLICABILITY AND DEFINITIONS

    This License applies to any manual or other work that contains anotice placed by the copyright holder saying it can be distributedunder the terms of this License. The "Document", below, refers to anysuch manual or work. Any member of the public is a licensee, and isaddressed as "you".

    A "Modified Version" of the Document means any work containing theDocument or a portion of it, either copied verbatim, or withmodifications and/or translated into another language.

    A "Secondary Section" is a named appendix or a front-matter section ofthe Document that deals exclusively with the relationship of thepublishers or authors of the Document to the Document's overall subject(or to related matters) and contains nothing that could fall directlywithin that overall subject. (For example, if the Document is in part atextbook of mathematics, a Secondary Section may not explain anymathematics.) The relationship could be a matter of historicalconnection with the subject or with related matters, or of legal,commercial, philosophical, ethical or political position regardingthem.

    The "Invariant Sections" are certain Secondary Sections whose titlesare designated, as being those of Invariant Sections, in the noticethat says that the Document is released under this License.

    The "Cover Texts" are certain short passages of text that are listed,as Front-Cover Texts or Back-Cover Texts, in the notice that says thatthe Document is released under this License.

    A "Transparent" copy of the Document means a machine-readable copy,represented in a format whose specification is available to thegeneral public, whose contents can be viewed and edited directly andstraightforwardly with generic text editors or (for images composed ofpixels) generic paint programs or (for drawings) some widely availabledrawing editor, and that is suitable for input to text formatters orfor automatic translation to a variety of formats suitable for inputto text formatters. A copy made in an otherwise Transparent fileformat whose markup has been designed to thwart or discouragesubsequent modification by readers is not Transparent. A copy that isnot "Transparent" is called "Opaque".

    Examples of suitable formats for Transparent copies include plainASCII without markup, Texinfo input format, LaTeX input format,SGML or XML using a publicly availableDTD, and standard-conforming simple HTML designedfor human modification. Opaque formats include PostScript,PDF, proprietary formats that can be read and edited only byproprietary word processors, SGML or XML for whichthe DTD and/or processing tools are not generally available,and the machine-generated HTML produced by some wordprocessors for output purposes only.

    The "Title Page" means, for a printed book, the title page itself,plus such following pages as are needed to hold, legibly, the materialthis License requires to appear in the title page. For works informats which do not have any title page as such, "Title Page" meansthe text near the most prominent appearance of the work's title,preceding the beginning of the body of the text.

  3. VERBATIM COPYING

    You may copy and distribute the Document in any medium, eithercommercially or noncommercially, provided that this License, thecopyright notices, and the license notice saying this License appliesto the Document are reproduced in all copies, and that you add no otherconditions whatsoever to those of this License. You may not usetechnical measures to obstruct or control the reading or furthercopying of the copies you make or distribute. However, you may acceptcompensation in exchange for copies. If you distribute a large enoughnumber of copies you must also follow the conditions in section 3.

    You may also lend copies, under the same conditions stated above, andyou may publicly display copies.

  4. COPYING IN QUANTITY

    If you publish printed copies of the Document numbering more than 100,and the Document's license notice requires Cover Texts, you must enclosethe copies in covers that carry, clearly and legibly, all these CoverTexts: Front-Cover Texts on the front cover, and Back-Cover Texts onthe back cover. Both covers must also clearly and legibly identifyyou as the publisher of these copies. The front cover must presentthe full title with all words of the title equally prominent andvisible. You may add other material on the covers in addition.Copying with changes limited to the covers, as long as they preservethe title of the Document and satisfy these conditions, can be treatedas verbatim copying in other respects.

    If the required texts for either cover are too voluminous to fitlegibly, you should put the first ones listed (as many as fitreasonably) on the actual cover, and continue the rest onto adjacentpages.

    If you publish or distribute Opaque copies of the Document numberingmore than 100, you must either include a machine-readable Transparentcopy along with each Opaque copy, or state in or with each Opaque copya publicly-accessible computer-network location containing a completeTransparent copy of the Document, free of added material, which thegeneral network-using public has access to download anonymously at nocharge using public-standard network protocols. If you use the latteroption, you must take reasonably prudent steps, when you begindistribution of Opaque copies in quantity, to ensure that thisTransparent copy will remain thus accessible at the stated locationuntil at least one year after the last time you distribute an Opaquecopy (directly or through your agents or retailers) of that edition tothe public.

    It is requested, but not required, that you contact the authors of theDocument well before redistributing any large number of copies, to givethem a chance to provide you with an updated version of the Document.

  5. MODIFICATIONS

    You may copy and distribute a Modified Version of the Document underthe conditions of sections 2 and 3 above, provided that you releasethe Modified Version under precisely this License, with the ModifiedVersion filling the role of the Document, thus licensing distributionand modification of the Modified Version to whoever possesses a copyof it. In addition, you must do these things in the Modified Version:

    1. Use in the Title Page (and on the covers, if any) a title distinctfrom that of the Document, and from those of previous versions(which should, if there were any, be listed in the History sectionof the Document). You may use the same title as a previous versionif the original publisher of that version gives permission.

    2. List on the Title Page, as authors, one or more persons or entitiesresponsible for authorship of the modifications in the ModifiedVersion, together with at least five of the principal authors of theDocument (all of its principal authors, if it has less than five).

    3. State on the Title page the name of the publisher of theModified Version, as the publisher.

    4. Preserve all the copyright notices of the Document.

    5. Add an appropriate copyright notice for your modificationsadjacent to the other copyright notices.

    6. Include, immediately after the copyright notices, a license noticegiving the public permission to use the Modified Version under theterms of this License, in the form shown in the Addendum below.

    7. Preserve in that license notice the full lists of Invariant Sectionsand required Cover Texts given in the Document's license notice.

    8. Include an unaltered copy of this License.

    9. Preserve the section entitled "History", and its title, and add toit an item stating at least the title, year, new authors, andpublisher of the Modified Version as given on the Title Page. Ifthere is no section entitled "History" in the Document, create onestating the title, year, authors, and publisher of the Document asgiven on its Title Page, then add an item describing the ModifiedVersion as stated in the previous sentence.

    10. Preserve the network location, if any, given in the Document forpublic access to a Transparent copy of the Document, and likewisethe network locations given in the Document for previous versionsit was based on. These may be placed in the "History" section.You may omit a network location for a work that was published atleast four years before the Document itself, or if the originalpublisher of the version it refers to gives permission.

    11. In any section entitled "Acknowledgments" or "Dedications",preserve the section's title, and preserve in the section all thesubstance and tone of each of the contributor acknowledgmentsand/or dedications given therein.

    12. Preserve all the Invariant Sections of the Document,unaltered in their text and in their titles. Section numbersor the equivalent are not considered part of the section titles.

    13. Delete any section entitled "Endorsements". Such a sectionmay not be included in the Modified Version.

    14. Do not retitle any existing section as "Endorsements"or to conflict in title with any Invariant Section.

    If the Modified Version includes new front-matter sections orappendices that qualify as Secondary Sections and contain no materialcopied from the Document, you may at your option designate some or allof these sections as invariant. To do this, add their titles to thelist of Invariant Sections in the Modified Version's license notice.These titles must be distinct from any other section titles.

    You may add a section entitled "Endorsements", provided it containsnothing but endorsements of your Modified Version by variousparties--for example, statements of peer review or that the text hasbeen approved by an organization as the authoritative definition of astandard.

    You may add a passage of up to five words as a Front-Cover Text, and apassage of up to 25 words as a Back-Cover Text, to the end of the listof Cover Texts in the Modified Version. Only one passage ofFront-Cover Text and one of Back-Cover Text may be added by (orthrough arrangements made by) any one entity. If the Document alreadyincludes a cover text for the same cover, previously added by you orby arrangement made by the same entity you are acting on behalf of,you may not add another; but you may replace the old one, on explicitpermission from the previous publisher that added the old one.

    The author(s) and publisher(s) of the Document do not by this Licensegive permission to use their names for publicity for or to assert orimply endorsement of any Modified Version.

  6. COMBINING DOCUMENTS

    You may combine the Document with other documents released under thisLicense, under the terms defined in section 4 above for modifiedversions, provided that you include in the combination all of theInvariant Sections of all of the original documents, unmodified, andlist them all as Invariant Sections of your combined work in itslicense notice.

    The combined work need only contain one copy of this License, andmultiple identical Invariant Sections may be replaced with a singlecopy. If there are multiple Invariant Sections with the same name butdifferent contents, make the title of each such section unique byadding at the end of it, in parentheses, the name of the originalauthor or publisher of that section if known, or else a unique number.Make the same adjustment to the section titles in the list ofInvariant Sections in the license notice of the combined work.

    In the combination, you must combine any sections entitled "History"in the various original documents, forming one section entitled"History"; likewise combine any sections entitled "Acknowledgments",and any sections entitled "Dedications". You must delete all sectionsentitled "Endorsements."

  7. COLLECTIONS OF DOCUMENTS

    You may make a collection consisting of the Document and other documentsreleased under this License, and replace the individual copies of thisLicense in the various documents with a single copy that is included inthe collection, provided that you follow the rules of this License forverbatim copying of each of the documents in all other respects.

    You may extract a single document from such a collection, and distributeit individually under this License, provided you insert a copy of thisLicense into the extracted document, and follow this License in allother respects regarding verbatim copying of that document.

  8. AGGREGATION WITH INDEPENDENT WORKS

    A compilation of the Document or its derivatives with other separateand independent documents or works, in or on a volume of a storage ordistribution medium, does not as a whole count as a Modified Versionof the Document, provided no compilation copyright is claimed for thecompilation. Such a compilation is called an "aggregate", and thisLicense does not apply to the other self-contained works thus compiledwith the Document, on account of their being thus compiled, if theyare not themselves derivative works of the Document.

    If the Cover Text requirement of section 3 is applicable to thesecopies of the Document, then if the Document is less than one quarterof the entire aggregate, the Document's Cover Texts may be placed oncovers that surround only the Document within the aggregate.Otherwise they must appear on covers around the whole aggregate.

  9. TRANSLATION

    Translation is considered a kind of modification, so you maydistribute translations of the Document under the terms of section 4.Replacing Invariant Sections with translations requires specialpermission from their copyright holders, but you may includetranslations of some or all Invariant Sections in addition to theoriginal versions of these Invariant Sections. You may include atranslation of this License provided that you also include theoriginal English version of this License. In case of a disagreementbetween the translation and the original English version of thisLicense, the original English version will prevail.

  10. TERMINATION

    You may not copy, modify, sublicense, or distribute the Document exceptas expressly provided for under this License. Any other attempt tocopy, modify, sublicense or distribute the Document is void, and willautomatically terminate your rights under this License. However,parties who have received copies, or rights, from you under thisLicense will not have their licenses terminated so long as suchparties remain in full compliance.

  11. FUTURE REVISIONS OF THIS LICENSE

    The Free Software Foundation may publish new, revised versionsof the GNU Free Documentation License from time to time. Such newversions will be similar in spirit to the present version, but maydiffer in detail to address new problems or concerns. Seehttp://www.gnu.org/copyleft/.

    Each version of the License is given a distinguishing version number.If the Document specifies that a particular numbered version of thisLicense "or any later version" applies to it, you have the option offollowing the terms and conditions either of that specified version orof any later version that has been published (not as a draft) by theFree Software Foundation. If the Document does not specify a versionnumber of this License, you may choose any version ever published (notas a draft) by the Free Software Foundation.






  评论这张
 
阅读(1567)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017