Bv9ARM.ch07.html revision 164ade1482251e1da962b42e5bf0d3aa02a11e03
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland - Copyright (C) 2000-2016 Internet Systems Consortium, Inc. ("ISC")
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland - This Source Code Form is subject to the terms of the Mozilla Public
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland - License, v. 2.0. If a copy of the MPL was not distributed with this
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland - file, You can obtain one at http://mozilla.org/MPL/2.0/.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<title>Chapter�7.�BIND 9 Security Considerations</title>
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<link rel="home" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<link rel="prev" href="Bv9ARM.ch06.html" title="Chapter�6.�BIND 9 Configuration Reference">
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<link rel="next" href="Bv9ARM.ch08.html" title="Chapter�8.�Troubleshooting">
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<table width="100%" summary="Navigation header">
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<tr><th colspan="3" align="center">Chapter�7.�<acronym class="acronym">BIND</acronym> 9 Security Considerations</th></tr>
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<a accesskey="p" href="Bv9ARM.ch06.html">Prev</a>�</td>
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch08.html">Next</a>
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<div class="titlepage"><div><div><h1 class="title">
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<a name="Bv9ARM.ch07"></a>Chapter�7.�<acronym class="acronym">BIND</acronym> 9 Security Considerations</h1></div></div></div>
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<dt><span class="section"><a href="Bv9ARM.ch07.html#Access_Control_Lists">Access Control Lists</a></span></dt>
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<dt><span class="section"><a href="Bv9ARM.ch07.html#chroot_and_setuid"><span class="command"><strong>Chroot</strong></span> and <span class="command"><strong>Setuid</strong></span></a></span></dt>
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<dt><span class="section"><a href="Bv9ARM.ch07.html#chroot">The <span class="command"><strong>chroot</strong></span> Environment</a></span></dt>
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<dt><span class="section"><a href="Bv9ARM.ch07.html#setuid">Using the <span class="command"><strong>setuid</strong></span> Function</a></span></dt>
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<dt><span class="section"><a href="Bv9ARM.ch07.html#dynamic_update_security">Dynamic Update Security</a></span></dt>
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<div class="titlepage"><div><div><h2 class="title" style="clear: both">
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland<a name="Access_Control_Lists"></a>Access Control Lists</h2></div></div></div>
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland Access Control Lists (ACLs) are address match lists that
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland you can set up and nickname for future use in
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland <span class="command"><strong>allow-notify</strong></span>, <span class="command"><strong>allow-query</strong></span>,
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland <span class="command"><strong>allow-query-on</strong></span>, <span class="command"><strong>allow-recursion</strong></span>,
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland <span class="command"><strong>blackhole</strong></span>, <span class="command"><strong>allow-transfer</strong></span>,
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland <span class="command"><strong>match-clients</strong></span>, etc.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland Using ACLs allows you to have finer control over who can access
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland your name server, without cluttering up your config files with huge
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland lists of IP addresses.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland It is a <span class="emphasis"><em>good idea</em></span> to use ACLs, and to
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland control access to your server. Limiting access to your server by
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland outside parties can help prevent spoofing and denial of service
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland (DoS) attacks against your server.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland ACLs match clients on the basis of up to three characteristics:
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland 1) The client's IP address; 2) the TSIG or SIG(0) key that was
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland used to sign the request, if any; and 3) an address prefix
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland encoded in an EDNS Client Subnet option, if any.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland Here is an example of ACLs based on client addresses:
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland// Set up an ACL named "bogusnets" that will block
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland// RFC1918 space and some reserved space, which is
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland// commonly used in spoofing attacks.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandacl bogusnets {
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="chroot_and_setuid"></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="chroot"></a>The <span class="command"><strong>chroot</strong></span> Environment</h3></div></div></div>
<span class="emphasis"><em>not</em></span> need to compile <span class="command"><strong>named</strong></span>
<a name="setuid"></a>Using the <span class="command"><strong>setuid</strong></span> Function</h3></div></div></div>