Dynamic DNS scripts

If you have reached this point to set up your Dynamic DNS scripts, then we suppose you have already created your DNS zone and A records as well. If not, please take a look at our previous article Getting Started with Dynamic DNS for more information regarding this matter.

How to download the scripts?

The scripts can be downloaded from the Dynamic URL pop-up of your A record. You can use Perl, PHP, or Python, depending on your personal preferences.

How to use the Perl script?

Typically, Windows or other operating systems don’t have Perl installed by default. You could use the Strawberry Perl which is a distribution of the Perl programming language for the Microsoft Windows platform. You can download and install Strawberry Perl from here. For other operating systems you need to download Pearl depending on the system.

Once you have the Perl installed on your machine, you will need to configure a Schedule Task to run the script on relevant time intervals. To do so, click on Create Task from the right-side panel and fill in some Name and Description. Then click on the Triggers tab. Add the time you want the script to be executed. It can be executed every single minute even, but it's not recommended. Finally, click on the Actions tab and for Program/Script fill in perl, and for Arguments fill in the path to the Perl script.

After it's configured you can wait for it to execute or run it yourself by clicking on the Run button at the right sidebar. Then go check, if the IP has changed.

How to use the Python script?

As you can guess, you must have Python installed on your machine in order to use the Python script. You can download and install Python from here.

Once installed, you need to configure a Schedule Task by following the same steps required for the Perl script. In the nutshell for Windows, go to Control Panel > All Control Panel Items (or System and Security) > Administrative Tools > Task Scheduler. Click on Create Task. Fill in some Name and Description. Add the time you want the script to be executed. Finally, click on the Actions tab and for Program/Script fill in python, and for Arguments fill in the path to the Python script. And that’s all, “easy peasy”.

After it's configured you can wait for it to execute or run it yourself by clicking on the Run button at the right sidebar.

How to use the PHP script?

First thing first, you must have PHP installed on your device. There are some all-in-one distributions that contain Apache, PHP, MySQL, and other applications in a single installation file, e.g. XAMPP. There is nothing wrong with using these packages, but if your computer is not used for development purposes, you will probably not need all this stuff. In this case, you could download only the php installer from here.

Similarly to the other script above, go to Control Panel > All Control Panel Items (or System and Security) > Administrative Tools > Task Scheduler. Give it a Name and Description (optional) for your task. Set the time-frame interval for your script executions. From the Actions tab fill in php at the Program/Script form and for Arguments fill in the path to the PHP script. And that's pretty much all you need to set. Easy, isn't it!

After it's configured you can wait for it to execute or run it yourself by clicking on the Run button at the right sidebar


Last modified: 2024-11-07
Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more