<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        
        
        
        <link rel="shortcut icon" href="../img/favicon.ico">

        <title>Introduction</title>

        <link href="../css/bootstrap-custom.min.css" rel="stylesheet">
        <link href="../css/font-awesome-4.0.3.css" rel="stylesheet">
        <link href="../css/prettify-1.0.css" rel="stylesheet">
        <link href="../css/base.css" rel="stylesheet">

        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
            <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
            <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->

        
    </head>

    <body>

        <div class="navbar navbar-default navbar-fixed-top" role="navigation">
    <div class="container">

        <!-- Collapsed navigation -->
        <div class="navbar-header">
            <!-- Expander button -->
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>

            <!-- Main title -->
            <a class="navbar-brand" href="..">PowerDNS</a>
        </div>

        <!-- Expanded navigation -->
        <div class="navbar-collapse collapse">
            <!-- Main navigation -->
            <ul class="nav navbar-nav">
            
            
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">PowerDNS Server <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                    
                        <li >
                            <a href="..">Introduction</a>
                        </li>
                    
                        <li >
                            <a href="../changelog/">Changelogs</a>
                        </li>
                    
                        <li >
                            <a href="../types/">Supported DNS Record Types</a>
                        </li>
                    
                        <li >
                            <a href="../common/logging/">Logging and Performance Monitoring</a>
                        </li>
                    
                        <li >
                            <a href="../common/security/">Security settings & considerations</a>
                        </li>
                    
                        <li >
                            <a href="../common/support/">Getting support</a>
                        </li>
                    
                        <li >
                            <a href="../httpapi/README/">HTTP API - Introduction</a>
                        </li>
                    
                        <li >
                            <a href="../httpapi/api_spec/">HTTP API - API Specification</a>
                        </li>
                    
                        <li >
                            <a href="../end-of-life/">End of life statements</a>
                        </li>
                    
                    </ul>
                </li>
            
            
            
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Authoritative <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                    
                        <li >
                            <a href="../authoritative/">Introduction</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/installation/">Installing PowerDNS</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/running/">Running PowerDNS</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/upgrading/">Upgrade Notes</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/modes-of-operation/">Native, Master and Slave Operation</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/dnssec/">DNSSEC with PowerDNS</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/domainmetadata/">Domain Metadata</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/dnsupdate/">Dynamic DNS Update</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/tsig/">Using TSIG for AXFR</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/howtos/">Various How To's</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/performance/">Performance Tuning and Monitoring</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/migration/">Migrating to PowerDNS</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/recursion/">Recursion with the Authoritative Server</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/settings/">List of Settings</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/zone2json.1/">Manpage: zone2json.1</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/zone2ldap.1/">Manpage: zone2ldap.1</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/zone2sql.1/">Manpage: zone2sql.1</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/pdns_control.1/">Manpage: pdns_control.1</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/pdnsutil.1/">Manpage: pdnsutil.1</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/pdns_server.1/">Manpage: pdns_server.1</a>
                        </li>
                    
                    </ul>
                </li>
            
            
            
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Authoritative Backends <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                    
                        <li >
                            <a href="../authoritative/backend-bind/">BIND</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/backend-generic-sql/">Generic SQL Backends</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/backend-generic-mysql/">Generic MySQL</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/backend-generic-odbc/">Generic ODBC</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/backend-generic-oracle/">Generic Oracle</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/backend-generic-postgresql/">Generic PostgreSQL</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/backend-generic-sqlite/">Generic SQLite3</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/backend-geoip/">GeoIP</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/backend-mydns/">MyDNS</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/backend-ldap/">LDAP</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/backend-lua/">Lua</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/backend-opendbx/">OpenDBX</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/backend-oracle/">Oracle</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/backend-pipe/">Pipe</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/backend-random/">Random</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/backend-remote/">Remote</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/backend-tinydns/">TinyDNS</a>
                        </li>
                    
                        <li >
                            <a href="../authoritative/backend-deprecated/">Deprecated Backends</a>
                        </li>
                    
                    </ul>
                </li>
            
            
            
                <li class="dropdown active">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Recursor <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                    
                        <li class="active">
                            <a href="./">Introduction</a>
                        </li>
                    
                        <li >
                            <a href="upgrading/">Upgrade Notes</a>
                        </li>
                    
                        <li >
                            <a href="security/">Security of the Recursor</a>
                        </li>
                    
                        <li >
                            <a href="dnssec/">DNSSEC in the Recursor</a>
                        </li>
                    
                        <li >
                            <a href="stats/">Recursor Statistics</a>
                        </li>
                    
                        <li >
                            <a href="running/">Controlling & Querying</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/pdns_recursor.1/">Manpage: pdns_recursor.1</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/rec_control.1/">Manpage: rec_control.1</a>
                        </li>
                    
                        <li >
                            <a href="performance/">Performance Tuning</a>
                        </li>
                    
                        <li >
                            <a href="scripting/">Scripting</a>
                        </li>
                    
                        <li >
                            <a href="dns64/">DNS64 support</a>
                        </li>
                    
                        <li >
                            <a href="internals/">Internals</a>
                        </li>
                    
                        <li >
                            <a href="settings/">List of Settings</a>
                        </li>
                    
                    </ul>
                </li>
            
            
            
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Security <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                    
                        <li >
                            <a href="../security/">Security Policy</a>
                        </li>
                    
                        <li >
                            <a href="../security/powerdns-advisory-2016-05/">Advisory 2016-05</a>
                        </li>
                    
                        <li >
                            <a href="../security/powerdns-advisory-2016-04/">Advisory 2016-04</a>
                        </li>
                    
                        <li >
                            <a href="../security/powerdns-advisory-2016-03/">Advisory 2016-03</a>
                        </li>
                    
                        <li >
                            <a href="../security/powerdns-advisory-2016-02/">Advisory 2016-02</a>
                        </li>
                    
                        <li >
                            <a href="../security/powerdns-advisory-2016-01/">Advisory 2016-01</a>
                        </li>
                    
                        <li >
                            <a href="../security/powerdns-advisory-2015-03/">Advisory 2015-03</a>
                        </li>
                    
                        <li >
                            <a href="../security/powerdns-advisory-2015-02/">Advisory 2015-02</a>
                        </li>
                    
                        <li >
                            <a href="../security/powerdns-advisory-2015-01/">Advisory 2015-01</a>
                        </li>
                    
                        <li >
                            <a href="../security/powerdns-advisory-2014-02/">Advisory 2014-02</a>
                        </li>
                    
                        <li >
                            <a href="../security/powerdns-advisory-2014-01/">Advisory 2014-01</a>
                        </li>
                    
                        <li >
                            <a href="../security/powerdns-advisory-2012-01/">Advisory 2012-01</a>
                        </li>
                    
                        <li >
                            <a href="../security/powerdns-advisory-2010-02/">Advisory 2010-02</a>
                        </li>
                    
                        <li >
                            <a href="../security/powerdns-advisory-2010-01/">Advisory 2010-01</a>
                        </li>
                    
                        <li >
                            <a href="../security/powerdns-advisory-2008-03/">Advisory 2008-03</a>
                        </li>
                    
                        <li >
                            <a href="../security/powerdns-advisory-2008-02/">Advisory 2008-02</a>
                        </li>
                    
                        <li >
                            <a href="../security/powerdns-advisory-2008-01/">Advisory 2008-01</a>
                        </li>
                    
                        <li >
                            <a href="../security/powerdns-advisory-2006-02/">Advisory 2006-02</a>
                        </li>
                    
                        <li >
                            <a href="../security/powerdns-advisory-2006-01/">Advisory 2006-01</a>
                        </li>
                    
                    </ul>
                </li>
            
            
            
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Tools and Appendices <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                    
                        <li >
                            <a href="../appendix/backend-writers-guide/">Backend Writer's Guide</a>
                        </li>
                    
                        <li >
                            <a href="../appendix/crypto-notes-export/">Cryptographic software and export control</a>
                        </li>
                    
                        <li >
                            <a href="../appendix/documentation/">Documentation details</a>
                        </li>
                    
                        <li >
                            <a href="../appendix/compiling-powerdns/">Compiling PowerDNS</a>
                        </li>
                    
                        <li >
                            <a href="../tools/analysis/">DNS Analysis Tools</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/calidns.1/">Manpage: calidns.1</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/dnsbulktest.1/">Manpage: dnsbulktest.1</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/dnsgram.1/">Manpage: dnsgram.1</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/dnsreplay.1/">Manpage: dnsreplay.1</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/dnsscan.1/">Manpage: dnsscan.1</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/dnsscope.1/">Manpage: dnsscope.1</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/dnstcpbench.1/">Manpage: dnstcpbench.1</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/dnswasher.1/">Manpage: dnswasher.1</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/ixplore.1/">Manpage: ixplore.1</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/pdns_notify.1/">Manpage: pdns_notify.1</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/nproxy.1/">Manpage: nproxy.1</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/nsec3dig.1/">Manpage: nsec3dig.1</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/saxfr.1/">Manpage: saxfr.1</a>
                        </li>
                    
                        <li >
                            <a href="../manpages/sdig.1/">Manpage: sdig.1</a>
                        </li>
                    
                    </ul>
                </li>
            
            
            </ul>

            <!-- Search, Navigation and Repo links -->
            <ul class="nav navbar-nav navbar-right">
                
            </ul>
        </div>
    </div>
</div>

        <div class="container">
            <div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
    <ul class="nav bs-sidenav">
    
        <li class="main active"><a href="#powerdns-recursor">PowerDNS Recursor</a></li>
        
            <li><a href="#notable-features">Notable features:</a></li>
        
            <li><a href="#configuration">Configuration</a></li>
        
    
        <li class="main "><a href="#pdns_recursor-command-line">pdns_recursor command line</a></li>
        
    
    </ul>
</div></div>
            <div class="col-md-9" role="main">

<div class="alert alert-danger">This document is about PowerDNS 4.0. For other versions, please see the <a href="/">documentation index</a>.</div><br>

<h1 id="powerdns-recursor">PowerDNS Recursor</h1>
<p>The PowerDNS recursor is part of the source tarball of the main PowerDNS distribution, but it is released separately. It is known to power the resolving needs of over 150 million internet connections.</p>
<p>The documentation is only for the 4.0 series, users of older versions are urged to upgrade!</p>
<p><strong>Note</strong>: <a href="../recursor">Improved documentation</a> for the master version, the upcoming 4.1 release and the 4.0 is available.</p>
<h2 id="notable-features">Notable features:</h2>
<ul>
<li>Uses <a href="http://ds9a.nl/mtasker">MTasker</a></li>
<li>Can handle tens of thousands of concurrent questions. A quad Xeon 3GHz has been measured functioning very well at 400000 real life replayed packets per second.</li>
<li>Powered by a highly modern DNS packet parser that should be resistant against many forms of buffer overflows.</li>
<li>Best spoofing protection that we know about, involving both source port randomisation and spoofing detection.</li>
<li>Uses 'connected' UDP sockets which allow the recursor to react quickly to unreachable hosts or hosts for which the server is running, but the nameserver is down. This makes the recursor faster to respond in case of misconfigured domains, which are sadly very frequent.</li>
<li>Special support for FreeBSD, Linux and Solaris stateful multiplexing (kqueue, epoll, completion ports, /dev/poll).</li>
<li>Very fast, and contains innovative query-throttling code to save time talking to obsolete or broken nameservers.</li>
<li>Code is written linearly, sequentially, which means that there are no problems with 'query restart' or anything.</li>
<li>Relies heavily on Standard C++ Library infrastructure, which makes for little code.</li>
<li>Is very verbose in showing how recursion actually works, when enabled to do so with --verbose.</li>
<li>The algorithm is simple and quite nifty.</li>
</ul>
<p>The PowerDNS recursor is controlled and queried using the <code>rec_control</code> tool.</p>
<h2 id="configuration">Configuration</h2>
<p>At startup, the recursing nameserver reads the file <code>recursor.conf</code> from the configuration directory, often <code>/etc/powerdns</code> or <code>/usr/local/etc</code>. Each setting can appear on the command line, prefixed by '--', or in the configuration file. The command line overrides the configuration file.</p>
<p>A switch can be set to on simply by passing it, like '--daemon', and turned off explicitly by '--daemon=off' or '--daemon=no'.</p>
<p>All settings can be found <a href="settings/">here</a></p>
<h1 id="pdns_recursor-command-line"><code>pdns_recursor</code> command line</h1>
<p>All configuration settings from the previous section can also be passed on the command line, and will override the configuration file. In addition, the following options make sense on the command line:</p>
<ul>
<li>--config: Emit a default configuration file.</li>
<li>--help: Output all configuration settings and command line flags.</li>
</ul></div>
        </div>
        <div class="footer hidden-xs hidden-sm">
  <div class="container">
    <ul class="nav navbar-nav navbar-right footer-bar">
      
      <li>
          <a href="https://github.com/PowerDNS/pdns">
              
                  <i class="fa fa-github"></i>
              
              GitHub
          </a>
      </li>
      
      <li >
        <a rel="next" href="../authoritative/backend-deprecated/">
          <i class="fa fa-arrow-left"></i> Previous
        </a>
      </li>
      <li >
        <a rel="prev" href="upgrading/">
          Next <i class="fa fa-arrow-right"></i>
        </a>
      </li>
    </ul>
  </div>
</div>
        

        <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
        <script src="../js/bootstrap-3.0.3.min.js"></script>
        <script src="../js/prettify-1.0.min.js"></script>
        <script src="../js/base.js"></script>
    </body>
</html>