How To Post Your Dynamic Internal IP To DynDNS From Your Windows Machine
I looked around for an easier way to post an internal IP to DynDNS, but I didn’t find one. Scripting to the rescue.
If you have a paid account at DynDNS (may work for free ones too, I’m not sure), you can update a DNS entry by hitting a URL like this:
So, to update your DNS entry, you just need to get your IP alone in a variable that a batch file can use, then setup a task to request that URL every so often. In more detail, the steps are:
- Install Cygwin including the ‘curl’ package. Curl allows you to make web requests from the command line.
- Create a batch file that gets your IP then makes the DynDNS update request (see below).
- Create a new scheduled task through the Windows Control Panel: setup multiple schedules so it runs the batch file you created in step #2 at startup, login, and when the machine is idle 60 minutes.
The batch file is like so, be sure to update the curl location, DynDNS login, password, and hostname info before you use it: