Академический Документы
Профессиональный Документы
Культура Документы
DNS
Example
A fully qualified domain name might be
myhost.subnet1.example.com
here, the domain name is example.com
the subdomain or subnet name is subnet1
and the host name is myhost
image
from
wikipedia
DNS Zone
Recursive Queries
The DNS resolver is responsible for resolving a DNS
lookup
this runs on the client machine and its task is essentially to
call the local DNS
the term resolve is used in linux to name the file, /etc/resolv.conf
BIND
The Berkeley Internet Name Domain
this is the common tool used in Linux/Unix to implement
a DNS
named.conf
Statements include
acl (access control statement) dictate who can access the
DNS options are any, localhost, localnets, none, or a list of
IP addresses or networks ending with ; (as in 10.2.3.0/24; or
10.2.0.0/16;)
include to include other files with configuration information
here to keep this file relatively short
since named.conf is readable by the world, to keep information secure
you can move such information into include files
Options
allow-query, allow-recursion, blackhole
you provide previously defined acls here to indicate who can
query or recurse with this DNS or who is disallowed access
(blackhole)
directory
Specifies the working directory if different from the default
/var/named/
forwarders, forward
list of DNSs that we should forward a request onto and how we
should forward (first or only)
listen-on
specify a particular machine or subnet that we will only listen to,
e.g., listen-on {10.2.3.0/24; }; would force us to only listen on
the 10.2.3 subnet
defaults to listen to any incoming IP address
notify
used to specify whether and which slaves to notify for updates
Zones
Zone Files
Any zone statements in your main config file will
also have an associated zone file
the zone file is stored in the named working directory
(e.g., /var/named/)
SOA Format
options {
directory "/var/named"; #tells DNS to use listed directory for other config files
forward first; #check the "forwarders" before doing any resolution
forwarders { # list of domain servers the check ("local" DNS)
10.150.22.7; #internal DNS server for company
};
zone "." { #Settings for the ROOT ZONE
type hint;
#Specifies this as the ROOT ZONE type
file "root.hints"; #File containing links to root servers (/var/named/root.hints)
};
zone 3.2.10.in-addr.arpa" { #Used for reverse lookup
#notice it is your network address backwards+"in-addr.arpa
type master; #Specifies this as a MASTER ZONE
file "pz/10.2.3"; #File that contains the details for zone (/var/named/pz/10.2.3)
allow-update { none; };
};