Problem with dynamic DNS and trusted domain

9.1.x
help

#1

Hi everybody,

I have a freenas home server, with owncloud 9.1 installed. I configured a dynamic DNS service to access to owncloud from the Internet. But I have a problem, because my domain (public IP is kept updated by a router) only redirect me to my home's public IP (trough a reserved port) . So every time that the public ip changes I get the message "add" [public Ip:port] as a trusted domain? ". And when I'm not connected to my home local network I can't add the new public IP to the config.php file. I tried to mask the IP of the redirection in the setup of dynamic DNS service and add the domain "owncloud.example.com" to the config.php file but then if I try to connect to owncloud, I only see a blank page in the browser, probably because of the ip masking turned on in the dynamic DNS service configuration. How do you think I can solve this problem?

Thank you for the answers!


#2

Any chances that you're using http://publicip/owncloud for accessing your oC instance but http://owncloud.example.com for the dynamic DNS?


#3

To access I use something like http://mydomain.example.com . Once that I put this address in my browser, I am redirected to https://mypublicip:port and there I see the login page of Owncloud. Everything works great until the public IP is being refreshed by my provider. Then if I try to access remotely via mydomain.example.com I am still redirected to mypublicip:port but I can't see the login form; only the message "Add mypublicip:port as trusted domain" . If I open the link it sends me to the local IP of owncloud in my LAN (192.168.1.8), that is recognized as trusted, but naturally I can't access via internal IP while I'm away from home. I tried to solve the problem masking the redirection in my dynamic DNS provider settings and adding mydomain.example.com in the conf.php list of trusted domains . So I would only see mydomain.example.com in the browser bar and not mypublicip:port. I though it worked fine, but for unknown reasons if I activate the masking of address redirection in the control panel of DDNS service when I go to mydomain.example.com I only see a blank page, without anything. If I disable masking everything starts to work again.
I just can't find the way to get out of this trouble. To have the possibility to disable trusted domain would be a really great feature in own cloud. It is very annoying to be unable to block this service.

Thank for support!


#4

This is a dynamic redirection. For a dynamic DNS your address would be https://example.org:port/ and you should not use the redirection.


#5

Uhm.. and how can I configure it in my DDNS provider's control panel? Because I think that the only possibility I have is just DDNS redirection. But I can't get the difference: wouldn't the problem rest without using the redirection?


#6

Hi,

thats really something you should read in the FAQ or manual of your DDNS provider. The issue mentioned above will be gone if you're using Dynamic DNS hostname instead of a redirect.


#7

dynDNS: You use https://example.org:port/ into your browser, your browser will search the IP for example.org an then requests at the ip:port the content of https://example.org:port/. So your webserver knows the domain-name and port use to access different virtualHosts (when several domains are used on the same ip) and the associated scripts as well.

redirection: You use https://example.org -> browser gets ip address of the operator which sends you a redirection to https://ip:port/, you request at the ip:port the conent of https://ip:port/. It can't associate the content with the hostname (neither the webserver nor the script (owncloud) behind it).

There is a large number of DDNS provider, most of them can do that but their control panel is probably different. So it must be somewhere in the menu :smiley:


#8

Sorry, I was just a little bit sick :sweat_smile: You're right, to configure a DDNS address is the simplest thing to do! I solved the problem: Owncloud uses port 80, and in my network was the only service/server that uses that. So it wasn't a problem to set also the external port to port 80 for Owncloud (it doesn't conflict with anything else in the network). Now I removed the port redirection in the control panel of my DDNS provider and everything works perfectly without IP redirecting and "trusted domains" problems after every IP upgrade.

Thank you again for the help!


#9

Why isn't it possible to set an onion address in the trusted domain? Owncloud does not accept it!
If one could do this, the Dynamic DNS problem would be avoided.


#10

Please create a bugreport if you can't put a .onion address in the trusted_domains:

https://github.com/owncloud/core/issues