Bv9ARM.ch07.html revision b397f922936e9f73aa8c3ea40be3ad74285dacaa
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync - Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync - Copyright (C) 2000-2003 Internet Software Consortium.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync - Permission to use, copy, modify, and/or distribute this software for any
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync - purpose with or without fee is hereby granted, provided that the above
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync - copyright notice and this permission notice appear in all copies.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync - PERFORMANCE OF THIS SOFTWARE.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<!-- $Id$ -->
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<title>Chapter�7.�BIND 9 Security Considerations</title>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<link rel="prev" href="Bv9ARM.ch06.html" title="Chapter�6.�BIND 9 Configuration Reference">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<link rel="next" href="Bv9ARM.ch08.html" title="Chapter�8.�Troubleshooting">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<tr><th colspan="3" align="center">Chapter�7.�<acronym class="acronym">BIND</acronym> 9 Security Considerations</th></tr>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a accesskey="p" href="Bv9ARM.ch06.html">Prev</a>�</td>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch08.html">Next</a>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="Bv9ARM.ch07"></a>Chapter�7.�<acronym class="acronym">BIND</acronym> 9 Security Considerations</h2></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="sect1"><a href="Bv9ARM.ch07.html#Access_Control_Lists">Access Control Lists</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="sect1"><a href="Bv9ARM.ch07.html#id2604198"><span><strong class="command">Chroot</strong></span> and <span><strong class="command">Setuid</strong></span></a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch07.html#id2604347">The <span><strong class="command">chroot</strong></span> Environment</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="sect2"><a href="Bv9ARM.ch07.html#id2604407">Using the <span><strong class="command">setuid</strong></span> Function</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<dt><span class="sect1"><a href="Bv9ARM.ch07.html#dynamic_update_security">Dynamic Update Security</a></span></dt>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<div class="titlepage"><div><div><h2 class="title" style="clear: both">
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a name="Access_Control_Lists"></a>Access Control Lists</h2></div></div></div>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Access Control Lists (ACLs) are address match lists that
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync you can set up and nickname for future use in <span><strong class="command">allow-notify</strong></span>,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span><strong class="command">allow-query</strong></span>, <span><strong class="command">allow-query-on</strong></span>,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span><strong class="command">allow-recursion</strong></span>, <span><strong class="command">allow-recursion-on</strong></span>,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <span><strong class="command">blackhole</strong></span>, <span><strong class="command">allow-transfer</strong></span>,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Using ACLs allows you to have finer control over who can access
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync your name server, without cluttering up your config files with huge
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync lists of IP addresses.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync It is a <span class="emphasis"><em>good idea</em></span> to use ACLs, and to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync control access to your server. Limiting access to your server by
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync outside parties can help prevent spoofing and denial of service (DoS) attacks against
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync your server.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Here is an example of how to properly apply ACLs:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// Set up an ACL named "bogusnets" that will block
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// RFC1918 space and some reserved space, which is
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// commonly used in spoofing attacks.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncacl bogusnets {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// Set up an ACL called our-nets. Replace this with the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// real IP numbers.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync allow-query { our-nets; };
zone "example.com" {
<a href="ftp://ftp.auscert.org.au/pub/auscert/advisory/AL-1999.004.dns_dos" target="_top">ftp://ftp.auscert.org.au/pub/auscert/advisory/AL-1999.004.dns_dos</a>
<a name="id2604198"></a><span><strong class="command">Chroot</strong></span> and <span><strong class="command">Setuid</strong></span>
the "<code class="option">-t</code>" option for <span><strong class="command">named</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><strong class="command">chroot</strong></span> feature.
Here is an example command line to load <acronym class="acronym">BIND</acronym> in a <span><strong class="command">chroot</strong></span> sandbox,
<span><strong class="command">/var/named</strong></span>, and to run <span><strong class="command">named</strong></span> <span><strong class="command">setuid</strong></span> to
<a name="id2604347"></a>The <span><strong class="command">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><strong class="command">directory</strong></span> and <span><strong class="command">pid-file</strong></span> to account
<span class="emphasis"><em>not</em></span> need to compile <span><strong class="command">named</strong></span>
<a name="id2604407"></a>Using the <span><strong class="command">setuid</strong></span> Function</h3></div></div></div>