Bv9ARM.6.html revision 77071cec207e44f7ef91f0af03830ec3cd00294d
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML EXPERIMENTAL 970324//EN">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<META NAME="GENERATOR" CONTENT="Adobe FrameMaker 5.5/HTML Export Filter">
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews<TITLE> Section 6. Security Considerations</TITLE></HEAD>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsSection 6. Security Considerations</H1>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsAccess Control Lists</H3>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsAccess Control Lists (ACLs), are address match lists that you can set up and nickname for future use in <CODE CLASS="Program-Process">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewsallow-query</CODE>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewsallow-recursion</CODE>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewsblackhole</CODE>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewsallow-transfer</CODE>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsUsing ACLs allows you to have finer control over who can access your nameserver, without cluttering up your config files with huge lists of IP addresses.</P>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewsgood idea</EM>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews to use ACLs, and to control access to your server. Limiting access to your server by outside parties can help prevent spoofing and DoS attacks against your server.</P>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsHere is an example of how to properly apply ACLs:</P>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews// Set up an ACL named "bogusnets" that will block RFC1918 space,<BR>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews// which is commonly used in spoofing attacks.</P>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<CODE>acl bogusnets{ 0.0.0.0/8; 1.0.0.0/8; 2.0.0.0/8; 192.0.2.0/24; 224.0.0.0/3; 10.0.0.0/8; 172.16.0.0/12; 192.168.0.0/16; };
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews// Set up an ACL called our-nets. Replace this with the real IP numbers.</P>
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt blackhole { bogusnets; };
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsThis allows recursive queries of the server from the outside unless recursion has been previously disabled.</P>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsFor more information on how to use ACLs to protect your server, see the <EM CLASS="Emphasis">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews advisory at<BR>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewsftp://ftp.auscert.org.au/pub/auscert/advisory/AL-1999.004.dns_dos</EM>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewschroot</CODE>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewssetuid</CODE>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews (for UNIX servers)</H3>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsOn UNIX servers, it is possible to run BIND in a <EM CLASS="Emphasis">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewschrooted</EM>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewschroot()</CODE>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews) by specifying the "<CODE CLASS="Program-Process">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews" option. This can help improve system security by placing BIND in a "sandbox," which will limit the damage done if a server is compromised.</P>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsAnother useful feature in the UNIX version of BIND is the ability to run the daemon as a nonprivileged user ( <CODE CLASS="Program-Process">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews> ). We suggest running as a nonprivileged user when using the <CODE CLASS="Program-Process">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewschroot</CODE>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews feature.</P>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsHere is an example command line to load BIND in a <CODE CLASS="Program-Process">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewschroot()</CODE>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews sandbox, <BR>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewssetuid</CODE>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews to user 202:</P>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<PRE CLASS="2Level-fixed"><A NAME="pgfId=997369"></A>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<KBD CLASS="Literal-user-input">/usr/local/bin/named -u 202 -t /var/named</KBD>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewschroot</CODE>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Environment</H4>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewschroot()</CODE>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews environment to work properly in a particular directory (e.g., <EM CLASS="pathname">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews), you will need to set up an environment that includes everything BIND needs to run. From BIND's point of view, <EM CLASS="pathname">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews is the root of the filesystem. You will need <EM CLASS="pathname">
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt, and any library directories and files that BIND needs to run on your system. Please consult your operating system's instructions if you need help figuring out which library files you need to copy over to the <CODE CLASS="Program-Process">
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Huntchroot()</CODE>
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt sandbox.</P>
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan HuntIf you are running an operating system that supports static binaries, you can also compile BIND statically and avoid the need to copy system libraries over to your <CODE CLASS="Program-Process">
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Huntchroot()</CODE>
98922b2b2b024dcca25be7c220cf3b16b1e6c4b5Evan Hunt sandbox.</P>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewssetuid</CODE>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews Function </H4>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsPrior to running the <CODE CLASS="Program-Process">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews utility (to change file access and modification times) or the <CODE CLASS="Program-Process">
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews utility (to set the user id and/or group id) on files to which you want BIND to write.</P>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews6.3 Dynamic Updates</H3>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsAccess to the dynamic update facility should be strictly limited. In earlier versions of BIND the only way to do this was based on the IP address of the host requesting the update. BINDv9 also supports authenticating updates cryptographically by means of transaction signatures (TSIG). The use of TSIG is strongly recommended.</P>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsSome sites choose to keep all dynamically updated DNS data in a subdomain and delegate that subdomain to a separate zone. This way, the top-level zone containing critical data such as the IP addresses of public web and mail servers need not allow dynamic update at all.</P>
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews<p>Return to <A href="Bv9ARM.HTML">BINDv9 Administrator Reference Manual</A>