Project

General

Profile

Bug #9602

Dynamic DNS with DigitalOcean not working

Added by Alfonso Pinto about 1 year ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Category:
Dynamic DNS
Target version:
Start date:
06/26/2019
Due date:
% Done:

100%

Estimated time:
Affected Version:
Affected Architecture:

Description

After activating Dynamic DNS for Digital Ocean, I see this in the logs:

Jun 26 19:43:30 
php-fpm 
1403 
/services_dyndns_edit.php: Dynamic DNS: updatedns() starting 
Jun 26 19:43:30 
php-fpm 
1403 
/services_dyndns_edit.php: 
Jun 26 19:43:30 
php-fpm 
1403 
/services_dyndns_edit.php: Dynamic DNS digitalocean (@): 82.213.208.103 extracted from local system. 
Jun 26 19:43:30 
php-fpm 
1403 
/services_dyndns_edit.php: Dynamic DNS (@): running get_failover_interface for wan. found igb0.20 
Jun 26 19:43:30 
php-fpm 
1403 
/services_dyndns_edit.php: Dynamic DNS digitalocean (@): 82.213.208.103 extracted from local system. 
Jun 26 19:43:30 
php-fpm 
1403 
/services_dyndns_edit.php: Dynamic Dns (@): Current WAN IP: 82.213.208.103 No Cached IP found. 
Jun 26 19:43:30 
php-fpm 
1403 
/services_dyndns_edit.php: DynDns (@): Dynamic Dns: cacheIP != wan_ip. Updating. Cached IP: 0.0.0.0 WAN IP: 82.213.208.103 Initial update. 
Jun 26 19:43:30 
php-fpm 
1403 
/services_dyndns_edit.php: Dynamic DNS digitalocean (@): _update() starting. 
Jun 26 19:43:32 
php-fpm 
1403 
/services_dyndns_edit.php: Dynamic DNS digitalocean (@): _checkStatus() starting. 
Jun 26 19:43:32 
php-fpm 
1403 
/services_dyndns_edit.php: phpDynDNS (@): PAYLOAD: {"id": "internal_server_error", "message": "Server was unable to give you a response." } 
Jun 26 19:43:32 
php-fpm 
1403 
/services_dyndns_edit.php: phpDynDNS (@): (Unknown Response)

Associated revisions

Revision fe7a2304 (diff)
Added by karlhaworth 7 months ago

DigitalOcean DynDNS description update. Close #9602

The description for DigitalOcean dynamic DNS is incorrect. The documentation currently states to "Enter @ as the hostname to indicate an empty field" but that produces errors since the DigitalOcean record ID is missing. Instead the user should look up their record ID and insert that record ID into the hostname field.

https://redmine.pfsense.org/issues/9602

Revision 68bd425e (diff)
Added by karlhaworth 7 months ago

DigitalOcean DynDNS description update. Close #9602

The description for DigitalOcean dynamic DNS is incorrect. The documentation currently states to "Enter @ as the hostname to indicate an empty field" but that produces errors since the DigitalOcean record ID is missing. Instead the user should look up their record ID and insert that record ID into the hostname field.

https://redmine.pfsense.org/issues/9602
(cherry picked from commit fe7a23049566a1298e57bb14e9aa569ac8aa9009)

History

#1 Updated by Crusty Cheeze 7 months ago

I got this same message.

The information inside pfsense is bad. "Cloudflare and DigitalOcean: Enter @ as the hostname to indicate an empty field." is incorrect. Hostname must not be the AT symbol. (Cannot type character on phone for some odd reason)

In the hostname field you need to type the A record ID that you can get using the curl command below. You MUST replace the MY_API_KEY with your API key and MYDOMAIN.com with your domain. It'll return with all your dns records and the IDs associated. In the Domain Name field you type your domain name.

curl -X GET -H 'Content-Type: application/json' -H 'Authorization: Bearer MY_API_KEY' "https://api.digitalocean.com/v2/domains/MYDOMAIN.com/records"

I figured this out by checking out lines 1014-1047 in https://github.com/pfsense/pfsense/blob/5ae31b9e979b28fd4fa3087301dc81298147d905/src/etc/inc/dyndns.class and looking at how the API request was done. I also looked up the DigitalOcean API docs to see what was required in the request.

Attached screenshot of my settings

#3 Updated by Jim Pingle 7 months ago

  • Status changed from New to Pull Request Review
  • Target version set to 2.5.0

#4 Updated by Renato Botelho 7 months ago

  • Status changed from Pull Request Review to Feedback
  • Assignee set to Renato Botelho
  • Target version changed from 2.5.0 to 2.4.5
  • % Done changed from 0 to 100

PR has been merged. Thanks!

#5 Updated by Jim Pingle 6 months ago

  • Status changed from Feedback to Resolved

Not a service we can test internally, and no response from OP or other consumers of the service in question, so closing. Can revisit in a new issue if there are problems with the change.

Also available in: Atom PDF