sme ti consulting, hardware, networks, systems, training

Building a NAS System with FreeNAS 9.1.1 and Specific Hardware

Introduction

A NAS (Network Attache Storage) Unit is a device connected to a network, whose function is to store and share files. Distinguished from an external disk because it is a server, then with dedicated Hardware and Operating System and with the possibility of implementing various technologies such as RAID, Multimedia Server, Aotomated Backups, Control Permissions, FTP Server, etc..

Nas Units can be purchased in the market by values from about 100,00 Euros (without Disks) as exemplified in Article availabe here, or can be built using computer hardware and an specific operating system (witch may or may not be free).

As currently some users have obsolete hardware that is "neat" whitout use, it is a good opportunity to build a NAS Unit that can be used to test or even for use.

1 - Hardware and Operating System Used

1.1 - Computer Hardware

As with any system, the higher Hardware requirements, the greater performance of the Unit. A processor with a frequency of 2 GHz and 512 MB ​​RAM are sufficient to implement the NAS we develop.

The graphics card will only be used to check the installation of the OS, it is not necessary to run the system, because the management is done on console, which is accessed through a computer connected to the network. Therefore, the adapter does not need large requirements.

Regarding the disks, we need at least two. One to install the OS and another for storing files. In this case we will use 1 USB Pen Drive for OS and two SATA disks for data storage (for make RAID-1).

The hardware we used for this work, consists of the following components:

1.2 - Operating System>

In this case we will use FreeNAS, which will allow sharing / access systems based on Windows, Linux and MAC OS.

2 - FreeNas 9.1.1 OS Download

We started creating the server with mounting hardware and installation of the OS. Regarding the hardware will need to examine if the motherboard allows booting from a USB stick or via DVD and if the processor is 32-bit or 64-bit.

Obviously you will need to connect the computer Hardware to the Network , connecting one end of the network cable to the Network Board and the other to the Router.

The recording is very simple, just enter the environment of that software, select the file FreeNAS-9.1.1-RELEASE-x86.iso (double press the left mouse button), check if the Recording Unit is selected, place the CD / DVD in the drive and select Recording.

2.2 - Create a Boot Pen Disk Drive to Start OS

The file to create a Boot Pen called FreeNAS-9.1.1-RELEASE-x86.img.xz and is compressed. We need two applications to make this work:

Unzip the file by selecting it with the botão direito do rato and select 7Zip/Extract Files.

Follow the steps as shown below:

Attention! The USB stick will be formatted in a specific system files, and can not subsequently be formatted through Windows, requiring specific software. For more information, see paragraph 2.3 below;

Insert a USB stick with more than 2 GB and open Win32DiskImager;

Check in Device if the USB Pen Disk Drive selected is the Correct;

Select the folder icon;

Locate the file FreeNAS-9.1.1-RELEASE-x86.img, select it and then select the button Open;

When you perform the actions listed above, FreeNAS will create three partitions on the USB device, two of which are about 930 MB each other and about 20 MB. The remaining space will be "useless", as you can see in the picture.

If you want to reformat the USB device in Windows OS, the USB key will get just 942.51 MB available, the rest unable to be formatted (even if you try to eliminate the remaining partitions).

If this occurs, do not panic because there is a solution. With software for Managing Disk Partitions this situation can be easily resolved.

In our case we used MiniTool Partition Wizard Home Edition. Through such software, you can delete the partitions fails through Windows Disk Management and format the Pen. Guarantee that is "like new". You can download the free software mentioned in: http://www.partitionwizard.com/free-partition-manager.html.

3 - Create FreeNAS Server

The operating system that serves as the basis for FreeNAS is FreeBSD. In hardware we used, the OS takes about two minutes to boot up. But in a Virtual Machine installed on a computer with 8 Core CPU and 16 GB of RAM, the boot time was less than a minute. Obviously, when larger the hardware settings, the faster the startup and operation of the NAS system.

There are two ways to executing the above OS:

Install the OS on a hard drive - To install the OS, you need to burn the CD image mentioned above. The operating system must be installed on a separate disk, ie hard drive will only serve to run FreeNAS. The disk does not need to have plenty of capacity. A good solution is to acquire a 32 GB SSD (about 43.00 Euros), to accelerate the boot OS.

Run the OS via a USB Flash Drive - It is the solution that we use because we do not have a third disk. In this case, you need to perform the operation referred to in paragraph 2.2 above. The hardware which will connect the pen must allow boot (boot OS) via USB devices. Such Pen needs to be permanently connected to a USB port of Motherboard.

3.1 - Option 1 - Install Operating System on a Hard Disk

If you have a hard drive dedicated to the OS use this option. We recall that the disk dedicated to the Operating System will not be a disk for storing data, ie can only be used for that purpose.

To install the operating system will need to create a boot CD as described in paragraph 2.1 above.

After having prepared the boot device (CD / DVD recorded with the operating system), place the CD / DVD in the reading device and connect the hardware that will devote to NAS.

You need to instruct the system to boot from the boot device. Normally you have to select one of the function keys, F8, F11, F10 or another according to the Motherboard. See the manual which key BBS or Boot Menu, or when the system starts, this is indicated on the startup screen. See examples in the image below.

If the motherboard does not have the BBS / Boot Menu, enter the Bios Motherboard (keys usually Del, Esc or F12) and the Boot Settings menu and set the CD as the first boot device. In this case, after the operating system installation, remove the CD / DVD drive and repeat the previous operation to put the hard drive as the first boot device..

After the boot device is properly configured as the first boot device, reboot the system. Installing FreeNAS operating system is initialised. The dialog boxes that appear may only be manipulated via the keyboard, ie during installation of the OS the mouse is disabled.

You'll have to use the directional Keys and the Enter key. After a few moments (which will be shorter or longer depending on the hardware you are using) will emerge first dialog box. Select 1 - Install / Upgrade, OK and press Enter.

The following dialog shows the disks that are accessible. Select the disk where you will install the OS. In this case the disc is 20 GB (the first). After selecting the desired select OK and Enter

The next dialog box warns that all partitions are deleted from all records and can not share data on the disk where you will install the operating system. That disk is hidden from the NAS system. Select Yes and Enter

After the Operating System is properly installed, you will see a box stating the fact. Select Ok and Enter.

You will see the last window where you can shut down or restart the system. Select 4 - Shutdown System.

Reconnect the system and follow the following sequence:

Select the key to access the Bios Motherboard;

Enjoy to remove the Installation CD;

Place the disk where you installed the operating system as first boot device;

Save the configuration on the appropriate location in the Bios;

The operating system will boot.

After the operating system is operating will see a screen similar to the following figure. Starting from now, we concluded the operations necessary for the creation of a NAS drive. Before proceeding to the setup phase we will conduct a small very useful operation we'll explain.

In the lower left corner appears an IP address (192.168.171.8) which will be used to access the Administration Console Unit NAS we've created. We could access the console to perform the other necessary settings, but we have yet to assign a fixed IP to the NAS drive, because in case the unit is restarted the address will change that up because it is dynamically assigned At Router.

In this context, we need to "say" to the Router an particular IP address is reserved for the NAS Unit, no equipment may use such IP address and whenever the NAS unit entering the network must always be such address.

Therefore, let the NAS unit attached as pictured above, and go to step 3.3 to continue the process.

3.2 - Option 2 - Run Operating System via USB Pen Disk Drive

Use a dedicated disk to install FreeNAS makes sense if a disk with low capacity. If you have an old IDE drive has 20 GB is a good opportunity to use it.

But if you have a disk with 200 GB will not make sense to use it to install about 2 GB Operating System with the remainder unusable because it can not access it to write data.

Another option is to use a USB Pen Drive which will be installed in the OS. The device will be required to be permanently attached to the motherboard and this should enable boot from USB (not all Motherboards permit).

After that work is complete, connect the pen to a USB port on the motherboard, go to the BIOS and set the USB stick as a boot device. Save your work and restart the hardware.

After connecting the hardware, the OS will be started. This operation will be much faster the larger hardware requirements.

After the system has loaded the operating system, a dialog that has already been shown in the previous section. As previously stated, leave the system as is and move on to the next point.

3.3 - Assign Static IP to the Server

It is of paramount importance to assign a fixed IP to the NAS unit, otherwise the system will not function properly.

To exemplify stated, we will analyze the IP assigned to the Router NAS - 192.168.171.8 - and see the following sequence:

Suppose we enable FTP on the NAS. To do this, we need to open the port 21 of the router so that traffic can pass;

To open the door in the Router, you must refer to that IP that door will be opened. If we put the IP 192.168.171.8, while the NAS is connected FTP will work because the router does not change the IP;

Imagine now that we turn off the NAS and connect another device to the network. There is a strong probability that the previous IP be assigned to that device;

Staying within the probable hypotheses, imagine we turn again the NAS. The router will assign it another IP, eg 192.168.171.10;

Let us now try to transfer files via FTP. Logically it will give error because the door is not open to the last assigned IP to the NAS, but for the previous (192.168.171.8).

Hence the importance of "telling the Router" that particular IP address is dedicated to a particular device, so it does not assign it to another.

Before we define the IP address for the NAS unit, we will frame the context weaving some considerations on how the equipment is identified on a network:

The devices are identified in a network through two addresses - Mac Address and IP Address:

MAC Address (Media Access Control Address) - The MAC Address is a physical address that is associated with a particular network device. He is composed of six sets of two hexadecimal numbers (numbers 0-9 and letters A to F). This address is unique, and there is (theoretically) two alike. If there are two identical MAC addresses on the same network, will conflict. The MAC Address is recorded in a given chip each device. If for any reason the said chip is corrupt and MAC address becomes unavailable, you can not connect the device to the network.

IP Address (Internet Protocol Address) - The IP Address is a logical address wich is assigned to a particular MAC Address when it binds to a specific Network. While the MAC identifies your device to DHCP, the IP address will identify the device on the network. Also the IP address is unique, with no duplication (the same network). The IP address is assigned by a DHCP (Dynamic Host Configuration Protocol), which is usually built into the Router. The IP can be fixed (the same for a given MAC address) or dynamic (determined MAC can receive a different address each time you connect to the network).

We could thus conclude that to assign a fixed IP address to the NAS unit, we need to know the MAC address of the Network Card Motherboard, Onboard is said board or not. Normally if the Network Card Onboard there is a label somewhere on the motherboard which indicates that MAC. If the board is offboard (coupled in a PCI or PCI-Express), the MAC address is shown in the box.

The easiest way to get the MAC address is to enter the administration console of the router. In our case it is the Router Netgear WNDR-3700.

Let's get back to the crux of the issue is the allocation of a fixed address to the NAS unit, ie actually assign a fixed IP address to the network card of the Motherboard.

Between the management console Router and browse to the location where Lan Setup, or Local Network, or DHCP, for example, and follow the steps in the following figure.

After you finish that configuration, shut down the NAS unit - enter 11 followes by the Enter Key and Y followes by the Enter Key.

We completed the creation of the NAS Server. After the system is off, you can turn off the Keyboard and Monitor, because it will not be necessary.

3.4 - Management and Administration Consoles

Let's take this last point to define some concepts.

1 - NAS Unit - is the set of hardware and the OS FreeNAS. In this case the hardware is not mounted in a PC Case. Therefore, when we refer to "NAS unit" we refer to the set described.

2 - There are two consoles in the NAS Unit:

2.1 - Operating System Management Console

To access the Operating System Console, you must have a keyboard and monitor connected to the NAS Unit. You can not use the mouse. To perform actions, will write the number you want.

From 1 to 6, you can configure the Network settings. In my opinion it is preferable that they are assigned by the Router..7 - To delete the password for access to the NAS Management Console (for browser);8 - If you have already configured the NAS unit, you can revert the settings to the initial state.9 - For instructions on command line (you must know the syntax).10 - Restart and 11 - Shutdown - these operations can be done via the button On / Off Hardware, or through the console that we will refer below.

Access to this console is required only in extraordinary cases, for example if you can not get into the Management Console Unit NAS, requiring Restart or Reset if you want the initial settings.

2.2 - NAS Unit Administration Console

The NAS Unit Administration Console is accessible through a computer connected to the network (the same network where the NAS is connected). While in previous console can perform actions very small, in the Administration Console Unit is where you will make all the necessary settings for the NAS unit fulfills its function.

3.5 - Shut Down and Turn On the NAS Unit

As you have already completed, the Nas Unit is a Computer with a dedicated and specific operating system . You should never cut off the electric current during operation.

a) To turn the unit ON just plug in the hardware On / Off button. The system will start the operations necessary. The start will be much faster when larger the Hardware settings.

b)To turn the unit OFF. You can use the button mentioned above. The unit will perform closure operations and automatically shut off the current.

c) Another Way To Turn the Unit OFF is through one of the consoles. Similarly to the above, the unit will perform closure operations and automatically turn off current

Parte 2 - Steps to Configuring the NAS Unit

After FreeNAS be properly installed (either on a disk, either a USB key), all configuration operations that are necessary to make will be carried through in Browser Console, which can be accessed by any computer connected to the network. Hence the previous mention regarding the uselessness of the keyboard and the monitor connected to the NAS Unit.

FreeNAS has many options that allow for a range of Operating systems and needs of individuals and companies. Since the goal of this article is to provide a first contact with FreeNAS, we use features that most users need.

In this context we will establish the following objectives for this work:

Make the necessary settings for the correct connection to the Network;

Put 2 Hard Disks in RAID-1 for automatic backup of files;

Configure the Network Sharing in Windows;

Define users with different permissions;

Configure FTP access;

Configure FTP Client;

Configure the Media Server;

Suggest hardware to mount a NAS Unit;

1 - Accessing the Administration Console and General Settings

Previously we assign a fixed IP to the NAS Unit. We will use this address to access the administration console on a computer. In the address bar of your browser type the address that you set earlier. In our case is 192.168.171.10;

After inserting the IP address press Enter and will open the Administration Console of NAS Unit.

1.1 - Administrator Account

You verified that entered the Administration Console without be asked a username and password. The first task to do is to configure the administrator account, so that the next entry that does not happen again.

Note: The Administrator account serves only and only to make settings in the Console.

Select Change Admin User and place:Username: admin (required name in the format shown)First Name e Last Name: first and last name;
after being to your liking, select Change Admin User to save.

Then select the tab Change PasswordNew Password - Put a passwordNew Password Confirmation : repeat the previous password
Select Change root password as well (root is the super user that has access to everything)
Select Change Admin Password to save.

To finish setting up access to the Administrator, we will put the e-mail Address. To do this select Users and in the user root double press the mouse button. Put the Administrator e-Mail Address and then select OK.

Continuing in Settings, select the Advanced tab. Check the box Show Console menssages in the footer to view the activity of NAS. If you want the emergence of a welcome message when you connect the NAS put it in MOTD banner.

Continuing in Settings, select ther e-Mail tab, to configure an e-mail address in which you will receive periodic messages on the NAS unit activity indicating, for example, the "health" of the disks.

The settings for the Outgoing Mail Server, Port to Connect to, TSL / SSL and SMTP Authentication Use, are available on the website of the entity that provides you access to e-mail (pop3 settings).

After completing the settings above, select Save and then Send Test Mail. If you receive an e-Mail test in the mailbox of the e-mail said, is a sign that the settings made are correct.

1.3 - System / NTP Server

The server and protocol NTP (Network Time Protocol) has the functionality to synchronize the date and time on a network. As already mentioned, it is essential that the equipment of a network are synchronized in terms of date and time, otherwise can not communicate properly.

In this case, we are in Portugal. It is then logical sincronizarmos our equipment through the entity responsible for the Legal Hour. That is Lisbon Astronomical Observatory of University of Lisbon. Let's put the address for the unit to be synchronized with the Legal Time. It is advisable that all equipment connected to the network, to synchronize the same way.

2 - Creating Users and Groups

Let us define a scenario that will allow the following sequence of creating Users, Groups, and Shares.

Suppose the owner of a unit intends to make a NAS shares with three friends, which lets you see the contents of the drive and run files denying them permission to write to the NAS.

Regarding FreeNAS, "write" means to upload files, modify or delete it. In this context, if a user is unable to "write files" is actually prevented from performing any of the operations mentioned above.

In short, we create the following users:

Owner of NAS Unit that will share files with other:

Username: jjrcrispim

Password: 1234

Full permission - Read, Write, Execute

Users who will access the share:

Username: amsantos, fjpmatos and jmsousa

Password: 12345

Alow: Read, Run;

Not Allowed: can not write (upload, edit / modify, delete)

2.1 - Create Users

Let us begin with the creation of the user who owns the NAS. For it does not matter what permissions it will have as it will be defined later.

1 and 2 - In the side menu select Account / Users / Add User;

3 - In the windowAdd User, place in the field Username the name that the user will log in when needed. This should not have accents or spaces;

4 - Uncheck the box Create a new primary group for the user;

5 - In the box Primary Group select from the dropdown menu nogroup;

6 - In the box Home Directory shall appear /nonexistent. If the box has another variable, manually type /nonexistent;

7 - Place the user's full name (can contain spaces and accent), the e-Mail and password;

8 - Select OK to finish.

Create other users by following the steps mentioned. After users are created properly contain the side menu in Users. If you want to list all users select View users.

2.2 - Create Group

In this case, we create only one group calling it the GrupoPartilha.

The creation of the group is similar to that done previously. Follow the steps in the image below.

2.3 - Group Users

You need to inform the system that the users who will access the share belonging to GrupoPartilha. To group users, select View groups, select the group GrupoPartilha and select users. Then select the arrow to integrate the Group.

3 - Format Disks, Create Folders, Permissions and Sharing

The next step refers to formatting disks for later create folders for each user and consequent sharing. You need to bind the folders created in the area of each user can be defined for the respective permissions.

3.1 - Format Hard Disks

In this case we put two disks in Raid-1 for automatic backup. The Raid-1 gives rise to a disc to an image being visible from the other one. Any change that is made visible to the hard disk will automatically be made ​​hidden. How the information is duplicated, if a disk is damaged, there is a full copy of the data on the other.

The Raid-1 in FreeNAS is called Mirror. To make this work, follow the sequence shown in the following image.

3.2 - Create Folder for Sharing

Let's create a folder to put the files that we will share. In FreeNAS folders are called DataSet. The name that we will give the folder is Documentos.

To create such a folder, go to Storage / Volumes / volume previously created (/mnt/NasDiskRaid1) / Create ZFS DataSet. Proceed according to the following figure.

3.3 - Make Backup of Configurations

At this stage it is appropriate to make a backup of configurations. If something "goes wrong" in the following settings, you can reset the factory settings and do Restore (recovery), avoiding being set up everything from the beginning.

You must enter a device read / write in NAS Unit, eg a USB stick, to make the backup said.

Select System / System Information / Save Config.

3.4 - Set Permissions to Users

After creating the folder where we put the files that we want to share, we need to define who is allowed to access it and what actions can do.

Select Storage / Volumes / Documentos (/mnt/NasDiskRaid1/Documentos / Change Permissions. Please note that you will select the permissions for the Documentos folder and not to the entire disk. The aforementioned is in the green selected in the following figure.

3.4.1 - Define WHO CAN access the Sharing

The first task is to define who is "own" folder (Owner user) and who can access it (Owner group).

In the window for setting the permissions have a Owner User (default is the super-user root) and a Owner Group (default is the wheel Group).

To change the Owners, select the arrow to the right of the box, which will provide access to all users and groups created. In this case the Owner user will jjrcrispim and the Owner group will GrupoPartilha. Select them in the way that was mentioned.

3.4.2 - Define HOW CAN access the Sharing

We define WHO can access the sahres. Then we will define HOW CAN access the share.

In the Mode defines the kind of allowance to the Owner (user), Group (owner group) and the other groups or users (other). The possibilities are:

Execute - Download - In the case of executable files, for example a movie or music, you can play the content if you are on a local network. You can make download (receive).

These three hypotheses of permission when combined allow different variants:

Read + Write + Execute - Full Permission;

Read + Write - Can see the content / Send / Delete / Modify. Can not Open Executable files or download (but can Send / Modify / Delete these files);

Read + Execute - Can see content and can Open Executable Files. Can receive (download). Can not Send / Modify / Delete;

Write + Execute - Do not see the content. Theoretically can Receive / Send / Delete / Modify and Open Executable. But how do not see the content you will not see the sharing, logo is inhibited from performing those actions.

The Type of ACL defines which operating system is used by customers, Windows or Unix (and similar Unix like Linux). If there are clients in the network as both operating systems should select Unix.

If you check the box Set permission recursively permissions apply to subdirectories of the volume or folder that is sharing.

In our case, we want the user Owner (jjrcrispim) has full permissions, the Group has permission to read (Read) and run (Run). Just only the primary user and the components of the Group can access the share. selected Windows in Type of ACL because all users have the Windows Operating System. Select Set permission recursively so that actions are applied to subfolders that users create however.

Set the permissions as shown below.

3.5 - Folder Sharing on Network

The final step is to share the folder so that it appears on the LAN. To do this, follow the following sequence

3rd - Name - Put the name of Sharing4th - Path - Way of sharing - Select Browse

Path (Continuation) - when you select Browse, will show the root of the disc (folder with bar).5th - Select the icon (-) to expand the folders to the Documentos folder is visible.6th - Select Documentos Folder.7th - After making sure that the path to the folder appeared in the Path box, select Close.

8th - Make sure that the box Browsable to Network Clients is marked.9th - Select OK.

Accept the message (Yes) that asks whether to enable the CIFS service. This will appear as active in the services menu (Services / Control Services). Failure to do so, enable the service manually by selecting the red bar.

If the share does not work, make sure the CIFS service options if there is the same working group that has Windows. To open the options CIFS, select the icon signed in the figure below (key format).

3.6 - Network Sharing Test

To conclude this part, let's check if everything is functional.

3.6.1 - Windows Network

Select the Windows Network and check if the shortcut appears to NAS Unit (FreeNAS)

3.6.2 - Access with user name jjrcrispim

Access to the network with the login created for the main user (jjrcrispim)

Create a folder to make sure you have full permissions as previously defined.

Copy an executable file for sharing, for example a video, and check out that can run it.

The user configuration jjrcrispim, is fully functional, because it was possible to read, write and execute from sharing.

3.6.3 - Access with user name amsantos

Go to sharing with the user amsantos. This does not have permission to perform copy / paste / delete.

Try deleting a file.

The system is not allowed and gave a message that informs the user that is not allowed. If you try to copy / paste the system also does not allow it.

Try running the video.

The system allowed. Therefore this user settings are correct. Test with anyone and you will see that in terms of sharing the network is all functional.

4 - FTP Access

The FTP (File Transfer Protocol) is a protocol for transferring files. The file transfer takes place between a computer called "client" (the one that asks you to connect to the data transfer) and a server (the one that receives the transfer request). The user can select which files you want to send or receive from the server.

Data transfer can be done through a browser or through client software. We will address both cases.

The advantage of the NAS unit is to establish permissions, inhibiting or enabling the user actions. The permissions we covered earlier are valid for FTP access.

4.1 - Open Router Ports

The first action to be performed is to open the doors of the Router. Depending on the console of each router, the way to make will be the same as what we present. In case it is a Netgear Router model WNDR-3700.

4.2 - Dynamic DNS (DDNS) Configuration

Access to a particular server is always done through an IP address, either directly or indirectly. The direct way is when you put the IP address in the browser (http://253.124.3.23, for example). The indirect way is to put an address "with words" in the Browser. In this case, the call is routed to a DNS server, which will assign the IP address refers to the address entered. For example, when we type http://www.google.pt the DNS server will assign the address 173.194.41.215 which will allow access to the appropriate server.

In our case, we have a dynamic IP address provided by our ISP, which is eg 217.113.129.5. If we want to access the NAS drive via FTP, we would have to enterr ftp://217.113.129.5/partilha, where partilha is the main folder shared. How to change the address given frequency, we would have access to the address mentioned above and would need to know the new address, impossible situation if we were to access the FTP from the outside.

The Dynamic DNS server is used to "circumvent" this situation. Works as follows:

The user needs to hire the DDNS service to an entity that makes available (free or not);

It supplied an access address;

When the user types the address above, this will access the DDNS server;

The DDNS server "refreshes" the Internet IP of the user, ie "will see" if the Internet IP changed and forwards the user to the correct address;

The address given is something like luis_fernando.dyndns.org, where "luis_fernando" is the name that the user has defined and "dyndns.org" the DDNS server address (which has been free, but currently it is not).

1st - Create an Account on DDNS provider and Setup

Creating an account and respective configuration varies depending on the server that provides the service. To see an example of setting up a DDNS account, see our article here.

2nd - Configuring DDNS on NAS Unit

Then we set DDNS Unit NAS. To do this go to Services / Dynamic DNS ou Services / Control Services / Dynamic DNS Settings (icon "tool")

Put the following in the configuration window of the Dynamic DNS server:

Provider - in drop-down menu select the DDNS server where you configured the account;

Domain Name - place the domain that set the account that you created in the DDNS server;

Username / Password / Confirm Password - are usually the data you access the account created in DDNS Server;

OK - to finish, select OK.

Dynamic DNS is configured in FreeNAS.

Finally, call the service by selecting the OFF button (which turns ON)

4.4 - Configure FTP Sharing

FTP is configured and running. To confirm, if you access the FTP login with root (super-user) will have access to the entire disk.

But if you try to authenticate a user created, the system will return error. This is due to the fact that you need to connect each user to a folder. In our case, we need to connect all users to the folder Documentos.

To perform such action in Users select each user with the left mouse button and list the Documents folder with the user. The sequence has been explained previously in a similar situation.

4.5 - FTP Sharing Test

To test the sharing will have to access the FTP server. There are three ways to do it:

1 - Through the Browser - putting the ftp address in the address bar. In this case it is not possible to upload files.

2 - Through Windows Explorer - In this case it is possible to upload and download files.

3 - Through Client Software - there are several FTP client software. See our article on the subject, here.

Note: the permissions set previously remain valid.

Let's test the sharing as we have performed previously, using the logins jjrcrispim e amsantos.

4.5.1 - FTP Access with user name jjrcrispim

Enter, in Windows Explorer, the address of DDNS. in our case is ftp://experiencia.dyndns.org. Enter the FTP login with jjrcrispim (user with full permissions).

Upload File - Allowed

Delete File - Allowed

Execute File (Download) - Allowed

The actions are executed in accordance with the permissions set for the user.

4.5.2 - FTP Access with user name amsantos

Access the FTP using the login amsantos. The user does not have permissions to delete or to upload files.

Upload File - Not Allowed

Delete File - Not Allowed

Execute File (Download) - Allowed

The actions are executed in accordance with the permissions set for the user.

5 - Media Server

FreeNAS has included two Media Servers, both compatible with DLNA (Digital Living Network Alliance). Let us begin with the concept of DLNA.

DLNA is a standard and simultaneously an organization. As an organization, is association of companies that establish guidelines based on existing technological standards. The aim is to ensure interoperability between electronic equipment connected on a home network, so that they can exchange multimedia files between them using the said network. For example, the user can access and play multimedia files stored on a computer, through a TV, tablet, smartphone, among others, provided that such devices are connected on the same network and have DLNA certification.

FreeNAS has two embedded media servers, which have to be installed from the Plugins menu. You can not connect the two simultaneously, in other words, or connecting one or the other.

5.1 - Common Settings

Before installing any of the media servers integrated into Plugins FreeNAS, you have to organize your media files, create a folder for the aforementioned purpose. This action is the same for both servers.

CREATE NEW FOLDER:

1st and 2nd - Go to Volumes / /mnt/NasDiskRaid1 / Create ZFS Dataset;

3rd and 4th - Give Name to Folder - In Dataset Name put Multimedia (without accents or spaces) and select the button Add Dataset;

SET PERMISSIONS:

5th and 6th - Select the folder you created earlier and select Change Permissions;

7th - Keep the Owner user and group (can change if you like). In Mode check all boxes regarding Other;

8th and 9th - Check the box Set permissions recursively and select the button Change.

12th and 13th - Select the previously created folder and select Close;

14th - Make sure that the box Browsable to Network Clients is checked;

15th - Check the box Alow Guest Access;

16th - To finish select button OK.

CREATE FOLDERS THROUGH NETWORK

17th, 18th and 19th - In Windows Network, go to FreeNAS and open the folder Multimedia;

20th - Create three folders for each of the variants media (Images, Music, Videos) and put some media files (photos, movies, music) in the respective folders.

5.2 - Plex Media Server

Note: Before installing the media server you should organize the respective files by placing them in a folder. If you have not already done so, perform the actions listed in paragraph 5.1 - Common Settings (Steps 1 to 20).

After you have organized your media files installing Plex is relatively easy. It is not necessary to "open doors" in the Router.

24th - Select OK in the dialog box that appears after the previous action.

CREATE SYSTEM CONNECTION TO FOLDER MULTIMEDIA

25th, 26th and 27th - Select Jails / plex_1 / Add Storage;

28th - In Source make the connection to folder Multimedia previously created.

29th - In Destination make the connection to folder Media which was created by the System;

30th - To finish select OK.

Whenever you set through the network, a new File or Folder in Multimedia folder, the system will automatically generate a copy to the Media folder which is the base server.

UNCHECK

VERY IMPORTANT - UNCHECK VIMAGE

The following step is very important. if no uncheck the box VIMAGE Media Server will not work on Windows.

31st e 32nd - In Plugins select plex_1 / Edit;

33rd - Uncheck the box VIMAGE;

34th - To finish select the button Save.

TURN ON MULTIMEDIA SERVER (PLEX MEDIA SERVER)

35th - Im top menu select Plugins;

36th - Power on the server by selecting the button OFF, whixh will ON;

37th - Restart the Sistem selecting Reboot in side menu.

ACCESSING THE CONSOLE MANAGEMENT OF PLEX MEDIA SERVER

As the Plex Media Server is not part of FreeNAS (hence be considered a plugin), we had to install it (we did it before)

Next step is connect the Plex Media Server to FreeNAS, ie, the system folder that contains the FreeNAS files and / or folders multimedia. We recall that is a folder created by the system under the name Media.

You have to access the console of the Plex Media Server, to perform another operation. Access to the console can cause some confusion, because it is not very evident.

38th - In the Side Menu, in Plugins select PlexMediaServer;

39th - In the dialog box that appears, have a message that says Click here to access your Plex Media Server. Select the word "here" (DO NOT SELECT the OK button) to access to Plex console.

The action that will run the Windows Media Player. If the server is functional, the files previously placed in the folder and multimedia sharing, contain the respective list.

In this case we were careful to name the files with the word "nas" in order to give more easily. As you can see in the picture, everything is functional.

We can make one more test, which will consist of placing a file in the share / folder Multimedia / Images. The image is named nas_image_nova. If the server is functional when we put the file in the sharing, it appear simultaneously (and automatically) in the devices Multimedia / Plex.

According to the image we have:

1 - File on the Desktop;

2 - Files copied to the sharing Multimedia / Images;

3 - File was shown in Plex (Media Devices).

In this context, our work was successful!

5.3 - MiniDLNA MEDIA SERVER (DLNA/UPnP)

Note: Before installing the media server you should organize the respective files by placing them in a folder. If you have not already done so, perform the actions listed in paragraph 5.1 - Common Settings (Steps 1 to 20).

It is not necessary to "open doors" in the Router

After you have created the folder where the multimedia files will accommodate, respective permissions and sharing, create subfolders for each of the types of multimedia files, and accommodation for testing, we perform the remaining actions necessary to implement MiniDLNA Media Server.

INTALL MiniDLNA MEDIA SERVER

21st - In Services select Plugins;

22nd e 23rd - Select DLNA / UPnP and next select button Install;

24th - Select OK in the dialog box that appears after the previous action.

CREATE SYSTEM CONNECTION TO MULTIMEDIA FOLDER

25th, 26th and 27th - Select Jails / dlna_1 / Add Storage;

28th - In Source make the connection to folder Multimedia previously created.

29th - In Destination make connection to folder Media which was created by the System;

30th - To finish select OK.

Whenever you put through the network, a new File or Folder in Multimedia folder, the system will automatically generate a copy for the Media folder which is the base server.

VERY IMPORTANT - UNCHECK VIMAGE

The following step is very important. If no uncheck VIMAGE box Media Server will not work on Windows.

31st e 32nd - In Plugins select dlna_1 / Edit;

33rd - Uncheck the boxVIMAGE;

34th - To finish select Save.

LIGAR O MiniDLNA SERVER AO FREENAS (PASTA MEDIA)

The next step is to connect the MiniDLNA Server to FreeNAS , ie the FreeNAS system folder that contains the files and / or folders multimedia. We recall that is a foldercreated by the system under the name Media.

35th - In Plugins select MiniDLNA;

36th - Name the server (without accents or spaces). This is the name that will appear on the network;

37th, 38th and 39th - Connect the MiniDLNA to the system folder Media. Select Browse, expand the contents of the disc, select the folder media and select Close;

The action that will run the Windows Media Player. If the server is functional, the files previously placed in the folder and multimedia sharing, contain the respective list.

In this case we were careful to name the files with the word "nas" in order to give more easily. As you can see in the picture, everything is functional.

We can make one more test, which will consist of placing a file in the share / folder Multimedia / Images. The image is named nas_image_nova. If the server is functional when we put the file in the sharing, it appear simultaneously (and automatically) in the devices Multimedia / DlnaServer.

According to the image we have:

1 - File on the Desktop;

2 - Files copied to the sharing Multimedia / Images;

3 - File was shown in Plex (Media Devices).

In this context, our work was successful!

6 - Hardware to Assemble a NAS Unit

In this simulation we used old hardware we have for testing. We can build a NAS Unit with new hardware, but you can ask: "what advantage, if any NAS drive on sale for about 100.00 Euros?"

The cheaper NAS Unit market costs about 100.00 Euros without disks. If you purchase two 2TB disks (about 170.00 Euros), the NAS unit will cost a total of about 270.00 Euros. We made an article about that, which is availablel here.

That has a motherboard which are integrated in a Processor (Single Core) 800 MHz, 128 MB Memory RAM, a 128 MB flash chip (where you installed the operating system) and provides two SATA-II slots (ie if put SATA-III will work on SATA-II).

If you think about purchasing the hardware required to mount a NAS unit, you will spend about 220.00 Euros (excluding value of the disks).

What is the advantage of one or the other?

The first is much cheaper, but you will be limited to the standards of the manufacturer. You can not install a new operating system, you can not change your hardware, and if a hardware component fails, the NAS unit stops working, unless you send it to the manufacturer for repair (whose value will be much higher than the purchase price new product).

The second is 100% more expensive, but has far superior hardware features and the replacement of components is facilitated.

Let us present two hypotheses: one Motherboard with integrated processor and one without embedded processor. The remaining components are equal.

6.1 - Option 1 - Motherboard with CPU and Graphics Card Onboard

Note: prices shown are for October 2013;

NAS Unit Features:

Single Core CPU 1,5 GHz;

8 GB RAM DDR3 1600 MHz;

SSD for install Operating System;

Two 2 TB disks for storage in RAID-1;

For over 120,00 Euros you have a NAS unit clearly and considerably faster. With the exception of the CPU, in case of failure of components that can be exchanged. Although the onboard graphic card, the motherboard has a PCI-Express, which will let you put a graphics card if the onboard malfunction.

6.2 - Option 2 - Motherboard Socket FM2 and Graphics Card onboard

Note: prices shown are for October 2013

NAS Unit Features:

Dual Core CPU 3 GHz;

8 GB RAM DDR3 1600 MHz Dual Channel;

SSD for install Operating System;;

Two 2 TB disks for storage in RAID-1;

This solution costs more Euro 37,00 and has the advantage of not onboard processor.

If you compare these systems with those that are sold in the market, you will see that a NAS unit that costs about 400.00 Euros, hardware settings have much lower compared to the solutions presented.

Final Thoughts

The primary purpose of a NAS unit is file sharing, only and only this!

You may say: "For just such a External Disk connected to a router via a USB port or RJ45 or firewire or e-Sata as boxes. And you can still access the files contained on the disk, from abroad, using FTP (if the Router permits). "

The statement is correct, because who needs only to store files (documents, music, images, videos, etc..), Share them on a network to access external disk (some Routers allow more than one) from the outside using FTP, does not require an NAS. But if you need a external hard drive and you have included a media server, you must purchase a specific one.

But what if the disk is corrupt? Will lose all of your content! And if you want to share just one area of the disk or certain content with someone abroad? Will not get it with an external drive because it can not set permissions (who can access, it can access and what can do)! And if you want to use secure connections (FTPS)? And if you want to create a RAID system? And ...?

A External Disk is only and only one disk that is connected to a box, one that has a circuit that will allow plug and feed the disc and allow your connection to another device through a particular medium. The remaining work is performed by the Router.

As already noticed, one NAS Unit is not a device is a system! It is a device capable of processing (CPU and memory have) which is installed on an operating system specific that will make it a server.

I hope this work be helpful for someone. If someone wants to send suggestions or corrections, I appreciate that they do so on my forum

Author: José JR Crispim
Published: 2013, October

Note: if you notice any inaccuracies in this article or want to add something more, you can send me an E-Mail. I will publish a correction and put its author.