![]() The optional -history switch writes your external IP address to a registry value whose name is the date/time the IP address was first detected as changed, to the key “HKEY_CURRENT_USER\SOFTWARE\Guy Leech\DynDNS\History” (unless you specify a different key via the -regkey option). It works, but the update interval would seem to be hardcoded to 25 days based on the system log (rc.dyndns.update: phpDynDNS (): No change in my IP address. The action for the scheduled task is to run “powershell.exe” and the command line is this where obviously you change the options to suit your account and the method you are using: -ExecutionPolicy Bypass -NoProfile -File "C:\Scripts\Update dynamic dns.ps1" -url -logfile c:\temp\dyndns.log -verbose -history The last method is a URL of the form which is similar to the second method but also passes the -username and -password arguments in the URL itself. This method needs authentication so -username and -password must be specified which will be those for your Dynamic DNS account. ![]() The second method is to specify a URL of the form where the “ hostname” will be replaced with the host name provided via the -hostname argument and “ ip” will be the external IP address discovered by the script. ![]() You get this URL from your provider and then just specify it on the command line to the script via the -url option. The easiest method to use is a randomized update token which is unique to your host name and does not need any authentication or passing of any other parameters. You can override this behaviour with the -force switch although by default it will send an update if the IP address hasn’t changed for 25 days anyway, although you can change the number of days with the -notupdated option. It can use one of three methods to update the registration by calling a URL although will not do so unless the IP address has changed as some providers can block you if you update too often. The script, available here, has been tested with FreeDNS although should work with other providers (I hope). Whilst there are plenty of client programs around for this, I’m a little paranoid about running relatively unknown software on my systems so I looked at the feasibility of doing it via a PowerShell script. If you use Dynamic DNS services like I do, then you are probably familiar with the need to keep your DNS record(s) updated with your external IP address. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |