Project

General

Profile

Actions

Bug #7719

closed

Dynamic DNS updates not working on interface failover

Added by Jorge Albarenque about 4 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Category:
Gateways
Target version:
Start date:
07/24/2017
Due date:
% Done:

100%

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

Description

I realized that dynamic DNS hostnames are not being updated on interface failover. When manually marking a gateway as "down" everything works fine, but not when the interface actually goes down on its own. I think I tracked down the root cause:

When an interface in a gateway group fails, and this gateway group is tied to a dynamic DNS configuration, rc.dyndns.update is called with the user defined interface name as a parameter.

Within that script, lookup_gateway_interface_by_name() converts the user defined name to the friendly interface name (eg "wan") and this is passed to services_dyndns_configure()

The problem is that services_dyndns_configure() looks designed to accept not the friendly interface name ("friendlyiface") but the real interface name ("interface"), since it ends up comparing to the 'interface' item of return_gateway_groups_array()

In my case, for example, executing:

services_dyndns_configure(wan)

on the PHP console does not do anything, while

services_dyndns_configure(bge_vlan1)

triggers the proper dynamic DNS update.

---
On the other hand, when you manually mark a gateway as down, the script is set to refresh all configs and that's why it works fine:

Jul 24 17:46:34 check_reload_status Updating all dyndns
---

I know this has previously worked at some point, so I don't know if this is a regression, or when it occured.

Actions #1

Updated by Riccardo Di Sarcina about 4 years ago

Maybe related to Bug #7101?
Problem still present with pfSense 2.3.4-RELEASE-p1 (amd64)

Actions #2

Updated by Jorge Albarenque about 4 years ago

Yes, it looks like the same root cause to me.

Has anyone from the dev team seen these?

Actions #3

Updated by Jim Pingle about 4 years ago

  • Category set to Gateways
  • Priority changed from High to Normal
  • Target version changed from 2.3.4-p2 to 2.4.0

See also: #7101, #7798

Actions #4

Updated by Renato Botelho about 4 years ago

  • Assignee set to Renato Botelho
Actions #5

Updated by Renato Botelho about 4 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #6

Updated by Renato Botelho about 4 years ago

  • Status changed from Feedback to Resolved

Works

Actions #7

Updated by Steven Perreau over 3 years ago

I was pleaeed to see this bug get reported and reported as fixed, but Dynamic DNS for me in multiple sites simply doesn't work with 2.4.2-p1 and earlier.

We have pfSense clustered in mutiple sites, with WAN1 and WAN2 and WANGROUP as the gateway group.
We have a LAN and multiple subnets accessible via a layer 3 switch on the LAN subnet, referenced via static routes in pfSense pointing to a LANrouter.
However, DDNS on WAN1 failure never ever updates and thus is useless.
It sits foever with red text for the DDNS IP address on the status page , it's bound to the WAN gateway group WANGROUP but somehow never updates.
Each WAN1 and WAN2 has unique DNS servers set and in all other aspects work fine, except of course DDNS.

Actions #8

Updated by Steven Perreau over 3 years ago

I have tested Dynamic DNS on 2.4.3 to see if dynamic DNS would finally work for the several multi WAN with HA sites we run.

My latest testing on 2.4.3 still has dynamic DNS not working. Dynamic DNS is bound to a gateway group. On failing WAN1, DDNS entry on the dashboard goes red, but, DDNS never updates to WAN2. Of course WAN1 and WAN2 have appropriate and unique DNS servers set, etc.

I wonder if the issue is:

My gateway group consists of 2 CARP entries, WAN1 carp and WAN2 carp and I wonder wonder wonder if that's why ddns just never updates!

Actions #9

Updated by Chris Linstruth over 3 years ago

This is working fine for me both on my edge and in my lab HA setup using he.net DDNS. You might want to take your configuration to the forum and see if you can determine what is peculiar about your setup. Turn on logging and see what it says.

Actions

Also available in: Atom PDF