Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AWS Route53 Fun with DNS: dig & cli53

How to Install on CentOs?

sudo yum install -y bind-utils
pip install cli53

Figureout the box name?

/opt/aws/bin/ec2-metadata | grep 'public-hostname:' | cut -d ' ' -f 2

Commands

dig redhat.com
dig redhat.com +nocomments +noquestion +noauthority +noadditional +nostats
dig redhat.com +noall +answer
Queries
dig redhat.com NS +noall +answer
dig -t NS redhat.com +noall +answer
dig redhat.com +short
dig -x 209.132.183.81 +short

Register DNS

cli53 list
cli53 rrcreate "DNS_ZONE_ID" "NAME" CNAME "HOSTNAME.AWS_AZ.compute.amazonaws.com" --replace --ttl "60"
cli53 rrcreate "DNS_ZONE_ID" "NAME" TXT "1 2 3 4" --replace --ttl "60"
Resources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment