platon-dns CLI
platon-dns
is a CLI to view and manage DNS records in our AWS Route 53 DNS zones.
Getting started
Before you can run this command, you need to be logged into Vault. See the Vault documentation for more details.
This command is installed on system-utils.uninett.no
.
To run the command, connect to system-utils.uninett.no
using SSH and log into Vault:
vault login -method=oidc mount=microsoft
Once you have logged into Vault, you can use the command:
$ platon-dns
usage: platon-dns [-h] [--debug] [--verbose] command ...
platon-dns: error: the following arguments are required: command
Available commands
Run platon-dns --help
for a list of available commands.
List DNS records
platon-dns list <ZONE>
lists DNS records in a zone:
$ platon-dns list cn.uninett.no
cn.uninett.no. 172800 NS ns-47.awsdns-05.com.
cn.uninett.no. 172800 NS ns-1615.awsdns-09.co.uk.
cn.uninett.no. 172800 NS ns-1154.awsdns-16.org.
cn.uninett.no. 172800 NS ns-969.awsdns-57.net.
cn.uninett.no. 900 SOA ns-47.awsdns-05.com. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400
imapsync2.cn.uninett.no. 1800 AAAA 2001:700:0:4540:21d:d8ff:feb7:64ad
imapsync3.cn.uninett.no. 1800 AAAA 2001:700:0:4540:21d:d8ff:feb7:6c3d
[...]
Add DNS record
platon-dns add <NAME> <TYPE> <VALUE>
adds a DNS record.
$ platon-dns add exampledomain.cn.uninett.no CNAME localhost
$ platon-dns list cn.uninett.no | grep exampledomain
exampledomain.cn.uninett.no. 900 CNAME localhost.
To set the TTL of the record, specify the --ttl
command line option:
$ platon-dns add --ttl 60 exampledomain.cn.uninett.no CNAME localhost
$ platon-dns list cn.uninett.no | grep exampledomain
exampledomain.cn.uninett.no. 60 CNAME localhost.
Remove DNS record
platon-dns remove <NAME> <TYPE> <VALUE>
removes a DNS record.
$ platon-dns remove exampledomain.cn.uninett.no CNAME localhost
Running platon-dns locally
You can also install and run platon-dns
locally.
See the project README.md for details.