Professional Documents
Culture Documents
Introduction
• What is DNS?
– A server that translates DNS names (such as
stop-phishing.com) into an IP address that is
actually used for communication on the
Internet.
Linux
/etc/hosts
less /etc/hosts
MS
windows\system32\drivers\etc\hosts
Top-level domain
Domain Name Meaning
COM Commercial organizations
EDU Educational institutions
GOV Government institutions
MIL Military groups
NET Major network support
ORG Organizations other than those above
ARPA Temporary ARPANET domain
INT International organizations
country codeEach country (geographical scheme)
Implementation of DNS
$TTL 3D
Standard Resource Records
• SOA
– Start of Authority, Marks the begining of a
zone's data
• NS
– IP address or CNAME of the name server
• A
– IP address of server
– The most commonly used type of record. This
record maps an IP Address to a hostname.
• MX
– Mail server DNS name
• CNAME
– Server name alias
• PTR
– Last octet of server's IP address
The SOA Record
• Format
Name Class Type Name-Server Email-Address Serial-No Refresh
Retry Expiry Minimum-TTL
@ IN SOA ns1.my-site.com. hostmaster.my-site.com. ( 2004100801 ; serial #
4H ; refresh
1H ; retry
1W ; expiry
1D ) ; minimum
the general format:
Name Class Type Data
eeunix IN A 130.111.148.45
IN MX 0 eeunix
IN MX 1 maine.maine.edu.
Ex:-
• Install DNS sever for sigiri.lk
/etc/bind/named.conf
/etc/bind/named.conf.options
/etc/bind/named.conf.local
In this section BIND9 will be configured as the primary master for the domain
sigiri.lk. Simply replace sigiri.lk with your fully qualified domain name.
Zone File
To add a DNS zone to BIND9, turning BIND9 into a Primary Master server, all
you have to do is edit /etc/bind/named.conf.local
zone “sigiri.lk”{
type master;
file "/etc/bind/db.sigiri.lk“;
};
• Now use an existing zone file as a template:
• Or copy db.empty to db.sigiri.lk
• Or copy db.local to db.sigiri.lk
cp /etc/bind/db.local /etc/bind/db.sigiri.lk
• Edit the new zone file /etc/bind/db.sigiri.lk change localhost. to
the FQDN of your server, leaving the additional "." at the end.
• Once you've made a change to the zone file BIND9 will need to be
restarted for the changes to take affect:
• /etc/init.d/bind9 restart