dns.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Tue, 12 Jan 2016 19:39:04 +0200
changeset 1867 bc5808420c99
parent 1863 1532554ca0b4
child 1873 d64682ab74a2
permissions -rw-r--r--
Open ports on current host.

.. -*- coding: utf-8; -*-
.. include:: HEADER.rst

======
 DNS.
======

About DNS resolving protocol.
=============================

Default port for name resolving is ``53``::

  $ nslookup -port=53 microsoft.com

Debugging name resolution.
==========================
::

  $ nslookup -debug microsoft.com

Dumping all available resords::

  $ nslookup -type=any microsoft.com

Timing information and traces available via::

  $ dig +trace google.com
  $ dig @8.8.4.4 +noall +answer +stats A defun.work

IP from host name.
==================

This request is for the ``A`` record and default for ``nslookup`` command::

  $ nslookup defun.work
  $ nslookup -type=a defun.work
  $ nslookup -type=a defun.work 8.8.8.8

  $ dig @8.8.8.8 A defun.work
  $ dig +nocmd +noall +answer defun.work

Host name from IP.
==================

If that information available::

  $ nslookup -type=ptr 8.8.8.8


List authoritative NS for domain.
=================================
::

  $ dig ns defun.work
  $ nslookup -type=ns defun.work

List MX records for domain.
===========================
::

  $ dig mx mail.google.com
  $ nslookup -type=mx mail.google.com

List SOA records for domain.
============================

SOA ("Start Of Authority") Record for a domain provides technical information
about the domain::

  $ dig soa defun.work

Human readable format can be viewed via::

  $ nslookup -type=mx defun.work

    origin = ns1.mindsandmachines.com
    mail addr = admin.mindsandmachines.com
    serial = 2011091101
    refresh = 10800
    retry = 7200
    expire = 604800
    minimum = 86400

Email adress for domain administrator is ``admin@mindsandmachines.com`` for
above output.

List domain names.
==================
::

  $ dig ns dp.gov.ua
  ...
  ;; ANSWER SECTION:
  dp.gov.ua.              3600    IN      NS      ns.giknpc.com.ua.
  ...

  $ dig @ns.giknpc.com.ua dp.gov.ua AXFR
  ...
  dp.gov.ua.              3600    IN      MX      200 relay2.giknpc.com.ua.
  dp.gov.ua.              3600    IN      A       195.64.190.1
  adm.dp.gov.ua.          3600    IN      A       195.64.190.1

How reread config file?
=======================

FreeBSD::

  $ named.reload