Skip to content

Instantly share code, notes, and snippets.

@furushchev
Created September 28, 2014 00:12
Show Gist options
  • Save furushchev/42c3e98ba4ec82f20483 to your computer and use it in GitHub Desktop.
Save furushchev/42c3e98ba4ec82f20483 to your computer and use it in GitHub Desktop.
Update No-ip DDNS
#!/bin/bash
if [ "$1" = "" ]; then
GLOBAL_IP=`curl -s ifconfig.me`
else
GLOBAL_IP=$1
fi
USERNAME=username
PASSWORD=password
HOSTNAME=hostname
echo "updating ip address to $GLOBAL_IP"
echo "curl http://$USERNAME:$PASSWORD@dynupdate.no-ip.com/nic/update?hostname=$HOSTNAME&myip=$GLOBAL_IP"
curl "http://$USERNAME:$PASSWORD@dynupdate.no-ip.com/nic/update?hostname=$HOSTNAME&myip=$GLOBAL_IP""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment