Chapter 15. DNS Hosting

Table of Contents

15.1. Default DNS records
15.2. Adding a wild-card hostname record
15.3. Using the Bytemark anti-spam system
15.4. Moving domains between machines using the Bytemark content DNS service

To take full advantage of the Symbiosis system, your domain needs to be configured to have Bytemark’s name servers as authority for it.

What follows only applies if our name servers are used; if that is not the case you will need to manage your DNS data outside of the Symbiosis system. Section 15.1, “Default DNS records” gives a listing of the records needed for the correct functioning of the system.

All domains which are hosted upon a Symbiosis system will have their DNS records automatically uploaded to the Bytemark Content DNS servers.

By default a set of typical records is created for each hosted domain with MX records pointing to the local system, and aliases such as www. and ftp. for convenience. If you wish you may edit the records to make custom additions or otherwise make changes to those defaults.

For the domain "my-brilliant-site.com" you will find the auto-generated DNS records in /srv/my-brilliant-site.com/config/dns/my-brilliant-site.com.txt

The DNS files are uploaded to the Bytemark content DNS service every hour, and allow you to use the full range of available TinyDNS options. These options are documented upon the Bytemark Website and in the TinyDNS documentation.

15.1. Default DNS records

The default records generated are listed in /etc/symbiosis/dns.d/template in format used by TinyDNS. In the template given below, $domain should be substituted for domain, and $ip for an IP address. A brief explanation of each line is given.

If your domain is hosted elsewhere it would be prudent to create the records explained in notes 2, 3, and 4 in the listing below in order for everything to work as advertised.

DNS records template. 

#
#  Nameserver records. 1
#
.$domain::a.ns.bytemark.co.uk:300
.$domain::b.ns.bytemark.co.uk:300
.$domain::c.ns.bytemark.co.uk:300

#
#  The domain name itself 2
#
=$domain:$ip:300

#
#  Useful aliases. 3
#
+ftp.$domain:$ip:300
+www.$domain:$ip:300

#
#  MX record 4
#
@$domain:$ip:mx.$domain:15:300

1

These lines create NS and SOA records for $domain pointing at a.ns.bytemark.co.uk, b.ns.bytemark.co.uk, and c.ns.bytemark.co.uk. The time-to-live for these records is 300 seconds. Note that the double colons in these records are deliberate.

2

This creates an A record pointing $domain to the IP address $ip, and a PTR record for the reverse. Again, the TTL is 300 seconds.

3

These two lines add A records to direct ftp.$domain, and www.$domain to the IP address $ip. Once again, the TTL for these records is 300 seconds.

4

This last record creates an MX record directing mail for $domain to mx.$domain, with a distance of 15. It also creates an A record pointing mx.$domain to The IP address $ip. The TTL for these records is also 300 seconds.

If you would rather have a different template to be created for your domains, feel free to edit /etc/symbiosis/dns.d/template. Ensure that the pattern of $domain and $ip is followed for the generation to work.

15.2. Adding a wild-card hostname record

In addition to these records for each domain, a wild-card A record is needed for the hostname such that the .testing. prefix works. If your machine is at Bytemark, this has already been setup for your machine’s Bytemark alias, for example example.vm.bytemark.co.uk.

If your machine is not hosted at Bytemark, or your hostname does not end in bytemark.co.uk then you will need to set this alias up. Adding the following line to your DNS file will work, assuming the domain is hosted at Bytemark. This assumes that your machine is called host.example.com and that your machine’s IP address is 1.2.3.4.

*.host.example.com:1.2.3.4

15.3. Using the Bytemark anti-spam system

Bytemark Hosting offer wholesale spam protection for their hosting customers.

Of course this can be integrated into the Symbiosis system. For the domain my-brilliant-site.com the DNS file at /srv/my-brilliant-site.com/config/dns/my-brilliant-site.com.txt would need to be changed as follows.

Please note that this is a chargeable service.

  1. Connect to your machine using FileZilla, as detailed in Chapter 2, Connecting to your server with FileZilla and SFTP.

  2. Navigate to /srv/my-brilliant-site.com/config/dns/ and select the file my-brilliant-site.com.txt for editing.

  3. Change the line reading @my-brilliant-site.com:1.2.3.4:mx.my-brilliant-site.com:15:300 to read @my-brilliant-site.com:1.2.3.4:mx.my-brilliant-site.com:15:300::nospam

  4. Add in the following two lines

    @my-brilliant-site.com::a.nospam.bytemark.co.uk:5:300::world
    @my-brilliant-site.com::b.nospam.bytemark.co.uk:10:300::world
  5. Save the file

Now within the next hour, mail will be routed via the Bytemark anti-spam machines.

The final step is to make sure that only mail from the Bytemark anti-spam machines will be accepted. To do this for a domain, create the file /srv/my-brilliant-site.com/config/bytemark-antispam. This will cause mail sent directly to your machine to be temporarily rejected, ensuring spammers cannot circumvent the anti-spam protection.

15.4. Moving domains between machines using the Bytemark content DNS service

If you wish to move your domains between two machines running Symbiosis and using the Bytemark content DNS service, you must contact Bytemark Support to arrange the domain to be moved between content DNS accounts.

This results from the necessity for ensuring that only people with the proper authorisation can change live DNS data. Once a domain has been hosted on our network, a content DNS account will have sole authority for it.

If you purchase a second server and move some of your domains onto it, or purchase a domain from another Bytemark customer you must contact us to move authority for the domain into the correct account.

Until this is done, although the Symbiosis system will be creating and uploading data it will not be to the account with the authority to make the data live.