Skip to content

Setting up your Canarytokens DNS correctly

JayJB edited this page Aug 24, 2021 · 3 revisions

Prerequisites

  • two domains:
    • one is used for the public facing web application; we can call this the frontend domain.
    • other is used for the Canarytokens' embedded urls; we can call this the backend domain.
  • public IP address of server running your Canarytokens docker.

Quick Explanation

We recommend two domains because we have found that setting up the DNS is easier and more reliable. It also allows you to have a disconnect of domain between what everyone can see and what your Canarytokens trigger on.

For the rest of the explanation we will use frontend domain as frontend.com and backend domain as backend.com. We will also use SERVER_IP as your server's public facing IP that will be running your Canarytokens Server.

Step by step

Frontend domain setup (frontend.com)

  1. At domain registrar, set your Name Servers to point at the DNS servers that are running your "Hosted Zone" file. For example, if you have AWS route53 managing your zone file but GoDaddy is your registrar for your domain, frontend.com. You would request the Name Servers to point the AWS supplied name servers, say awsdns-1.com, awsdns-2.com.
  2. Head over to your zone file for your domain.
  3. Configure NS records as the same Name Servers you supplied the registrar. e.g.
frontend.com NS 10 awsdns-1.com 
                10 awsdns-2.com
  1. Configure A record for your domain. e.g.
frontend.com A SERVER_IP
  1. Configure A records for your domain's name servers. e.g.
ns1.frontend.com A SERVER_IP
ns2.frontend.com A SERVER_IP

Backend domain setup (backend.com)

  1. At domain registrar, set your Name Servers to point at the two nameservers you set for frontend.com.
backend.com NS ns1.frontend.com
               ns2.frontend.com
  1. Head over to your zone file for your domain.
  2. Configure NS records as the same Name Servers you supplied the registrar for this domain. e.g.
backend.com NS 10 ns1.frontend.com
               10 ns2.frontend.com
  1. Configure A record for your domain. e.g.
backend.com A SERVER_IP
Clone this wiki locally