Owncloud remote access on FreeNAS 9.2.1.6

Status
Not open for further replies.

HotRod

Dabbler
Joined
Sep 11, 2011
Messages
15
Hi, I have been trying to setup Owncloud on FreeNAS for quite a while now (weeks), but so far it's only accessible on the lan.
I have tried to port forward port 80 (both tcp and udp) 443 (both tcp and udp). Been searching high and low for the correct ports.

The setup has been performed like this:
Plugins -> Selected "owncloud" and Install
Started the owncloud service and clicked the popup "Click here to access your ownCloud!"
Got directed to the jails IP and created the admin account, logged in and things look fine.
This panel is not accessible when I try to access it by my external IP or url.
http://owncloud.somehost.com or http://123.123.123.000 or even with https with port :443
PS. My ISP do not block any ports except for port 25 (SMTP).

I cannot understand what I am doing wrong.
Some input would be really helpful and appreciated, thanks.

System: owncloud-6.0.3-amd64 on FreeNAS-9.2.1.6-RELEASE-x64

 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
The correct answer is to set up a VPN and access it that way--FreeNAS is not designed to be exposed to the Internet. If you choose to disregard that, it is at your own risk. That said, when you port-forwarded--did you forward to the jail's IP, or to the FreeNAS IP?
 

HotRod

Dabbler
Joined
Sep 11, 2011
Messages
15
I forwarded the jail's IP, cause I want to be able to sync my phone, tablet and laptop with owncloud when I'm out of my home.
As of now I have not been able to get this to work outside my lan.
Its not the FreeNAS I want on the net, just the owncloud service running on it.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I don't agree with the never port forward philosophy. if you want things to work more seamlessly (ex phone apps), you need to use port forwarding. But, do realize you are opening a hole to your network so you need to regularly update the exposed application, use HTTPS, and use long + different passwords. I also highly recommend segmenting your network. I use a pfsense router to separate disparate things, my DMZ, LAN, wireless clients/guests; I then only allow certain ports between networks (xbmc / printer access).

As for your issue, there's nothing special about port forwarding to a freenas jail. your best off debugging the issue yourself. nmap, nat reflection are things I would start with.
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
Try a different port.. and reconfigure our network setup.. I don't run owncloud specifically but portforwarding/outside access has never been an issue for me.. Check router logs etc etc..
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Well, considering 6.00, 6.01, 6.02 and 6.03 have all had nasty nasty bugs related to accessing data without authentication I'd *never* make that internet facing. I won't drop names but I was having a discussion with Owncloud with an iX employee last week and they aren't even considering Owncloud for their own home use until 7.0. He's convinced that 6.0 was just not ready for prime-time and he's not using it as a result.

To each their own though. Not everyone will always agree with everything.

I don't know why people always say things like port forwarding is necessary for your cell. I literally VPN into my home LAN from my phone, so the problem isn't as bad as people make it out to be.

Even Plex had their own serious authentication issue a few months ago...
 

HotRod

Dabbler
Joined
Sep 11, 2011
Messages
15
I have never had any issues forwarding other servers that I host here at home.
I use ClearOS firewall/gateway and it has never been any problems forwarding ports to webservers (http or https), voip servers, gameservers... This is the first time I really don't know what's going on.
I don't see why I need to tunnel in by VPN when many others use Owncloud without any VPN.

Ain't there anyone using the Owncloud that comes with FreeNAS? Do I really need to set up another dedicated box for this?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I have never had any issues forwarding other servers that I host here at home.
I use ClearOS firewall/gateway and it has never been any problems forwarding ports to webservers (http or https), voip servers, gameservers... This is the first time I really don't know what's going on.
I don't see why I need to tunnel in by VPN when many others use Owncloud without any VPN.

Ain't there anyone using the Owncloud that comes with FreeNAS? Do I really need to set up another dedicated box for this?
In the case of ownCloud I don't recommend using the plugin.
http://forums.freenas.org/index.php?threads/how-to-owncloud-using-nginx-php-fpm-and-mysql.17786/
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I don't see why I need to tunnel in by VPN when many others use Owncloud without any VPN.

And tons of people here don't setup emailing, SMART monitoring, SMART disk testing, and ZFS scrubs. Does it make it a good idea? F*** no!

Ain't there anyone using the Owncloud that comes with FreeNAS? Do I really need to set up another dedicated box for this?

I am. In fact, I'm on travel right now and so my owncloud doesn't sync except when I VPN into my home network. And you know what, I'm still quite satisfied with this arrangement and still recommend it. So I practice exactly what I preach...
 

EvoAdam

Cadet
Joined
Oct 14, 2014
Messages
1
Hey HotRod,

I ran into the same exact issue and was able to fix it. While I do have a VPN connection that allows me to sync just like cyberjock, I wanted to be able to access the Freenas Owncloud instance from external networks without it. Your port forwarding is correct and is not the issue. Owncloud has to explicitly allow trusted domains to access it, and it defaults to only allow the local network on which is was created for access. Try this:

1. Get WinSCP, will make this a snap
2. SSH into your Freenas box
3. Navigate to your Owncloud jail, something like mnt>your volume>jails>Owncloud_1>/usr/pbi/owncloud-amd64/www/owncloud/config/
4. edit the config.php file and under 'trusted_domains' add the external ip or dns hostname you have configured, following the same syntax
5. save the file and give it a go. I didnt have to restart the plugin but ymmv

Hope this helps you or anyone else looking for the same fix. Props to Stephen Scotter for documenting this.
 

gabeszphoto

Dabbler
Joined
Aug 30, 2014
Messages
14
Hello!
Yesterday, I made the ownCloud configuration based on DrKK tutorial video from Youtube. I config the HTTPS too. But, I use no-ip.org DDNS support to reach my FreeNAS OS, Transmission, etc.. and I would like to reach the ownCloud via this DDNS to. I defined a portforwarding in my Router and it works I get the ownCloud start page with the Error Message: This is an Untrusted Domain. I googled for it, and I made some configuration in the config.php file. I added the "(myddns).no-ip.org" and the "(myddns).no-ip.org:8998" (I defined this 8998 port for owncloud). I restarted the jail and the "lighttpd" service, but when I tried to reach again from my iPad via LTE connection my ownCloud I get the same "Untrusted Domain" error message.
Could you please help me? I attached the config.php file..
Thank you! Best Regards, Gabor
 

Attachments

  • config.php.txt
    485 bytes · Views: 250

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I'd just completely delete the trusted_domains array.
 
Status
Not open for further replies.
Top