Project

General

Profile

Actions

Bug #12590

closed
DE VG

Dynamic DNS custom IPv6 service fails on 6rd tunnels

Bug #12590: Dynamic DNS custom IPv6 service fails on 6rd tunnels

Added by Daniel Engel over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Viktor Gurov
Category:
Dynamic DNS
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
22.05
Release Notes:
Default
Affected Version:
2.5.2
Affected Architecture:
arm64

Description

I use a "Custom" DDNS service to register my dynamic home IP address as a subdomain of my dedicated server domain. Thus, I administer both ends of the DDNS system.

My dynamic home IP address supports both IPv4 and IPv6, so I have both "Custom" and "Custom-v6" services configured in pfSense. However, my dedicated server host only supports IPv4, so I have the "Force IPv4 DNS Resolution" option enabled (checked) in the "Custom-v6" service. (My remote DDNS web service supports setting both "A" and "AAAA" records over IPv4).

Unfortunately, "Custom-v6" DDNS service updates always fail. According to the pfSense logs, the remote web server does not respond (no header/data) (actually, the remote web server logs do not show any incoming requests):

Dec 13 01:01:02     php     22089     rc.dyndns.update: Dynamic DNS custom-v6 (): 2602:xx:xxxx:xxxx:: extracted from local system.
Dec 13 01:01:02     php     22089     rc.dyndns.update: Dynamic DNS (): running get_failover_interface for wan_stf. found wan_stf
Dec 13 01:01:02     php     22089     rc.dyndns.update: Dynamic DNS custom-v6 (): 2602:xx:xxxx:xxxx:: extracted from local system.
Dec 13 01:01:02     php     22089     rc.dyndns.update: Dynamic Dns (): Current WAN IP: 2602:xx:xxxx:xxxx:: Cached IPv6: 2602:yy:yyyy:yyyy::
Dec 13 01:01:02     php     22089     rc.dyndns.update: DynDns (): Dynamic Dns: cacheIP != wan_ip. Updating. Cached IP: 2602:yy:yyyy:yyyy:: WAN IP: 2602:xx:xxxx:xxxx::
Dec 13 01:01:02     php     22089     rc.dyndns.update: Dynamic DNS custom-v6 (): _update() starting.
Dec 13 01:01:02     php     22089     rc.dyndns.update: Sending request to: https://example.com/ddns/update6.php?ip=2602:xx:xxxx:xxxx::
Dec 13 01:01:02     php     22089     rc.dyndns.update: Response Header:
Dec 13 01:01:02     php     22089     rc.dyndns.update: Response Data:
Dec 13 01:01:02     php     22089     rc.dyndns.update: Dynamic DNS custom-v6 (): _checkStatus() starting.
Dec 13 01:01:02     php     22089     rc.dyndns.update: phpDynDNS (): (Error) Result did not match. [] 

Investigating, I found that pfSense is sending the update request in IPv4 protocol (as intended) on an IPv6 interface (oops). For reference, the DDNS protocol is overridden in /etc/inc/dyndns.class:

    case 'custom':
    case 'custom-v6':
        if ($this->_curlIpresolveV4) {
            curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
        }

I have a workaround that forces the 'requestif' to retain the IPv4 interface name if the "Force IPv4 DNS Resolution" option is enabled:

--- services_dyndns_edit.php.old        2021-12-13 17:09:05.793154000 -0800
+++ services_dyndns_edit.php    2021-12-13 15:00:28.599731000 -0800
@@ -205,7 +205,7 @@
                // Trim hard-to-type but sometimes returned characters
                $dyndns['resultmatch'] = trim($_POST['resultmatch'], "\t\n\r");
                ($dyndns['type'] == "custom") ? $dyndns['requestif'] = $_POST['requestif'] : $dyndns['requestif'] = $_POST['interface'];
-               if (($dyndns['type'] == "custom-v6") && is_stf_interface($_POST['requestif'])) {
+               if (($dyndns['type'] == "custom-v6") && !$dyndns['curl_ipresolve_v4'] && is_stf_interface($_POST['requestif'])) {
                        $dyndns['requestif'] = $_POST['requestif'] . '_stf';
                } else {
                        $dyndns['requestif'] = $_POST['requestif'];

However, I am not sure this workaround is a complete fix, since there may be other WAN naming conventions besides mine.


Related issues 1 (0 open1 closed)

Related to Bug #9641: Dynamic DNS cannot update AAAA records on 6rd tunnel interfaces bound to PPPoE interfacesResolvedRenato Botelho07/21/2019

Actions

VG Updated by Viktor Gurov over 4 years ago Actions #1

  • Related to Bug #9641: Dynamic DNS cannot update AAAA records on 6rd tunnel interfaces bound to PPPoE interfaces added

JP Updated by Jim Pingle over 4 years ago Actions #3

  • Status changed from New to Pull Request Review
  • Assignee set to Viktor Gurov
  • Target version set to CE-Next
  • Plus Target Version set to 22.05

VG Updated by Viktor Gurov over 4 years ago Actions #4

  • Status changed from Pull Request Review to Feedback

Merged

JP Updated by Jim Pingle over 4 years ago Actions #5

  • Target version changed from CE-Next to 2.7.0

JP Updated by Jim Pingle over 4 years ago Actions #6

  • Subject changed from DDNS custom IPv6 service fails on 6rd tunnel to Dynamic DNS custom IPv6 service fails on 6rd tunnels

Updating subject for release notes.

JP Updated by Jim Pingle over 4 years ago Actions #7

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom