1
Fork 0

Add dns config

This commit is contained in:
prescientmoon 2024-05-09 04:12:28 +02:00
parent 2f2ae6b983
commit c41de695d2
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4
3 changed files with 69 additions and 1 deletions

View file

@ -24,4 +24,4 @@ echo "Uptimes:"
column --table -R 2 -s "~"
# ^ We use the column command to align things nicely:
# -R 2 aligns the second column to the right
# -s ~ will split on occurences of ~
# -s ~ will split on occurrences of ~

View file

@ -0,0 +1,10 @@
zoneid=$1
bearer=$2
# Taken from https://developers.cloudflare.com/dns/zone-setups/troubleshooting/delete-all-records/
curl --silent "https://api.cloudflare.com/client/v4/zones/$zoneid/dns_records?per_page=50000" \
--header "Authorization: Bearer $bearer" \
| jq --raw-output '.result[].id' | while read id
do
curl --silent --request DELETE "https://api.cloudflare.com/client/v4/zones/$zoneid/dns_records/$id" \
--header "Authorization: Bearer $bearer"
done

58
scripts/dns/dns.txt Normal file
View file

@ -0,0 +1,58 @@
$ORIGIN moonythm.dev. ; designates default origin
$TTL 600 ; expiration time in ms
; ==========================================================================================
; Main dns records
; Actual (internal, mostly) IPs
lapetus.moonythm.dev IN A 100.93.136.59
lapetus.moonythm.dev IN AAAA fd7a:115c:a1e0::e75d:883b
; lapetus services
actual IN CNAME lapetus.moonythm.dev.
api.intray IN CNAME lapetus.moonythm.dev.
api.smos IN CNAME lapetus.moonythm.dev.
cal IN CNAME lapetus.moonythm.dev.
docs.smos IN CNAME lapetus.moonythm.dev.
grafana IN CNAME lapetus.moonythm.dev.
intray IN CNAME lapetus.moonythm.dev.
irc IN CNAME lapetus.moonythm.dev.
lab IN CNAME lapetus.moonythm.dev.
lapetus.syncthing IN CNAME lapetus.moonythm.dev.
media IN CNAME lapetus.moonythm.dev.
prometheus IN CNAME lapetus.moonythm.dev.
qbit IN CNAME lapetus.moonythm.dev.
redlib IN CNAME lapetus.moonythm.dev.
rss IN CNAME lapetus.moonythm.dev.
search IN CNAME lapetus.moonythm.dev.
smos IN CNAME lapetus.moonythm.dev.
warden IN CNAME lapetus.moonythm.dev.
yt IN CNAME lapetus.moonythm.dev.
*.irc IN CNAME irc.moonythm.dev.
diptime IN CNAME real.lapetus.moonythm.dev.
; ==========================================================================================
; Migadu mail setup
; Mail MX records
orbit.moonythm.dev IN MX 10 aspmx1.migadu.com.
orbit.moonythm.dev IN MX 20 aspmx2.migadu.com.
moonythm.dev IN MX 10 aspmx1.migadu.com.
moonythm.dev IN MX 20 aspmx2.migadu.com.
; Mail CNAME records
key1._domainkey IN CNAME key1.moonythm.dev._domainkey.migadu.com.
key2._domainkey IN CNAME key2.moonythm.dev._domainkey.migadu.com.
key3._domainkey IN CNAME key3.moonythm.dev._domainkey.migadu.com.
key1._domainkey.orbit IN CNAME key1.orbit.moonythm.dev._domainkey.migadu.com.
key2._domainkey.orbit IN CNAME key2.orbit.moonythm.dev._domainkey.migadu.com.
key3._domainkey.orbit IN CNAME key3.orbit.moonythm.dev._domainkey.migadu.com.
; Other mail stuff
_dmarc.moonythm.dev IN TXT "v=DMARC1; p=quarantine;"
_dmarc.orbit.moonythm.dev IN TXT "v=DMARC1; p=quarantine;"
moonythm.dev IN TXT "hosted-email-verify=kfkhyexd"
moonythm.dev IN TXT "v=spf1 include:spf.migadu.com -all"
orbit.moonythm.dev IN TXT "hosted-email-verify=24s7lnum"
orbit.moonythm.dev IN TXT "v=spf1 include:spf.migadu.com -all"