Setting up a nameserver for your public domain
Setting up a nameserver for a public domain works the same way as setting up a DNS server for an internal hostname, just with a few additional parts that we'll want to make sure are in a good state.
How to do it...
Let's set up a nameserver for a public domain:
- Set up a properly configured SOA record:
example.org. IN SOA ns1.example.org. admin.example.org. ( 2015081401 28800 3600 604800 38400 )
- Set up a record for
NS
hosts:Ns1 IN A 192.168.1.1
- Set up glue records:
$ORIGIN example.org IN NS ns1.example.org. Ns1 IN A 192.168.1.1
How it works…
The first step is to configure the start of authority (SOA) for your domain. The SOA provides basic information about the zone itself. It contains a number of fields, including:
Example.org
: The zone.IN
: Class of the record. IN is Internet, which you'll see for the majority of DNS records that you see.SOA
: Start of authority.ns1.example.org...