LOGO

FreeNAS Server Setup: Remote Access Guide

October 5, 2011
FreeNAS Server Setup: Remote Access Guide

Transforming a PC into a Robust File Server with FreeNAS

FreeNAS represents a cost-effective and versatile solution, being a free and open-source operating system built on the BSD foundation.

Its primary function is to repurpose standard PC hardware into a highly reliable file server.

Initial Installation and Configuration

This guide will detail a fundamental installation process, focusing on establishing a straightforward file share.

Furthermore, we will configure remote access to your files, leveraging the security of encrypted Secure FTP over SSH for connections from any location.

Setting Up a Basic File Share

The initial steps involve installing the FreeNAS operating system onto your chosen hardware.

Once installed, the system requires basic configuration, including network settings and storage pool creation.

Enabling Remote Access via Secure FTP over SSH

To facilitate access to your files remotely, FreeNAS offers the capability to enable Secure FTP over SSH.

This method ensures that all data transmitted between your server and your client is encrypted, protecting sensitive information.

Key Benefits of Using FreeNAS

  • Cost-Effectiveness: Utilizing existing hardware reduces capital expenditure.
  • Reliability: The BSD base and ZFS filesystem contribute to data integrity and system stability.
  • Security: Encrypted protocols like Secure FTP over SSH safeguard data during transmission.
  • Accessibility: Remote access allows file retrieval from anywhere with an internet connection.

By following these steps, you can effectively transform a standard PC into a powerful and secure file server using FreeNAS.

This setup provides a robust solution for both home and small business file storage and sharing needs.

Prerequisites & Viable Options

Establishing this system requires either a pre-existing, functional FreeNAS installation, or the necessary components to create one.

  • The most recent installation ISO, obtainable from the FreeNAS downloads section.
  • A dedicated computer or virtual machine environment.
  • A USB drive with a capacity of 4GB or greater.

Furthermore, configuring remote accessibility necessitates:

  • The capability to modify your router settings for port forwarding or dynamic DNS configuration.
  • An Internet Service Provider that does not impose restrictions on numerous ports.

Should FreeNAS not align with your needs, consider these alternatives:

  • Currently, Microsoft Windows Home Server serves as my preferred home file and backup server solution, available at a very affordable $49 for an OEM license.
  • Amahi Home Server presents a complimentary, Linux-based option, featuring an application store for streamlined functionality additions via single-click installations. While robustly developed, certain aspects like disk pooling may remain somewhat unstable for typical users, occasionally requiring command-line intervention for optimal configuration.
  • unRAID is a strong contender, particularly well-suited for both home NAS deployments and small business applications.
  • Employing a router flashed with DD-WRT firmware, coupled with a USB hard drive, can also fulfill this role, though substantial configuration adjustments are often needed for reliable operation.

For further assistance in decision-making, a comparative analysis of FreeNAS versus OpenMediaVault versus Amahi is available for review.

Setting Up FreeNAS

Unlike some operating systems, FreeNAS is not designed for dual-booting, and it lacks a built-in graphical partitioning tool. Installing directly onto a large-capacity drive, such as a 1TB drive, will result in wasted storage space. Therefore, the installation process requires utilizing either a USB drive or an SD card, provided your PC supports the latter.

For those unfamiliar with the process, it is recommended to initially test FreeNAS within a virtual machine environment. A guide to VirtualBox can be a helpful resource for this purpose. During the creation of this guide, Parallels on macOS was used; however, it's important to note that it presents challenges when booting from USB devices, necessitating the creation of a dedicated 4GB internal drive for installation.

During the boot sequence, select the default option presented at the top of the screen. Ensure that the correct installation destination is chosen. After the installation is complete, remove the installation media (CD or detached image) and restart the system.

Following a successful installation, a web GUI URL will be displayed. This allows you to revert to your primary computer and proceed with the configuration process over your local area network (LAN).

To enhance system security, navigate to Users -> Change password and establish a strong administrator password. The default configuration lacks an admin password, making this step crucial. Subsequently, proceed to Users -> Add User to create a standard user account. This account will be used for authentication in subsequent steps.

Setting Up File Sharing

The process of configuring a share begins with the addition of a ‘volume,’ essentially a hard disk, followed by the creation of the share itself. Multiple drives can be configured as a software RAID to enhance data integrity, though a detailed explanation of that process is beyond the scope of this guide.

Initiate the configuration by selecting the ‘storage’ button located in the top menu.

set-freenas-server-access-files-2.jpg

Proceed by clicking create volume. The assigned name is largely inconsequential; however, it is crucial to select the drives intended for inclusion within the volume. In this instance, a single drive will be added.

set-freenas-server-access-files-3.jpg

Following this step, you should observe one ‘active’ volume displayed. Select change permissions and designate the owner of the group as the previously created user. Ensure the Group ->Write permission checkbox is also activated. While suitable for testing, a real-world implementation would typically involve creating a group for all users and assigning ownership to that collective entity.

set-freenas-server-access-files-4.jpg

Subsequently, navigate to the sharing tab. This section allows selection between share types: Apple, Unix, or Windows. A Windows share will be established for this example, initiated by clicking Add Windows Share. The primary challenge lies in selecting the appropriate folder; in this case, the root of the /mnt/drive1 volume was chosen.

set-freenas-server-access-files-5.jpg

The CIFS service must also be enabled, as it activates the Windows share ‘listener’. From the sidebar, select Services ->Control Services and toggle CIFS to the ‘on’ position. While there, enable SSH as well, which will be utilized later for secure FTP access – avoid enabling the standard FTP service.

set-freenas-server-access-files-6.jpg

The share should now be accessible from a Windows computer. If it doesn’t appear on the network, directly enter \\freenas into the address bar to force discovery. Note that typing //freenas will redirect you to the web GUI.

set-freenas-server-access-files-7.jpg

With the Windows share confirmed as functional, the next step involves setting up remote data access.

DynDNS

To facilitate access to our files using a straightforward URL, a free dynamic DNS address will be assigned to our residential IP address. Begin the process by visiting the DynDNS website to create a complimentary account.

Email address confirmation is a necessary step. Upon completion, you will be directed to a service plan page.

set-freenas-server-access-files-8.jpg

Located in smaller text at the bottom of the page is a link enabling the setup of a free account, supporting up to two hostnames. Select this link to proceed.

set-freenas-server-access-files-9.jpg

Specify your preferred hostname, choosing from the available domains in the drop-down menu. Then, click the blue text displaying your current IP address.

This action will automatically populate the IP address field with your detected IP.

set-freenas-server-access-files-10.jpg

Port Forwarding

The specific setup process for port forwarding varies depending on the router model, making a universally applicable guide challenging. In my instance, access to the router’s configuration interface was achieved by navigating to the address 192.168.0.1, followed by selecting the Port Forwarding option.

A screenshot illustrating this process is available for reference.

Configuring the Port Forward

To enable external access to your FreeNAS server, it is necessary to forward the port used by the SSH service, which is port 22, to the internal IP address of your FreeNAS installation.

In this particular network configuration, the FreeNAS server’s internal IP address is .11.

Testing SSH Connectivity

Initially, a verification of standard SSH functionality is recommended. Utilizing a Linux or macOS terminal, execute the following command:

ssh username@domain.dyndns.org

Substitute 'username' with the account you previously configured, and 'domain.dyndns.org' with the address obtained from DynDNS. A host authenticity verification error may appear; however, proceed by typing YES to establish the connection.

Successful operation is indicated by the display of textual output.

set-freenas-server-access-files-12.jpg

Subsequently, launch your preferred FTP client. Input the identical credentials – username, the DynDNS domain name, and the password.

Ensure the protocol setting is specifically configured to SFTP; this is a critical step for secure file transfer.

set-freenas-server-access-files-13.jpg

Upon successful configuration, a comprehensive view of the entire filesystem should be presented. This allows you to navigate to the specific folder or share you require access to.

You have now achieved full remote access to your shares from any location globally!

set-freenas-server-access-files-14.jpg

This exploration has only touched upon the capabilities of FreeNAS. Further features will be detailed in future updates, so please check back regularly.

It is also recommended to test file transfer speeds to experience the performance benefits firsthand!

#FreeNAS#remote access#file server#NAS setup#network storage#VPN