Skip to content

Instantly share code, notes, and snippets.

@andreabreu-me
Forked from rtucker/setdnstarget.sh
Created September 21, 2017 23:28
Show Gist options
  • Save andreabreu-me/812562efdb27245319567e1cb7e26275 to your computer and use it in GitHub Desktop.
Save andreabreu-me/812562efdb27245319567e1cb7e26275 to your computer and use it in GitHub Desktop.
A one-liner to set a Linode DNS Manager target to your client's current public IP address
ssh you@yourlinode "wget -O - -q https://api.linode.com/?api_key=$LINODE_API_KEY\&api_action=domain.resource.update\&domainid=$DOMAINID\&resourceid=$RESOURCEID\&target=\`echo \$SSH_CLIENT | cut -d' ' -f1\`"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment