Project

General

Profile

Actions

Bug #11147

open

Domeneshop DynDNS IPv4 and IPv6

Added by Jostein Hove-Henriksen about 4 years ago. Updated 4 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Dynamic DNS
Target version:
-
Start date:
12/09/2020
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
Affected Architecture:

Description

When using both "Domeneshop" and "Domeneshop (v6)", the first one is overwritten by the last. and vice versa...

Don't know if the bug is on Domeneshop's or pfSense's side...

Actions #1

Updated by Jostein Hove-Henriksen about 4 years ago

Log (anonymized) :

Dec 9 16:49:09 check_reload_status 372 Syncing firewall
Dec 9 16:49:09 php-fpm 334 /services_dyndns_edit.php: Beginning configuration backup to https://acb.netgate.com/save
Dec 9 16:49:17 php-fpm 334 /services_dyndns_edit.php: End of configuration backup to https://acb.netgate.com/save (success).
Dec 9 16:49:17 php-fpm 334 /services_dyndns_edit.php: Dynamic DNS: updatedns() starting
Dec 9 16:49:18 php-fpm 334 /services_dyndns_edit.php: Dynamic DNS domeneshop-v6 (example.no): AAAA:BBBB:CCCC:: extracted from local system.
Dec 9 16:49:18 php-fpm 334 /services_dyndns_edit.php: Dynamic DNS (example.no): running get_failover_interface for wan. found bge0
Dec 9 16:49:18 php-fpm 334 /services_dyndns_edit.php: Dynamic DNS domeneshop-v6 (example.no): AAAA:BBBB:CCCC:: extracted from local system.
Dec 9 16:49:18 php-fpm 334 /services_dyndns_edit.php: Dynamic Dns (example.no): Current WAN IP: AAAA:BBBB:CCCC:: No Cached IPv6 found.
Dec 9 16:49:18 php-fpm 334 /services_dyndns_edit.php: DynDns (example.no): Dynamic Dns: cacheIP != wan_ip. Updating. Cached IP: :: WAN IP: AAAA:BBBB:CCCC:: Initial update.
Dec 9 16:49:18 php-fpm 334 /services_dyndns_edit.php: Dynamic DNS domeneshop-v6 (example.no): _update() starting.
Dec 9 16:49:24 php-fpm 334 /services_dyndns_edit.php: Response Header: HTTP/2 204
Dec 9 16:49:24 php-fpm 334 /services_dyndns_edit.php: Response Header: server: nginx
Dec 9 16:49:24 php-fpm 334 /services_dyndns_edit.php: Response Header: date: Wed, 09 Dec 2020 15:49:24 GMT
Dec 9 16:49:24 php-fpm 334 /services_dyndns_edit.php: Response Header:
Dec 9 16:49:24 php-fpm 334 /services_dyndns_edit.php: Response Header:
Dec 9 16:49:24 php-fpm 334 /services_dyndns_edit.php: Response Data:
Dec 9 16:49:24 php-fpm 334 /services_dyndns_edit.php: Dynamic DNS domeneshop-v6 (example.no): _checkStatus() starting.
Dec 9 16:49:24 php-fpm 334 /services_dyndns_edit.php:
Dec 9 16:49:39 check_reload_status 372 Syncing firewall
Dec 9 16:49:39 php-fpm 334 /services_dyndns_edit.php: Beginning configuration backup to https://acb.netgate.com/save
Dec 9 16:49:45 php-fpm 334 /services_dyndns_edit.php: End of configuration backup to https://acb.netgate.com/save (success).
Dec 9 16:49:45 php-fpm 334 /services_dyndns_edit.php: Dynamic DNS: updatedns() starting
Dec 9 16:49:46 php-fpm 334 /services_dyndns_edit.php: Dynamic DNS domeneshop (example.no): A.B.C.D extracted from local system.
Dec 9 16:49:46 php-fpm 334 /services_dyndns_edit.php: Dynamic DNS (example.no): running get_failover_interface for wan. found bge0
Dec 9 16:49:46 php-fpm 334 /services_dyndns_edit.php: Dynamic DNS domeneshop (example.no): A.B.C.D extracted from local system.
Dec 9 16:49:46 php-fpm 334 /services_dyndns_edit.php: Dynamic Dns (example.no): Current WAN IP: A.B.C.D Cached IP: 0.0.0.0
Dec 9 16:49:46 php-fpm 334 /services_dyndns_edit.php: DynDns (example.no): Dynamic Dns: cacheIP != wan_ip. Updating. Cached IP: 0.0.0.0 WAN IP: A.B.C.D
Dec 9 16:49:46 php-fpm 334 /services_dyndns_edit.php: Dynamic DNS domeneshop (example.no): _update() starting.
Dec 9 16:49:47 php-fpm 334 /services_dyndns_edit.php: Response Header: HTTP/2 204
Dec 9 16:49:47 php-fpm 334 /services_dyndns_edit.php: Response Header: server: nginx
Dec 9 16:49:47 php-fpm 334 /services_dyndns_edit.php: Response Header: date: Wed, 09 Dec 2020 15:49:47 GMT
Dec 9 16:49:47 php-fpm 334 /services_dyndns_edit.php: Response Header:
Dec 9 16:49:47 php-fpm 334 /services_dyndns_edit.php: Response Header:
Dec 9 16:49:47 php-fpm 334 /services_dyndns_edit.php: Response Data:
Dec 9 16:49:47 php-fpm 334 /services_dyndns_edit.php: Dynamic DNS domeneshop (example.no): _checkStatus() starting.
Dec 9 16:49:47 php-fpm 334 /services_dyndns_edit.php:

Actions #2

Updated by Jostein Hove-Henriksen about 4 years ago

Jostein Hove-Henriksen wrote:

When using both "Domeneshop" and "Domeneshop (v6)", the first one is overwritten by the last. and vice versa...

Don't know if the bug is on Domeneshop's or pfSense's side...

The bug is on Domeneshop's side... Or not a bug, just a lack of features...

To update more than one record, the you can use the REST API. https://api.domeneshop.no/docs/
make you own script... I'm doing this on a linux-box... proof of consept... testing... (Can someone show me how to get scripts running on pfsense...)

what i did made the A and AAAA record the normal way...

You need "domainID" and "recordID" (https://api.domeneshop.no/v0/domains/{domainId}/dns/{recordId})
"domainId" you find in the url of the admin interface ex: https://domene.shop/admin?id=123456...

to find the "recordID" i used this command:
curl https://username:passord@/api.domeneshop.no/v0/domains/123456/dns/

the printout should list some recordIDs... save them. To update AAAA record, with recordID of 45678 i used this command:

ipv6addr=$(curl -6 -s https://ip.seeip.org);curl -X PUT -H "Content-Type: application/json" -d '{"host": "@","ttl": 600, "type": "AAAA", "data": "'"$ipv6addr"'"}' https://username:passord@api.domeneshop.no/v0/domains/123456/dns/45678

So to update both ip4 and ipv6 the dyndns-script need complete rewrite :-(

Actions #3

Updated by Viktor Gurov about 4 years ago

This is Domeneshop bug, see https://api.domeneshop.no/docs/index.html#tag/ddns:
A DNS record for the given hostname will be created if it does not exist, or updated if it does. The record type (A or AAAA will automatically be detected).

Actions #4

Updated by Daniel T 4 months ago

Viktor Gurov wrote in #note-3:

This is Domeneshop bug, see https://api.domeneshop.no/docs/index.html#tag/ddns:
A DNS record for the given hostname will be created if it does not exist, or updated if it does. The record type (A or AAAA will automatically be detected).

This is not a bug. It was lack of documentation, since this has worked for years, but was not previously documented (which it is now):
https://api.domeneshop.no/docs/#tag/ddns/paths/~1dyndns~1update/get

If you want to add both A and AAAA-record, you put them in the same request like this:

https://{token}:{secret}@api.domeneshop.no/v0/dyndns/update?hostname=example.com&myip=127.0.0.1,2001:db8::1

With a single request for either a A- or AAAA-record (instead of both like above) it would not make sense to keep the previous IP, for example if you switched from pure IPv6 to IPv4 or vice versa.

Actions #5

Updated by Jostein Hove-Henriksen 4 months ago

Daniel T wrote in #note-4:

Viktor Gurov wrote in #note-3:

This is Domeneshop bug, see https://api.domeneshop.no/docs/index.html#tag/ddns:
A DNS record for the given hostname will be created if it does not exist, or updated if it does. The record type (A or AAAA will automatically be detected).

This is not a bug. It was lack of documentation, since this has worked for years, but was not previously documented (which it is now):
https://api.domeneshop.no/docs/#tag/ddns/paths/~1dyndns~1update/get

If you want to add both A and AAAA-record, you put them in the same request like this:

> https://{token}:{secret}@api.domeneshop.no/v0/dyndns/update?hostname=example.com&myip=127.0.0.1,2001:db8::1 >

With a single request for either a A- or AAAA-record (instead of both like above) it would not make sense to keep the previous IP, for example if you switched from pure IPv6 to IPv4 or vice versa.

The DynDNS service need to be rewritten... Who will do that?

Actions

Also available in: Atom PDF