I have personal webserver with ownCloud installed. This webserver has no public IP address because my internet connection does not offer it. I ordered virtual linux webserver with a public IP address and I use it just for port forwarding via SSH to allow my ownCloud server be accessible from the internet. Everything works fine and I am accessing the ownCloud via a hostname - example: "mytunneledowncloud.com".
But as I have limited high speed data on my internet connection, I would like to save some data by synchronizing ownCloud via LAN private IP address when I am at home and not via ssh tunneled public ip address of my virtual server. I am thinking whether this is even possible. I would need to resolve "mytunneledowncloud.com" as:
- private ip address - in case I am on home LAN
- public ip address - in case I am not on home LAN
To be honest, I know this is a bit "ridiculous" request, but maybe there is some "workaround" for it.
Note: I use Ubuntu on all my servers and PCs.