6 - DNS

Unit 6 - DNS

Last Update Unknown

DNS Zones

What is a DNS SOA record?

The DNS ‘start of authority’ (SOA) record stores important information about a domain or zone such as the email address of the administrator, when the domain was last updated, and how long the server should wait between refreshes.

All DNS zones need an SOA record in order to conform to IETF standards. SOA records are also important for zone transfers.

name example.com
record type SOA
MNAME ns.primaryserver.com
RNAME admin.example.com
SERIAL 1111111111
REFRESH 86400
RETRY 7200
EXPIRE 4000000
TTL 11200

The 'RNAME' value here represents the administrator's email address, which can be confusing because it is missing the ‘@’ sign, but in an SOA record admin.example.com is the equivalent of [email protected].

$ORIGIN

DNS uses a zone file to translate names into IP addresses. There are four ways to specify a name in the zone file. You can specify a fully qualified domain name, a relative name, a single @ character, and a blank space.

  1. If you use an FQDN name, DNS uses the name as it is.
  2. If you use a relative name, DNS uses the $ORIGIN directive's value to convert it into the FQDN name.
  3. If you use a single character @, DNS uses the value of the $ORIGIN directive.
  4. If you use a blank space or leave the field empty, DNS uses the value of the name field of the previous record. If the previous record is not available, it uses the value of the $ORIGIN directive.


The $ORIGIN directive defines the domain or zone name. You can use it anywhere in the zone file. DNS uses it to convert all relative names that come after it into FQDN names. In the zone file, all names that do not end with a dot are considered relative names. 

An FQDN (fully qualified domain name) ends with a dot and denotes the complete name.


The $ORIGIN directive is optional. If you do not set its value, DNS uses the domain or zone name configured in the named.conf file as the default value of this directive to process all records.


Linux Zoo

The Linux Zoo Lab can be found here.

Question 3: Forward Zone

/etc/named.conf

sillynet.zone

Question 4: Reverse Zone

/etc/named.conf

sillynet.rev

No $ORIGIN for reverse lookup as the origin should be the network address.

Question 5: Advanced Zone

advanced.zone

advanced.rev

Full /etc/named.conf file


Mentimeter

The answer is test.com.test.com

Since, MX 10 email failed, so the next line is MX 20 server 1, which is an alias for test.com which is not fully qualified (since is missing a '.') so becomes test.com.test.com