I have a Nextcloud server on my LAN (with an external port forward for outside access) that I am setting up WebDav connections on for a collection of Windows 10 PCs and I want the users to make their WebDav connections over the LAN/VPN when they are in the office but then fall back to the external IP of the subdomain that DNS resolves for the connection when they are outside of the LAN/VPN. In short I want to conditionally override the DNS resoution for a single address based on how the users is connected. I hope this makes sense.
I'm using a Sonicwall for our LAN/VPN bridge, but it only looks like my only option is to setup a seperate Proxy server which I don't have the option for. I've looked at Proxy.pac, but again that looks like I need to have a Proxy server in the mix. I've also considered some kind of conditional HOSTS file approach but the users don't run the VPN client when they are on-site in the office so having the VPN client swap HOSTS files when active isn't really an option.
Does anyone have ideas on how to tackle this problem and if there is already a dupe answer for something like this, please feel free to point me there. I couldn't find one in my search.