DDNS (Freedns) upgrade script not working as expected.
Posted: Thu Aug 17, 2023 10:13 am
Hello,
I've tried to setup and automated DDNS update script when the PPPOE connection is up. I've read all the forums, and the old scripts (that mostly use tool fetch do not work any more due to permission issues.
Basically, to update the IP address at freedns, one must fetch the following URL:
In the old versions one would simply put in the PPOE profile, in the "on Up" section the fetch command and that's all.
But these seems to not work any more due to permission rights issues.
So now I did the following.
I created the following script and named it "freedns_update":
In the System -> Scripts section, for this script I've ticked all permissions (including 'test' and 'Don't require permissions')
In the PPOE scripts section, at "on Up" I've set to run it:
When the link comes up, it indeed runs the script, but never finishes.
It displays only:
but never gets to the line which logs:
I've also set up a Scheduler, to run this script every day, under System-> Scheduler:
This runs ok, every day I see in the log both entries from above and also the IP address is kept in sync.
Here I also see that the owner is "admin" and also under policy, I've ticked everything.
Below are the screenshots: What could be the problem ?
I've tried to setup and automated DDNS update script when the PPPOE connection is up. I've read all the forums, and the old scripts (that mostly use tool fetch do not work any more due to permission issues.
Basically, to update the IP address at freedns, one must fetch the following URL:
Code: Select all
https://freedns.afraid.org/dynamic/update.php?HASH_VALUE==
But these seems to not work any more due to permission rights issues.
So now I did the following.
I created the following script and named it "freedns_update":
Code: Select all
:log info ("Freedns IP address update started");
:delay 10;
:resolve freedns.afraid.org
:delay 10;
/tool fetch url="https://freedns.afraid.org/dynamic/update.php?HASH_VALUE==" keep-result=no
:log info ("Freedns IP address updated");
The closest I got is the following:
In the PPOE scripts section, at "on Up" I've set to run it:
Code: Select all
/system script run "freedns_update"
It displays only:
Code: Select all
"Freedns IP address update started"
Code: Select all
"Freedns IP address updated"
Code: Select all
/system script run freedns_update
Here I also see that the owner is "admin" and also under policy, I've ticked everything.
Below are the screenshots: What could be the problem ?