Unable to connect with the android application (VPN)


I know my case maybe specific but for a paid application, it should be possible.
My phone is always connected through a VPN, the same VPN is hosting the owncloud server. So I have to enter the ip to connect to owncloud in https.
When I do, I have a message saying "secure connection is redirected through an unsecured route" because the certificate is for the fqdn and not the ip address, but I can't enter the fqdn because the route can't work that way.

And here I am, unable even to try the connexion. So I can't use the service AT ALL.

Why not use http in this case? As you are already secured by your VPN ...

1 Like

Simply because my server doesn't have http enabled for security purpose.

Anyway, I found a solution.
If you encounter the same problem, you have to edit the /etc/hosts of your phone or gateway so that the ip is linked to the FQDN.
In my case I had to add : mysite.com

That way owncloud can recognize the https as trusted.

1 Like

You can also just setup a local DNS on your server (e.g. BIND9 or even dnsmasq) and push that DNS server via OpenVPN to your phone. Nothing really ownCloud specific if you ask me. :slight_smile:

Thank you so much for sharing this solution. As it also working for me. Now I can easily run it.