Project

General

Profile

Bug #7719

Dynamic DNS updates not working on interface failover

Added by Jorge Albarenque over 2 years ago. Updated over 1 year ago.

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

100%

Estimated time:
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.

Associated revisions

Revision 46583aba (diff)
Added by Renato Botelho about 2 years ago

Fix #7719

When Dynamic DNS entry uses a gateway group as interface,
return_gateway_groups_array() will be called and it returns real
interface instead of friendly name, as expected. Take both friendly and
real interface name into consideration.

Revision 17058e37 (diff)
Added by Renato Botelho about 2 years ago

Fix #7719

When Dynamic DNS entry uses a gateway group as interface,
return_gateway_groups_array() will be called and it returns real
interface instead of friendly name, as expected. Take both friendly and
real interface name into consideration.

Revision 48c4a0ea (diff)
Added by Jim Pingle about 2 years ago

Fix incorrect function name/typo. Ticket #7719

Revision 271fc45e (diff)
Added by Jim Pingle about 2 years ago

Fix incorrect function name/typo. Ticket #7719

(cherry picked from commit 48c4a0ea0958c0820f6caab2bf5182967114ac58)

History

#1 Updated by Riccardo Di Sarcina about 2 years ago

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

#2 Updated by Jorge Albarenque about 2 years ago

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

Has anyone from the dev team seen these?

#3 Updated by Jim Pingle about 2 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

#4 Updated by Renato Botelho about 2 years ago

  • Assignee set to Renato Botelho

#5 Updated by Renato Botelho about 2 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

#6 Updated by Renato Botelho about 2 years ago

  • Status changed from Feedback to Resolved

Works

#7 Updated by Steven Perreau over 1 year 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.

#8 Updated by Steven Perreau over 1 year 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!

#9 Updated by Chris Linstruth over 1 year 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.

Also available in: Atom PDF