DDNS to update my real IP address on a VPN connected device

A bit complicated scenario:

  • I use my SBC remotely for off-site backup purposes. The SBC is connected to my main location via VPN
  • Now I want to have a backup option to reach the SBC in case the VPN fails for wathever reason.
  • I was thinking of SSH access that would be allowed only for the static IP address of my main location for security reasons. This works, until the IP address at the location changes.

Here comes the issue: as the SBC is connected via VPN, the DDNS script sees the VPN address as the WAN, and updates the IP to that address. Now obviously I want the SBC’s local WAN address to be exposed.
The question is how? Maybe there could be a solution to stop the VPN before updating the DDNS IP address, then automatically reconnect? Or is there any other way how to get the “real” WAN IP of the device?

There is no other device on that network I could use for DDNS update.