Open lozbrown opened 4 years ago
@lozbrown Just verified its still working on the latest version. Please ask your provider to turn on the "Advanced Zone Editor" feature.
Awesome, cheers.
i updated this to ensure i was using the same version as you and now i get a strange error
> loz@gravity:~$ /home/loz/.cpanel-dynamic-dns.sh
> ==
> == cPanel Dyanmic DNS Updater 2.1
> ==
> == Updating domain home.protazoa.com
> ==
> == /etc/cpdyndns.conf does not exist
> == /home/loz/etc/cpdyndns.conf does not exist
> ==
> Determining IP Address...82.13.254.<REDACTED>...Done
> Fetching zone for protazoa.com....
> GET /json-api/cpanel?cpanel_jsonapi_module=ZoneEdit&cpanel_jsonapi_func=fetchzone&cpanel_jsonapi_apiversion=2&domain=protazoa.com HTTP/1.0
> Connection: close
> Authorization: Basic cHJvdGF6b2E6SX<REDACTED>
> User-Agent: cpanel-dynamic-dns 2.1
>
>
> Request Results malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "(end of string)") at -e line 2.
> malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "(end of string)") at -e line 2.
> malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "(end of string)") at -e line 2.
> Request failed with error: Unknown Error (Please make sure you have the zoneedit, or simplezone edit permission on your account.)
> skipping notification because a notication was sent 7930 seconds ago.
>
you'll note i added say "\n $REQUEST"
At tline 190 to see the request
@lozbrown As this isn't something we can investigate without disclosing details about your account, please open a support request at https://tickets.cpanel.net/submit/
You are probably getting this error response:
{"cpanelresult":{"apiversion":"2","error":"Token denied","data":{"reason":"Token denied","result":"0"},"type":"text"}}
Dont think this works.
Have you tried the new version in v92: https://docs.cpanel.net/cpanel/domains/dynamic-dns/?
I have seen it but I have no means of setting the value (of my home router) automatically given I would like the subdomain to point to my local machine and not the cPanel server.
That UI will generate a url with a token that you can call from your home router that will automatically update the sub domain ip when you call it from your home. You can add something like
curl https://yourdomain.tld/cpanelwebcall/token
to a cron job.
That UI will generate a url with a token that you can call from your home router that will automatically update the sub domain ip when you call it from your home. You can add something like
curl https://yourdomain.tld/cpanelwebcall/token
to a cron job.
Indeed that is what I am looking at now.
Also previous correction: the extract_from_json
seems to be failing in the original code cause the data returned is "valid".
That UI will generate a url with a token that you can call from your home router that will automatically update the sub domain ip when you call it from your home. You can add something like
curl https://yourdomain.tld/cpanelwebcall/token
to a cron job.
Very good btw, thank you!
I was just advised that the new DynDNS feature in cPanel does not work with shared hosts. It requires VPS or Dedicated server. The webcall URL spits a 404.
Anyone else have any experience with this? Thanks.
I was just advised that the new DynDNS feature in cPanel does not work with shared hosts. It requires VPS or Dedicated server. The webcall URL spits a 404.
Anyone else have any experience with this? Thanks.
Did you ever find a solution to this? I too have shared host service and cannot get around 404 issue for my ddns update url.
This recently stopped working for me and that may have coincided with my hosting provider updating cpanel.
It looks like this might use the old cPanel Simple zone editor which is deprecated in recent version.
@ColMelvin @sfbee @bdraco @bk2204 ?
This is an incredibly useful tool I'll be lost without,