# HG changeset patch # User Peter Mikkelsen # Date 1597442599 -7200 # Sat Aug 15 00:03:19 2020 +0200 # Node ID 8287ef003f4c7d3df3c2b4664606f5301299f4ef # Parent 37d090d2e7084c09503e095844cc9a4aca92947f Add note about dns diff --git a/sites/pmikkelsen.com/plan9/dns.md b/sites/pmikkelsen.com/plan9/dns.md new file mode 100644 --- /dev/null +++ b/sites/pmikkelsen.com/plan9/dns.md @@ -0,0 +1,41 @@ +# Using 9front as an authoritative DNS server + +This note describes the steps I took to make the 9front server +at pmikkelsen.com the authoritative dns server for itself. + +First, I logged into my domain name registrar and changed the dns servers for +my domain to `ns1.pmikkelsen.com` and `ns2.pmikkelsen.com` (It would not let me have +just one, but I choose to live dangerously and point both of those domains at +the same server). + +To let the world know _where_ `ns1` and `ns2` can be found, +I added their ip on the registrar's website (since my own dns server cannot serve +them for good reasons). Anyways, this might not be the same for you since you +may not use the same provider. + +## Starting the dns server in "serve mode" + +First I added 1 line to the `/cfg/$sysname/cpurc` file to enable the dns server. + + ndb/dns -s + +After that I added a few lines in `/lib/ndb/local` to setup all the dns records I needed: + + dom=pmikkelsen.com soa= + ip=80.240.16.196 + mx=vps1.pmikkelsen.com pref=1 + txtrr="v=spf1 a mx ip:80.240.16.196 ~all" + + dom=p9auth.pmikkelsen.com soa= + ip=80.240.16.196 + + dom=vps1.pmikkelsen.com soa= + ip=80.240.16.196 + + dom=_dmarc.pmikkelsen.com soa= + txtrr="v=DMARC1; p=none" + +With this done, I now have A records, mx records and txt records in place, so my website, +mail and rcpu works as expected. + +Bye. \ No newline at end of file