Dynamic DNS through NO-IP: keeping your hosts current, and your NO-IP account happy.
Posted by jpluimers on 2015/05/19
Now that DynamicDNS moved itself to a fully payed service, named it DynDns Pro, then renamed it Remote Access and limiting it to 30 hosts for USD 25 a year, I looked for alternatives, and noticed NO-IP.
I like it for a few reasons:
- Far less pushy to get into higher payed services.
- Easy to navigate the DNS products they offer.
- Free for up to 3 hosts (but requires you to login at the web-site or change IP addresses every 30 days).
- Each 25 hosts costs about USD 20 per year (each new set of 25 hosts costs a little less per year).
OK, last year, there was this Microsoft Legal Action and Controversy, but I think that is a once time thing (some people even argue that Microsoft wasn’t thinking), so I created the last script below in PowerShell.
A few open-source scripts to keep your NO-IP account happy (that also work on most other DDNS providers like Duck DNS):
- (Perl) nathanejohnson/no-ip-update.
- (Python) drivard/update-noip.
- (Bash) mdmower/bash-no-ip-updater.
- (Bash) AntonioCS/no-ip.com-bash-updater.
- (Php) diversen/noiphp.
- (PowerShell) jeroenp / BeSharp.net / source / Scripts / NoIP — Bitbucket.
The first one does a form of WWW scraping, the others use the published API (which is the same API that DynDNS uses) over either https or http (which, since it includes credentials, you should never run over http).
If you use the published API and a free account, you have to change your IP address every 30 days, or apply the trick mentioned in Tech Geek Jay: No-IP Automatic Update Bash Script for Mac OS X or mdmower/bash-no-ip-updater does.
It is also wise to verify the IPv4 address is indeed a dotted quad like mentioned in random PC tips: Script for updating no-ip DDNS from behind the router; mdmower/bash-no-ip-updater does that as well.
I wrote the final one as I wanted the settings to be in an external file, and I wanted to do an exercise in PowerShell programming. There is a batch file front-end too.
These are the files (they require PowerShell 3.0 because of Invoke-WebRequest):
- Login-and-Update-NoIp.bat
- Login-and-Update-NoIp.ini
- Login-and-Update-NoIp.ps1 (of which BitBucket thinks it is binary, but it is a PowerShell script).
and they contain a lot of nice links in the comments:
- Use PowerShell to Work with Any INI File – Hey, Scripting Guy! Blog – Site Home – TechNet Blogs.
- PowerShell Script Get-IniContent.
- PowerShell Script: Out-IniFile.
- Expanding Strings And Environment Variables in PowerShell | Shay Levy.
- Parsing INI file based on INI file parsing in PowerShell – Stack Overflow.
- INI file format does not support trailing comments: Do standard windows .ini files allow comments? – Stack Overflow.
- How to remove double quotes on specific column from CSV file using Powershell script – Stack Overflow.
- PowerShell Magazine » #PSTip PowerShell and the pre-configured user agent strings.
- Scripts and scrapers: Powershell v3.0: Invoke-WebRequest.
- 864000 seconds in days.
–jeroen
northfield_systems/noip2.c at master · sweetonmac/northfield_systems « The Wiert Corner – irregular stream of stuff said
[…] Looks similar to what these do: Dynamic DNS through NO-IP: keeping your hosts current, and your NO-IP account happy. « The Wiert Co… […]