Recursive DNS Server

Recursive DNS Server

Lab Exercise 2 – Recursive DNS Server Objectives Participants shoulD be able to configure anD run a recursive DNS server. Background A recursive server is a type of DNS server that performs DNS lookups for client resolvers. It has the capability of caching results for a time specified in the Time to Live (TTL). What You Need Linux Server with BIND already installed. Steps 1. Create a Directory in /var/named. Let us call this folDer “recursive.” mkdir /var/named mkdir /var/named/recursive cd /var/named/recursive 2. (optional) DownloaD the root.hints file from the internic website and save in the recursive folder. wget ftp://ftp.internic.net/domain/root.zone cp root.zone /var/named/recursive/root.hints 3. Using VI or your favourite text eDitor, create a file calleD named.conf. This is the BIND configuration file. nano named.conf a. The options statement is where you can add global options to be used as defaults by BIND. Only one options fielD shoulD be DefineD in the configuration file. For now, let us Define the working Directory as follows. options { directory “/var/named/recursive”; }; b. Next aDD the recursive/caching name server configuration zone “.” { type hint; file “root.hints”; }; Lab Exercise 2 – Recursive Server Version 4.0 – 16 Nov 2019 Page 1 of 3 Lab Exercise 2 – Recursive DNS Server c. Define a localhost zone that maps to the loopback aDDress 127.0.0.1. zone “localhost” { type master; file “db.localhost”; }; 4. Create the zone files anD put them in the /var/nameD/recursive Directory. Create a zone file db.localhost for forward zones. $TTL 1d @ SOA localhost. root.localhost. ( 2019111801 ;serial 30m ;refresh 15m ;retry 1d ;expire 30m ;negative ttl ) NS localhost. A 127.0.0.1 Note: The serial is a 10-digit number. It is common to use the date format YYYYMMDD for the first 8 bits, anD an incrementing number for the last 2 digits. Remember to change this to the current date (example: 2016072001), anD make sure to increment the last 2 digits everytime you make changes to the zone file. 5. Try running binD with -g and -c named.conf and see if BIND complains for errors. named -g -c named.conf 6. Test recursive name server to get an A & AAAA recorD of your domain. dig @127.0.0.1 www.myzone.net dig @localhost www.myzone.net dig @127.0.0.1 www.myzone.net AAAA For this lab, you can also resolve our root and GTLD servers. dig @localhost x.root-server.net dig @localhost x.gtld-server.net Test your recursive name server to query other RRs like SOA, MX, anD PTR records. To verify that your server caches information, query the same RR twice anD compare the query time. The complete named.conf for a recursive server is as follows: options { directory “/var/named/recursive”; }; Lab Exercise 2 – Recursive Server Version 4.0 – 16 Nov 2019 Page 2 of 3 Lab Exercise 2 – Recursive DNS Server // recursive name server config zone “.” { type hint; file “root.hint”; }; zone "localhost" { type master; file "db.localhost" ; }; zone “0.0.127.in-addr.arpa” { type master; file db.127.0.0; }; zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" { type master; file "db.ip6"; allow-update { none; }; }; Lab Exercise 2 – Recursive Server Version 4.0 – 16 Nov 2019 Page 3 of 3 .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    3 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us