pdnsd-ctl.8 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. .\" This manpage has been automatically generated by docbook2man-spec
  2. .\" from a DocBook document. docbook2man-spec can be found at:
  3. .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
  4. .\" Please send any bug reports, improvements, comments, patches,
  5. .\" etc. to Steve Cheng <steve@ggi-project.org>.
  6. .\" This manpage has been edited manually by Paul A. Rombouts.
  7. .TH "PDNSD\-CTL" "8" "Sep 2008" "pdnsd 1.2.9b-par" ""
  8. .SH NAME
  9. \fBpdnsd\-ctl\fP \- controls pdnsd
  10. .SH SYNOPSIS
  11. .sp
  12. \fBpdnsd\-ctl\fP [\fB\-c\fP \fIcachedir\fP] [\fB\-q\fP] \fIcommand\fP [\fIarguments\fP]
  13. .SH "DESCRIPTION"
  14. .PP
  15. \fBpdnsd\-ctl\fP controls \fBpdnsd\fP, a proxy dns server with permanent caching.
  16. Note that the status control socket must be enabled (by specifying an option on
  17. the pdnsd command line or in the configuration file) before you can use
  18. \fBpdnsd\-ctl\fP.
  19. .PP
  20. .TP
  21. \fB\-c\fP \fIcachedir\fP
  22. Set the cache directory to \fIcachedir\fP (must match pdnsd setting).
  23. This is only necessary if the directory differs from the default specified
  24. at compile time.
  25. .TP
  26. \fB\-q\fP
  27. Be quiet unless output is specified by the command or something goes wrong.
  28. .SH "COMMANDS"
  29. .TP
  30. \fBhelp\fP\ \ \ [no arguments]
  31. Print a command summary.
  32. .TP
  33. \fBversion\fP\ [no arguments]
  34. Print version and license info.
  35. .TP
  36. \fBstatus\fP\ [no arguments]
  37. Print a description of pdnsd's cache status, thread status and configuration.
  38. Also shows which remote name servers are assumed to be available.
  39. .TP
  40. \fBserver\fP\ (\fIindex\fP|\fIlabel\fP) (\fBup\fP|\fBdown\fP|\fBretest\fP) [\fIdns1\fP[,\fIdns2\fP[,...]]]
  41. Set the status of the servers with the given index or label to up or down, or
  42. force a retest. The index is assigned in the order of definition in pdnsd.conf
  43. starting with 0. Use the status command to view the indexes. You can specify all
  44. instead of an index to perform the action for all servers registered with pdnsd.
  45. .IP
  46. An optional third argument can be given consisting of a list of IP addresses
  47. separated by commas or white-space characters. This list will replace the
  48. addresses of name servers used by pdnsd for the given server section. This
  49. feature is useful for run-time configuration of pdnsd with dynamic DNS data in
  50. scripts called by ppp or DHCP clients. The last argument may also be an empty
  51. string, which causes existing IP addresses to be removed and the corresponding
  52. server section to become inactive.
  53. .TP
  54. \fBrecord\fP\ \fIname\fP (\fBdelete\fP|\fBinvalidate\fP)
  55. Delete or invalidate the records of the given domain name if it is in the cache.
  56. Invalidation means that the records are marked as timed out, and will be
  57. reloaded if possible. For local records (i.e., records that were given in the
  58. config file using a rr section, records read from a hosts-style file and records
  59. added using pdnsd-ctl), invalidation has no effect. Deletion will work, though.
  60. .TP
  61. \fBsource\fP\ \fIfn\fP \fIowner\fP [\fIttl\fP] [(\fBon\fP|\fBoff\fP)] [\fBnoauth\fP]
  62. Load a hosts-style file. Works like using the pdnsd source configuration section.
  63. Owner and ttl are used as in the source section. ttl has a default
  64. of 900 (it does not need to be specified). The next to last argument corresponds
  65. to the serve_aliases option, and is off by default.
  66. \fBnoauth\fP is used to make the domains non-authoritative
  67. (this is similar to setting authrec=off in the config file,
  68. please consult the
  69. .BR pdnsd.conf (5)
  70. man page for what that means).
  71. fn is the name of the file, which must be readable by pdnsd.
  72. .TP
  73. \fBadd\fP\ \ \ \ \fBa\fP \fIaddr\fP \fIname\fP [\fIttl\fP] [\fBnoauth\fP]
  74. .TP
  75. \fBadd\fP\ \ \ \ \fBaaaa\fP \fIaddr\fP \fIname\fP [\fIttl\fP] [\fBnoauth\fP]
  76. .TP
  77. \fBadd\fP\ \ \ \ \fBptr\fP \fIhost\fP \fIname\fP [\fIttl\fP] [\fBnoauth\fP]
  78. .TP
  79. \fBadd\fP\ \ \ \ \fBcname\fP \fIhost\fP \fIname\fP [\fIttl\fP] [\fBnoauth\fP]
  80. .TP
  81. \fBadd\fP\ \ \ \ \fBmx\fP \fIhost\fP \fIname\fP \fIpref\fP [\fIttl\fP] [\fBnoauth\fP]
  82. Add a record of the given type to the pdnsd cache, replacing existing
  83. records for the same name and type. The 2nd argument corresponds
  84. to the value of the option in the rr section that is named like
  85. the first argument. The addr argument may be a list of IP addresses,
  86. separated by commas or white space.
  87. The ttl is optional, the default is 900 seconds.
  88. \fBnoauth\fP is used to make the domains non-authoritative
  89. (this is similar to setting authrec=off in the config file,
  90. please consult the
  91. .BR pdnsd.conf (5)
  92. man page for what that means).
  93. If you want no other record than the newly added in the cache, do
  94. \fBpdnsd\-ctl\fP\ \fBrecord\fP\ \fIname\fP\ \fBdelete\fP
  95. before adding records.
  96. .TP
  97. \fBneg\fP\ \ \ \ \fIname\fP [\fItype\fP] [\fIttl\fP]
  98. Add a negatively cached record to pdnsd's cache, replacing existing
  99. records for the same name and type. If no type is given, the whole
  100. domain is cached negatively. For negatively cached records, errors are
  101. immediately returned on a query, without querying other servers first.
  102. The ttl is optional, the default is 900 seconds.
  103. .TP
  104. \fBconfig\fP\ \fIfilename\fP
  105. Reload pdnsd's configuration file.
  106. .br
  107. The config file must be owned by the uid that pdnsd had when it was started,
  108. and be readable by pdnsd's run_as uid.
  109. If no file name is specified, the config file used at start-up is reloaded.
  110. Note that some configuration changes, like the port or IP address pdnsd listens on,
  111. cannot be made this way and you will receive an error message.
  112. In these cases, you will have to restart pdnsd instead.
  113. .TP
  114. \fBinclude\fP\ \fIfilename\fP
  115. Parse an include file.
  116. .br
  117. The include file may contain the same
  118. type of sections as a config file, expect for global and server
  119. sections, which are not allowed. This command can be used to add data
  120. to the cache without reconfiguring pdnsd.
  121. .TP
  122. \fBeval\fP\ \ \ \fIstring\fP
  123. Parse a string as if part of an include file.
  124. .br
  125. The string should hold one or more complete configuration sections,
  126. but no global and server sections, which are not allowed.
  127. If multiple strings are given, they will be joined using newline chars
  128. and parsed together.
  129. .TP
  130. \fBempty\-cache\fP\ [[+|-]\fIname\fP ...]
  131. Delete all entries in the cache matching include/exclude rules.
  132. .br
  133. If no arguments are provided, the cache is completely emptied,
  134. freeing all existing entries.
  135. Note that this also removes local records, as defined by the config file.
  136. To restore local records, run "pdnsd-ctl\ config" immediately afterwards.
  137. .br
  138. If one or more arguments are provided, these are interpreted as
  139. include/exclude names. If an argument starts with a '+' the name is to
  140. be included. If an argument starts with a '-' it is to be excluded.
  141. If an argument does not begin with '+' or '-', a '+' is assumed.
  142. If the domain name of a cache entry ends in one of the names in the
  143. list, the first match will determine what happens. If the matching name
  144. is to be included, the cache entry is deleted, otherwise it remains.
  145. If there are no matches, the default action is not to delete.
  146. .TP
  147. \fBdump\fP\ \ \ [\fIname\fP]
  148. Print information stored in the cache about \fIname\fP.
  149. If \fIname\fP begins with a dot and is not the root domain, information
  150. about the names in the cache ending in \fIname\fP (including \fIname\fP without
  151. the leading dot) will be printed.
  152. If \fIname\fP is not specified, information about all the names in the cache
  153. will be printed.
  154. .TP
  155. \fBlist\-rrtypes\fP [no arguments]
  156. List available rr types for the neg command. Note that those are only
  157. used for the neg command, not for add!
  158. .SH "BUGS"
  159. .PP
  160. If you pipe the output of \fBdump\fP command through an application that
  161. reads only part of the output and then blocks (such as more or less),
  162. pdnsd threads trying to add new entries to the cache will be suspended
  163. until the pipe is closed.
  164. It is preferable to capture the output in a file in such a case.
  165. .br
  166. Report any remaining bugs to the authors.
  167. .SH "AUTHORS"
  168. .PP
  169. Thomas Moestl
  170. .UR
  171. <tmoestl@gmx.net>
  172. .UE
  173. .br
  174. Paul A. Rombouts
  175. .UR
  176. <p.a.rombouts@home.nl>
  177. .UE
  178. (for versions 1.1.8b1\-par and later)
  179. .PP
  180. Last revised: 04 Sep 2008 by Paul A. Rombouts.
  181. .SH "SEE ALSO"
  182. .PP
  183. .BR pdnsd (8),
  184. .BR pdnsd.conf (5)