Win 10 virtual machine TrueNAS

Bureaua

Explorer
Joined
Nov 28, 2020
Messages
75
How did you set up authentication for your shares? Did you create a user on TrueNAS? Are you using these credentials in your Windows VM? Windows 10 will refuse to connect as guest ...
Patrick I got my Virtual machine working with all the shares I needed and Remote Desktop. Great Stuff. However, my next step is to install Next Cloud plugin on the server to access my data remotely over the internet.

I worked all week-end long without success. I just can't install that plugin on my server following all the procedures available to me.

I tried to install it with DHCP and then NAT and both give me an error message after initial validation. The Jail is missing its configuration and to destroy it ??? I tried so many ways and I just can't get it to install ??
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Use @danb35's script. Or do it manually. But there is no way I know of that would not need a familiarity with using the command line. Nextcloud is a Unix server based 3-tier web application. You need a server administrator for that.

Even if the plugin was working, after upgrades there are mandatory database modifications that need to be done at the CLI, sometimes headers need to be added to the web server configuration. Then there's the whole bag of Letsencrypt integration, DNS ... again, Nextcloud server is for pros or people who are willing to learn as much as necessary.
 

Bureaua

Explorer
Joined
Nov 28, 2020
Messages
75
Use @danb35's script. Or do it manually. But there is no way I know of that would not need a familiarity with using the command line. Nextcloud is a Unix server based 3-tier web application. You need a server administrator for that.

Even if the plugin was working, after upgrades there are mandatory database modifications that need to be done at the CLI, sometimes headers need to be added to the web server configuration. Then there's the whole bag of Letsencrypt integration, DNS ... again, Nextcloud server is for pros or people who are willing to learn as much as necessary.
Thank You for your comments. Im too ambitious for the knowledge I have. I was misguided by watching some videos on Youtube on how to install that plugin. It seams pretty easy, but I now realize that I must dig in and learn a lot more. Thanks
 

Bureaua

Explorer
Joined
Nov 28, 2020
Messages
75
Thank You for your comments. Im too ambitious for the knowledge I have. I was misguided by watching some videos on Youtube on how to install that plugin. It seams pretty easy, but I now realize that I must dig in and learn a lot more. Thanks
Use @danb35's script. Or do it manually. But there is no way I know of that would not need a familiarity with using the command line. Nextcloud is a Unix server based 3-tier web application. You need a server administrator for that.

Even if the plugin was working, after upgrades there are mandatory database modifications that need to be done at the CLI, sometimes headers need to be added to the web server configuration. Then there's the whole bag of Letsencrypt integration, DNS ... again, Nextcloud server is for pros or people who are willing to learn as much as necessary.
Patrick--would you have a book to recommend on The basics of server administration?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
There used to be the great "Unix System Administration Handbook" by the late Evi Nemeth (RIP) et al. But as far as I know there has not been an update since Evi went missing and so it is rather outdated. And then you don't really need to cover server in the literal sense. Disk partitioning, networking etc. will be taken care of quite nicely by FreeNAS - with UI, hey! :smile:

I'm pondering if I know something to read about server applications. You need a minimal understanding of
  • web servers like Apache or Nginx
  • application runtimes like PHP-FPM
  • databases like MySQL/MariaDB or PostgreSQL
Which is quite a mouthful.

How about you do some homework? :wink:

Like
  • get a standard jail (not a plugin) up and running (hint use a "basejail", not a "clone")
  • enable SSH in that jail
  • learn how to generate a private/public key pair on your Mac
  • place the public key into the root account of the jail
  • disable password authentication for SSH in the jail but allow root login
  • use the terminal to SSH into your jail with private/public key authentication as "root"
  • install and enable the "Nginx" web server in the jail
  • view the Nginx default page in your browser
There are quite a few people here capable of helping with each step.
 

Bureaua

Explorer
Joined
Nov 28, 2020
Messages
75
There used to be the great "Unix System Administration Handbook" by the late Evi Nemeth (RIP) et al. But as far as I know there has not been an update since Evi went missing and so it is rather outdated. And then you don't really need to cover server in the literal sense. Disk partitioning, networking etc. will be taken care of quite nicely by FreeNAS - with UI, hey! :smile:

I'm pondering if I know something to read about server applications. You need a minimal understanding of
  • web servers like Apache or Nginx
  • application runtimes like PHP-FPM
  • databases like MySQL/MariaDB or PostgreSQL
Which is quite a mouthful.

How about you do some homework? :wink:

Like
  • get a standard jail (not a plugin) up and running (hint use a "basejail", not a "clone")
  • enable SSH in that jail
  • learn how to generate a private/public key pair on your Mac
  • place the public key into the root account of the jail
  • disable password authentication for SSH in the jail but allow root login
  • use the terminal to SSH into your jail with private/public key authentication as "root"
  • install and enable the "Nginx" web server in the jail
  • view the Nginx default page in your browser
There are quite a few people here capable of helping with each step.
Thank You for your time. Im getting into it :)
Nice home work
 

Bureaua

Explorer
Joined
Nov 28, 2020
Messages
75
Thank You for your time. Im getting into it :)
Nice home work
According to iocage 1.2 documentation, the command to create a basejail is

iocage create -r [Release] -b

where can I find the release to use on my system
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Hey - progress. Does it start and "ping", i.e. did you create it with VNET enabled and does it get an IP address?

As you are probably aware the jail is an entire FreeBSD installation living somewhere on your TrueNAS host. So you can access all the files in the jail from the host. And you can start a shell inside the jail from the host.

SSH to the NAS
Code:
# get a shell inside the jail
iocage console <jailname>
# enable SSH
sysrc sshd_enable=YES
# set a root password
passwd
# edit the file /etc/ssh/sshd_config - `nano` is a simple editor if you are not used to `vi`
# In the line with "PermitRootLogin" remove the "#" in the first position and change "no" for "yes"
# save the file, quit the editor
# start sshd
service sshd start


You should now be able to connect via SSH with root directly into your jail from your Mac - with password. We will make things more secure in the next steps.
 

Bureaua

Explorer
Joined
Nov 28, 2020
Messages
75
Hey - progress. Does it start and "ping", i.e. did you create it with VNET enabled and does it get an IP address?

As you are probably aware the jail is an entire FreeBSD installation living somewhere on your TrueNAS host. So you can access all the files in the jail from the host. And you can start a shell inside the jail from the host.

SSH to the NAS
Code:
# get a shell inside the jail
iocage console <jailname>
# enable SSH
sysrc sshd_enable=YES
# set a root password
passwd
# edit the file /etc/ssh/sshd_config - `nano` is a simple editor if you are not used to `vi`
# In the line with "PermitRootLogin" remove the "#" in the first position and change "no" for "yes"
# save the file, quit the editor
# start sshd
service sshd start


You should now be able to connect via SSH with root directly into your jail from your Mac - with password. We will make things more secure in the next steps.
Well I guess my first step is not well done, because the jail I have created does not have an IP. It starts and stops, but no IP?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You can use the UI - that part works quite well and there is online help behind each of the (?) - but you probably know that.

Stop it, edit the settings, enable VNET - the most important part - then try out the network settings. Static IP or DHCP, your choice.
 

Bureaua

Explorer
Joined
Nov 28, 2020
Messages
75
You can use the UI - that part works quite well and there is online help behind each of the (?) - but you probably know that.

Stop it, edit the settings, enable VNET - the most important part - then try out the network settings. Static IP or DHCP, your choice.
Ok I did that. I enabled VNET and DHCP. Under IPv4 I see, DHCP (not running). Could this be because I assigned a Static IP for my root server?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Have you started the jail again? Is there a DHCP server in your LAN that the NAS is attached to?
 

Bureaua

Explorer
Joined
Nov 28, 2020
Messages
75
Have you started the jail again? Is there a DHCP server in your LAN that the NAS is attached to?
ok I have got an IP. I will go to the second step. My server is connect to my home router with DHCP enabled. However, the IP address Im getting for my jail is not a sub set of my router IP?? my server is at 192.168.0.154/24 and my jail is at 172.16.0.1??
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Disable NAT for your jail. UI - all fine.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Please post screenshots of your network settings for the jail.
 

Bureaua

Explorer
Joined
Nov 28, 2020
Messages
75
Here it is
 

Attachments

  • Screen Shot 2020-12-07 at 4.18.48 PM.png
    Screen Shot 2020-12-07 at 4.18.48 PM.png
    322.5 KB · Views: 181
  • Screen Shot 2020-12-07 at 4.19.00 PM.png
    Screen Shot 2020-12-07 at 4.19.00 PM.png
    391.8 KB · Views: 177
Top