Skip to content

Instantly share code, notes, and snippets.

@neilmillard
Forked from diegopacheco/aws-dns-route53-dig.md
Created January 6, 2016 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neilmillard/d76b4558877456dea99c to your computer and use it in GitHub Desktop.
Save neilmillard/d76b4558877456dea99c to your computer and use it in GitHub Desktop.
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