VM Truenas - nextcloud remote access to pool help

Dmnted

Cadet
Joined
Jan 26, 2022
Messages
2
Hi All,

I'm posting in the general section as I'm not sure if my issue is a Truenas or Nexcloud issue.
Actually, i am sure it is an issue of my lack of knowledge and understanding despite my attempts to research the solution.

Firstly, I'll give some context on what I am attempting to achieve.
A simple secure way of sharing documents and photos / media with family members on my LAN, also with external access (which led me truenas and nextcloud)
This has led me down a rabbit hole and I am seeking some guidance and I am very new to virtualisation and truenas.

I have virtualised truenas core (TrueNAS-12.0-U7) on my Dell server.
I have allocated 12 cores and 32 gb of RAM
I have a small pool of 500gb for truenas.
Truenas has a static IP that I have assigned via my router
Truenas is working fine for computers on my LAN

I installed the Nextcloud plugin with standard settings (on the same 500gb pool)
I can log into Nextcloud using the default admin and password created during the plugin install.
I have created new folders and copied some media into the new folder.
plugin version23.0.0
plugin release 12.1-p12

I believed a domain name was required for remote access, so i created a domain name via namecheap (and also a SSL cert)
I didn't realise our internet provider has dynamic IP for personal users however luckily, namecheap has free DDNS.
My public IP is now linked to my domain name via DDNS updates from my router.
Pinging my domain shows my my public IP maintained correctly.

I then though it would be a simple process of adding my domain to the "trusted domains" in the config.php and some port forwarding, but this is not working.
My config file does not have any listing in it for "trusted Domain" ?

I also just wanted to confirm if i should be port forwarding to the truenas IP address or the plugin IP as they are different ?
I have tried port forwarding both port 80 and 443 as well as turned off port blocking with my internet provider.
Port forwarding is definitely working, as I tested remote access to my dell server via the domain name and my login page was displayed.

I have searched the forum for info and no luck resolving my issue
Any help would be greatly appreciated!

If i can provide any further detail that could help you help me, please let me know

Cheers :)
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
My config file does not have any listing in it for "trusted Domain" ?
So add one...

Code:
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'some.domain.com',
    2 => '192.168.1.2',
    3 => 'some.other.domain.com',
  ),


the plugin IP
This one needs to get the packets...

Generally you would be better to use a reverse proxy to manage this (so do some research into that and decide if you want to do that instead)... if you do, also add trusted proxies to the config.

Code:
  'trusted_proxies' =>
  array (
    0 => '192.168.1.0/24',
    1 => '192.168.2.0/24',
  ),


Where you may only need the one entry, but can add whatever internal addresses you have for your reverse proxy and maybe the router depending on how your NAT works.
 

Dmnted

Cadet
Joined
Jan 26, 2022
Messages
2
Thanks for the response sretalla.
It is greatly appreciated
I've added the trusted domain and port forwarding with no luck.
I also added '192.168.1.*' in the hope of not having any network access issues....

using my public Ip resolves as "the site can't be reached - the connection has been reset"

i'll have a look into a reverse proxy. i'm very new to this so thanks for your patience.

cheers
 
Top