From 2da9fb98f41414976d1afd3d3e547ecb9e8777e3 Mon Sep 17 00:00:00 2001 From: mat ess Date: Sat, 5 Nov 2022 22:48:42 -0400 Subject: [PATCH] Add initial dns configuration --- README.md | 3 +++ mat.services.lua | 16 ++++++++++++++++ templates/protonmail.lua | 21 +++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 README.md create mode 100644 mat.services.lua create mode 100644 templates/protonmail.lua diff --git a/README.md b/README.md new file mode 100644 index 0000000..8ab0070 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# luadns configuration + +configuration for personal sites diff --git a/mat.services.lua b/mat.services.lua new file mode 100644 index 0000000..8193fc3 --- /dev/null +++ b/mat.services.lua @@ -0,0 +1,16 @@ +-- mat.services zone configuration +-- _a = "mat.services" + +protonmail(_a) + +alias(_a, "apex-loadbalancer.netlify.com") +cname("www", "mat-services.netlify.app.") + +aaaa("git", "2a09:8280:1::a:4caa") +a("git", "37.16.20.177") + +aaaa("stats", "2a09:8280:1::6:6df4") +a("stats", "168.220.83.238") + +aaaa("build", "2a09:8280:1::1:8987") +a("build", "137.66.42.72") diff --git a/templates/protonmail.lua b/templates/protonmail.lua new file mode 100644 index 0000000..f03b7be --- /dev/null +++ b/templates/protonmail.lua @@ -0,0 +1,21 @@ +function protonmail(domain) + -- Configure mail records for protonmail + + -- Verification + txt(domain, "protonmail-verification=6e777d2bb348043a8e73b4f405b6b2dc659ff85f") + + -- MX records + mx(domain, "mail.protonmail.ch", 10) + mx(domain, "mailsec.protonmail.ch", 20) + + -- SPF + txt(domain, "v=spf1 include:_spf.protonmail.ch mx ~all") + + -- DKIM + cname("protonmail._domainkey", "protonmail.domainkey.dcwpz6gpldptg5vbdvvdztzgb7klx436m5hho3egx4mwmvh6kwvba.domains.proton.ch.") + cname("protonmail2._domainkey", "protonmail2.domainkey.dcwpz6gpldptg5vbdvvdztzgb7klx436m5hho3egx4mwmvh6kwvba.domains.proton.ch.") + cname("protonmail3._domainkey", "protonmail3.domainkey.dcwpz6gpldptg5vbdvvdztzgb7klx436m5hho3egx4mwmvh6kwvba.domains.proton.ch.") + + -- DMARC + txt("_dmarc", "v=DMARC1; p=quarantine") +end