ui/dyndns: os-ddclient: Add functionality to monitor gateway groups for failover support in multi-wan setups (IPv4/IPv6).
Important notices Before you add a new report, we ask you kindly to acknowledge the following:
- [X] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
- [x] I have searched the existing issues, open and closed, and I'm convinced that mine is new.
- [X] When the request is meant for an existing plugin, I've added its name to the title.
Is your feature request related to a problem? Please describe. Yes, this appears to be a limitation of the current/new dd-client plugin. When failover occurs in multi-wan, only one interface can be checked/monitored for a specific domain entry. So when a failover occurs, the failover device's IP is never detected, and the DNS entry still points to the failed WAN interface. Currently, the existing UI allows only supports the "check ip method" of "interfaces" for monitoring local changes.
Describe the solution you'd like Add functionality to monitor gateway groups for failover support in multi-wan setups. Add a new option to the "check ip method" for "gateway groups" to detect the active gateway's interface, and update the address(s) for both IPv4/IPv6.
Describe alternatives you've considered Have considered a custom shell script solution using cron to trigger an update to the /conf/config.xml, parsing out the correct nodes for <ddclient> and modifying the <interface> child nodes. Then triggering the command "configctl ddclient update". But this method would only seem to support IPv4 updating, and is also not safe method for updating (for me).
Additional context
I have the same issue. I also tried to add a second entry for the second WAN interface, but that is ending only in no global IP address detected, check config if warning persists in the logs and the second separate entry for the WAN2 is not updated.
I also checked https://github.com/opnsense/plugins/issues/2899.
After browsing a bit the source code I found out, that when selecting None as Interface the current active gateway is used, since the curl command to retreive the IP address from any service is used without the --interface parameter. Somehow None is a bit misleading in my eyes, since I thought that it's using no interface at all and that you have to select one.
Renaming None to Auto selection, Active Gateway or something similar would already help a lot.
https://github.com/opnsense/plugins/blob/466a2e18d1ebd6b1942229fc4fc1e92bad10ddd2/dns/ddclient/src/opnsense/scripts/ddclient/lib/address.py#L101-L108