Skip to content

Instantly share code, notes, and snippets.

@sdesalas
Created May 7, 2022 21:11
Show Gist options
  • Save sdesalas/682a8bafba4f2fd3f0c40594d70b7f10 to your computer and use it in GitHub Desktop.
Save sdesalas/682a8bafba4f2fd3f0c40594d70b7f10 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Roll your own DDNS
# Shell script to update namecheap.com dynamic dns
# for a domain to your external IP address
HOSTNAME=$MYSUBDOMAIN
DOMAIN=$MYDOMAIN
PASSWORD=$MYSECRETPASSWORD
IP=`curl -s ipecho.net/plain`
URL="https://dynamicdns.park-your-domain.com/update?host=$HOSTNAME&domain=$DOMAIN&password=$PASSWORD&ip=$IP"
echo curl $URL
curl $URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment