Skip to content

Instantly share code, notes, and snippets.

@surendharreddy
Created January 19, 2024 04:36
Show Gist options
  • Save surendharreddy/a393afa9998fdde74f1003a5a4254e78 to your computer and use it in GitHub Desktop.
Save surendharreddy/a393afa9998fdde74f1003a5a4254e78 to your computer and use it in GitHub Desktop.
DNS things
alias dnsa='function _dnsA(){ echo "$(dig +short A $1)"; };_dnsA' # Find A records for a domain
alias dnsc='function _dnsCNAME(){ echo "$(dig +short CNAME $1)"; };_dnsCNAME' # Find CNAME records for a domain
alias digr='function _digRedirect(){ echo "$(curl -Ls -o /dev/null -w %{url_effective} $1)"; };_digRedirect' # Find redirect URL for a domain
alias ip='ipconfig getifaddr en0' # Get local IP address
alias ipe='dig @resolver4.opendns.com myip.opendns.com +short' # Get external IP address
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment