Bv9ARM.ch07.html revision 14a656f94b1fd0ababd84a772228dfa52276ba15
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt - Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC")
33d0a7767d53cb366039fd0ac4f63cf8a9c351b0Tinderbox User - Copyright (C) 2000-2003 Internet Software Consortium.
281ed127e3ed6c7e07792c19c3bc4562f71cfa90Tinderbox User - Permission to use, copy, modify, and/or distribute this software for any
281ed127e3ed6c7e07792c19c3bc4562f71cfa90Tinderbox User - purpose with or without fee is hereby granted, provided that the above
281ed127e3ed6c7e07792c19c3bc4562f71cfa90Tinderbox User - copyright notice and this permission notice appear in all copies.
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
33d0a7767d53cb366039fd0ac4f63cf8a9c351b0Tinderbox User - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
33d0a7767d53cb366039fd0ac4f63cf8a9c351b0Tinderbox User - PERFORMANCE OF THIS SOFTWARE.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<title>Chapter�7.�BIND 9 Security Considerations</title>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<link rel="home" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<link rel="prev" href="Bv9ARM.ch06.html" title="Chapter�6.�BIND 9 Configuration Reference">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<link rel="next" href="Bv9ARM.ch08.html" title="Chapter�8.�Troubleshooting">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<table width="100%" summary="Navigation header">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<tr><th colspan="3" align="center">Chapter�7.�<acronym class="acronym">BIND</acronym> 9 Security Considerations</th></tr>
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt<a accesskey="p" href="Bv9ARM.ch06.html">Prev</a>�</td>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch08.html">Next</a>
33d0a7767d53cb366039fd0ac4f63cf8a9c351b0Tinderbox User<div class="titlepage"><div><div><h1 class="title">
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<a name="Bv9ARM.ch07"></a>Chapter�7.�<acronym class="acronym">BIND</acronym> 9 Security Considerations</h1></div></div></div>
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt<dt><span class="section"><a href="Bv9ARM.ch07.html#Access_Control_Lists">Access Control Lists</a></span></dt>
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt<dt><span class="section"><a href="Bv9ARM.ch07.html#id-1.8.4"><span class="command"><strong>Chroot</strong></span> and <span class="command"><strong>Setuid</strong></span></a></span></dt>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<dt><span class="section"><a href="Bv9ARM.ch07.html#id-1.8.4.7">The <span class="command"><strong>chroot</strong></span> Environment</a></span></dt>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<dt><span class="section"><a href="Bv9ARM.ch07.html#id-1.8.4.8">Using the <span class="command"><strong>setuid</strong></span> Function</a></span></dt>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<dt><span class="section"><a href="Bv9ARM.ch07.html#dynamic_update_security">Dynamic Update Security</a></span></dt>
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt<div class="titlepage"><div><div><h2 class="title" style="clear: both">
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt<a name="Access_Control_Lists"></a>Access Control Lists</h2></div></div></div>
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User Access Control Lists (ACLs) are address match lists that
281ed127e3ed6c7e07792c19c3bc4562f71cfa90Tinderbox User you can set up and nickname for future use in
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <span class="command"><strong>allow-notify</strong></span>, <span class="command"><strong>allow-query</strong></span>,
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <span class="command"><strong>allow-query-on</strong></span>, <span class="command"><strong>allow-recursion</strong></span>,
c40906dfad6dd6e3a3e3c94b8c8847bc9bc064e5Mark Andrews <span class="command"><strong>blackhole</strong></span>, <span class="command"><strong>allow-transfer</strong></span>,
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User <span class="command"><strong>match-clients</strong></span>, etc.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User Using ACLs allows you to have finer control over who can access
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User your name server, without cluttering up your config files with huge
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User lists of IP addresses.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User It is a <span class="emphasis"><em>good idea</em></span> to use ACLs, and to
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User control access to your server. Limiting access to your server by
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User outside parties can help prevent spoofing and denial of service
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User (DoS) attacks against your server.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User ACLs match clients on the basis of up to three characteristics:
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User 1) The client's IP address; 2) the TSIG or SIG(0) key that was
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User used to sign the request, if any; and 3) an address prefix
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User encoded in an EDNS Client Subnet option, if any.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User Here is an example of ACLs based on client addresses:
zone "example.com" {
This allows authoritative queries for "example.com" from any
<span class="command"><strong>geoip [<span class="optional">db <em class="replaceable"><code>database</code></em></span>] <em class="replaceable"><code>field</code></em> <em class="replaceable"><code>value</code></em></strong></span>
used, otherwise the full description must be used (e.g.
and searches for region (i.e., state or province) can be
<a name="id-1.8.4"></a><span class="command"><strong>Chroot</strong></span> and <span class="command"><strong>Setuid</strong></span>
ability to run the daemon as an unprivileged user ( <code class="option">-u</code> <em class="replaceable"><code>user</code></em> ).
We suggest running as an unprivileged user when using the <span class="command"><strong>chroot</strong></span> feature.
Here is an example command line to load <acronym class="acronym">BIND</acronym> in a <span class="command"><strong>chroot</strong></span> sandbox,
<span class="command"><strong>/var/named</strong></span>, and to run <span class="command"><strong>named</strong></span> <span class="command"><strong>setuid</strong></span> to
<a name="id-1.8.4.7"></a>The <span class="command"><strong>chroot</strong></span> Environment</h3></div></div></div>
From <acronym class="acronym">BIND</acronym>'s point of view, <code class="filename">/var/named</code> is
like <span class="command"><strong>directory</strong></span> and <span class="command"><strong>pid-file</strong></span> to account
<span class="emphasis"><em>not</em></span> need to compile <span class="command"><strong>named</strong></span>
<a name="id-1.8.4.8"></a>Using the <span class="command"><strong>setuid</strong></span> Function</h3></div></div></div>