- July 2010 (1)
- June 2010 (4)
- May 2010 (3)
- April 2010 (6)
- March 2010 (6)
- February 2010 (8)
- January 2010 (13)
- December 2009 (4)
- October 2009 (2)
- September 2009 (1)
Updating Namecheap DDNS using BASH, CURL, and good 'ol know how.
I have a server at home that I use to do snapshot style backups using rsync. As such, I'd like to be able to connect to it from time to time when not at home. This is a simple way to update your Dynamic DNS with NameCheap.
Create a file called ddns and place it in /etc/cron.daily and set the permissions to 700
#!/bin/bash # Update NameCheap DDNS # Disclaimer: I have no affiliation with jackson.io, it may not work when you read this. # It's just fetching your URL as plain text. If you had a webserver it would be simple # to write your own whatismyip service. IP=$(exec wget -q -O - <a href="http://jackson.io/ip/" title="http://jackson.io/ip/">http://jackson.io/ip/</a>) curl -s -o temp.html "http://dynamicdns.park-your-domain.com/update?domain=YOURDOMAINNAME&password=YOURVERYLONGPASSWORDFROMNAMECHEAP&host=YOURHOSTNAME&ip=${IP}"
You'll want to change some of the variables in the long URL. After that, it will update NameCheap DDNS on a nightly basis. No more need for a static IP.
Comments
Post new comment