FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
+2 votes
3,175 views 5 comments
by

Hi guys, 

Has anyone successfully configured DDNS with cloudflare on a RUT955 ?

I have tried the following paths:

  • with and without HTTPS
  • with and without hashed password (MD5)
  • with password and with API key

But no success... and no indication of the error in the logs :(

1 Answer

0 votes
by anonymous
Hello,

What firmware version are you using? There was an issue with DDNS, but it has been fixed in the new version.

You can download RUT9xx firmwares from here: https://wiki.teltonika.lt/index.php?title=RUT9xx_Firmware
Best answer
by anonymous

I am using RUT9XX_R_00.05.00.5 I will try the latest one at once  and follow up here

Thanks for the tip

by anonymous

I have upgraded the firmware version to the latest available from the server (RUT9XX_R_00.05.01.4) but the status of the DDNS remains to N.A

Hence I upgraded from the file (RUT9XX_R_00.05.01.8), but with no success neither.

I try 2 different configurations:

  • one with HTTPS and plain API key as password
  • one with HTTP and MD5 hashed API keys as password
The other fields are identical between the two configurations:
  1. Service: cloudflare.com-v4
  2. Lookup host: mydomain.com
  3. Hostname: mysubdomain.mydomain.com
  4. User name: the one of my cloudflare.com account
  5. IP address source: public
  6. URL to detect: http://checkip.dyndns.com (default value)
  7. IP renew interval: 5 minutes
  8. Force IP renew: 300 minutes

Any ideas ?

I am also lacking logs/feedback from the router itself... how could I get more information on the error/success ?

by anonymous

Moving forward...

I found the logs by connecting to the router with ssh root@192.168.1.1 (thanks https://wiki.teltonika.lt/index.php?title=Command_line_interfaces), and tail -f /var/log/ddns/*.*

The error comes from the nslookup which does not find anything for the lookup host (which did not have any DNS config for the root domain) : nslookup: can't resolve 'xxx.xx': Name or service not known

I have also been able to check that the API key shall not be encrypted with MD5. (otherwise I get the error {"code":6103,"message":"Invalid format for X-Auth-Key header"})

The final error was : Could not detect 'zone id' for domain.tld. I found the solution in https://community.cloudflare.com/t/ddns-api-not-working/22409. You need to declare the domain with mysubdomain@mydomain.com instead of mysubdomain.mydomain.com 

As a side note: the check box to use HTTPS is not taken into accout with cloudflare: the API uses https (which is good)

Hope this will help someone else.

by anonymous
That's great to hear! Also, thanks for sharing this!
by anonymous

Hi, I had similar issues, just 2 different findings:

I need to disable HTTPS ("Use HTTP Secure" option in web panel) in the settings, as it was causing this error "curl: (77) error setting certificate verify locations:  CAfile: /etc/cacert.pem CApath: none". Once disabled then the script go further...

And stuck on "code":6103,"message":"Invalid format for X-Auth-Key header" similar as ebreton. I've check the token a few times and all was ok, but could not authenticate successfully... Then I found this https://community.cloudflare.com/t/what-is-x-auth-key/203765. I've changed the script to provide "Authorization: Bearer" instead, with API token and it finally worked:). You would need to modify script /usr/lib/ddns/update_cloudflare_com_v4.sh and comment 1 line and add 1 new as below.

#__PRGBASE="$__PRGBASE --header 'X-Auth-Key: $password' "

__PRGBASE="$__PRGBASE --header 'Authorization: Bearer $password' "

Hope this helps with troubleshooting.