Skip to content

DNS provider

The DNS provider exposes DNS records as files. Every record type for a domain becomes a readable leaf; ls shows which types have answers, cat returns the record data one entry per line.

No credentials required. The provider sends DNS-over-HTTPS (DoH) queries through the host runtime. Cloudflare (1.1.1.1) and Google (8.8.8.8) are preconfigured; you can pin a different resolver per query using the @resolver path segment.

All paths live under /dns (or wherever you mount omnifs; examples below assume the default /omnifs mount).

PathOperationReturns
/dns/{name}lsRecord types with answers: A, AAAA, MX, NS, TXT, CNAME, SOA, SRV, _all, _raw
/dns/{name}/{type}catRecords for that type, one per line
/dns/{name}/_allcatAll record types concatenated, labelled by type
/dns/{name}/_rawcatRaw DoH JSON response from the resolver
/dns/@{resolver}/{name}/{type}catSame as above, routed through the named resolver
/dns/_reverse/{ip}/PTRcatReverse DNS lookup for an IPv4 or IPv6 address

{name} is any fully-qualified domain name. {type} is the record type in uppercase: A, AAAA, MX, NS, TXT, CNAME, SOA, SRV.

{resolver} in the @-prefixed paths is a resolver alias or a bare IP. The two built-in aliases are cloudflare and google.

The provider has one optional configuration key.

KeyTypeRequiredDefault
resolverstringnocloudflare

Set resolver to change the default DoH endpoint used when no @resolver segment appears in the path. Cloudflare and Google are available without further setup; supply a full URL to use any RFC 8484-compliant DoH server.

List record types for a domain:

Terminal window
ls /omnifs/dns/example.com
# A AAAA MX NS TXT CNAME SOA SRV _all _raw

Read the A record:

Terminal window
cat /omnifs/dns/example.com/A
# 93.184.216.34

Read the MX records (priority and hostname, one entry per line):

Terminal window
cat /omnifs/dns/example.com/MX
# 10 mail.example.com.
# 20 mail2.example.com.

Read the NS records:

Terminal window
cat /omnifs/dns/example.com/NS
# a.iana-servers.net.
# b.iana-servers.net.

Read a TXT record (useful for SPF, DKIM, domain verification tokens):

Terminal window
cat /omnifs/dns/example.com/TXT
# "v=spf1 -all"

Read all record types at once:

Terminal window
cat /omnifs/dns/example.com/_all

Pipe _all into grep to filter without switching tools:

Terminal window
cat /omnifs/dns/example.com/_all | grep MX

Query a specific resolver for a record:

Terminal window
cat /omnifs/dns/@google/example.com/AAAA
cat /omnifs/dns/@cloudflare/example.com/NS

Reverse lookup:

Terminal window
cat /omnifs/dns/_reverse/93.184.216.34/PTR
# example.com.

Check CNAME chains (read the CNAME leaf, then read the target):

Terminal window
cat /omnifs/dns/www.example.com/CNAME
# example.com.
cat /omnifs/dns/example.com/A
# 93.184.216.34

Get the raw DoH response to inspect TTLs and full answer sections:

Terminal window
cat /omnifs/dns/example.com/_raw | jq '.Answer[] | {name, type, TTL, data}'

Because records are plain files, standard POSIX tools work without any DNS library:

Terminal window
# Block until an A record appears (useful after DNS propagation)
until cat /omnifs/dns/mynewdomain.example/A 2>/dev/null | grep -q .; do
sleep 5
done
echo "DNS propagated"
Terminal window
# Audit MX records across a list of domains
while read domain; do
echo "=== $domain ==="
cat /omnifs/dns/$domain/MX 2>/dev/null || echo "(no MX)"
done < domains.txt
Terminal window
# Compare what two resolvers return for a record
diff \
<(cat /omnifs/dns/@cloudflare/example.com/A) \
<(cat /omnifs/dns/@google/example.com/A)
TypeDescription
AIPv4 address
AAAAIPv6 address
MXMail exchange (priority + hostname)
NSAuthoritative nameservers
TXTText records (SPF, DKIM, verification)
CNAMECanonical name alias
SOAStart of authority
SRVService locator (priority, weight, port, target)

PTR records are available only through the /dns/_reverse/{ip}/PTR path.