opnsense / plugins

OPNsense plugin collection
https://opnsense.org/
BSD 2-Clause "Simplified" License
832 stars 621 forks source link

dyndns: Static Virtual IPs are used #2557

Closed funnysyc closed 2 years ago

funnysyc commented 2 years ago

Important notices Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug Static Virtual IP is used instead of the dynamic interface IP in Dynamic DNS.

To Reproduce Steps to reproduce the behavior:

  1. Set the IPv6 configuration for 'LAN' to tracking to 'WAN'.
  2. Add an IPv6 IP alias for 'LAN'.
  3. Add a Dynamic DNS entry for 'LAN'.
  4. The domain resolves to the static IP alias.

Expected behavior The domain resolves to the dynamic interface IP that tracks to 'WAN'.

Screenshots Dynamic DNS configuration page

Domain status

Relevant log files

2021-10-02T22:29:39 opnsense[9195]  /usr/local/etc/rc.bootup: Dynamic DNS: (Success) IP Address Updated Successfully!    
2021-10-02T22:29:39 opnsense[9195]  /usr/local/etc/rc.bootup: Dynamic DNS (syc.dyn.***.net): fdce:***:7::1 extracted     
2021-10-02T22:29:39 opnsense[9195]  /usr/local/etc/rc.bootup: Dynamic DNS (syc.dyn.***.net): Current Service: custom-v6  
2021-10-02T22:29:39 opnsense[9195]  /usr/local/etc/rc.bootup: Dynamic DNS (syc.dyn.***.net): _checkStatus() starting.    
2021-10-02T22:29:30 opnsense[9195]  /usr/local/etc/rc.bootup: Dynamic DNS (syc.dyn.***.net via Custom (v6)): _update() starting.     
2021-10-02T22:29:30 opnsense[9195]  /usr/local/etc/rc.bootup: Dynamic DNS (syc.dyn.***.net): running dyndns_failover_interface for wan. found pppoe0     
2021-10-02T22:29:30 opnsense[9195]  /usr/local/etc/rc.bootup: Dynamic DNS (syc.dyn.***.net): fdce:***:7::1 extracted

Additional context I would like to use the IPv6 Delegated Prefix in dynv6, but OPNsense does not provide it, so I used the LAN interface IP which tracks the DP. It worked fine until I needed IPv6 ULA, which is configured through Virtual IPs.

Environment OPNsense 21.7.3_1-amd64 FreeBSD 12.1-RELEASE-p20-HBSD OpenSSL 1.1.1l 24 Aug 2021

Proxmox VE, VirtIO.

fichtner commented 2 years ago

Hi @funnysyc,

Fair enough. This problem has been haunting many components over the years, especially when dealing with IPv6.

The code used by DynDNS plugin is overly convoluted and unable to deal with excluding aliases, but core code already fixed these issues with new functions in the last 1-2 years. It’s not a quick fix but I think I can do something for 22.1 release here.

Cheers, Franco

funnysyc commented 2 years ago

That's good to know. But is there any workarounds at the moment?

Currently I'm running another DDNS client on a separate machine. To be clear, it works well, but it would be better if I can manage everything at the same place.

fichtner commented 2 years ago

This can only be solved in some sort of code change, but there is only one viable way of dealing with this technical debt: rewrite the whole IP address derivation to be able to exclude manually set virtual IPs.

Cheers, Franco

OPNsense-bot commented 2 years ago

This issue has been automatically timed-out (after 180 days of inactivity).

For more information about the policies for this repository, please read https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md for further details.

If someone wants to step up and work on this issue, just let us know, so we can reopen the issue and assign an owner to it.