Build NAS at low cost through HFS, and achieve public network access through intranet penetration

insert image description here

foreword

As a new concept, cloud storage has been very popular in the past few years. Although a series of black swan events have caused the popularity to decline rapidly, the convenience brought by cloud storage is deeply rooted in the hearts of the people. Therefore, after the popularity of cloud storage products from major manufacturers has declined, the popularity of private NAS has risen rapidly, and the most representative one must be Synology NAS. But the price of Synology is too high for individuals and small businesses to afford. In fact, we can use cpolar to cooperate with specific software to create our own low-cost NAS. Now, let's see how to do it.

1. Download and install cpolar

The core function of cloud storage is to easily retrieve and store data under any network conditions (public Internet or local area network). This function is consistent with shared file access, so we can access web pages through shared files+ cpolar's internal network penetrates the data tunnel to access computers in the local area network on the public Internet, and transfer and download or share files. The file sharing web page we use is HFS. Therefore, what we need to download and install are Cpolar and HFS. The download addresses are as follows:

After the two softwares are downloaded, you can get the program files after decompression. Among them, cpolar can directly double-click the installation file to install it.

HFS does not need to be installed, and the program will run directly after double-clicking. The main program of HFS looks like this:

Although this software looks crude, its functions are very practical. As long as we drag the files we intend to share (including documents, pictures, videos, compressed packages, etc.) to the blank space of the "Virtual File System" on the left side of the main interface, we can turn this file into a shared file.

1.1 Setting up HFS guest

At this time, our local HFS has no visitor permissions, no remote file upload path, and no output port specified. Therefore, we need to set these contents before we can use HFS safely. The first is the guest settings for HFS. We open the "Menu" tab of the main interface of the software, find the "Other Settings" item in it, and find the "User Account" option from the sub-directory that pops up.

In "Add User", we can change the user name (double-click the user to be created until the user name becomes editable), then check "Enable" and "Super User" in the middle of the page, and enter the password in the next line . After completing the settings, you can click "Apply" in the lower right corner to save this user.

Then we create a "common user" in the same way, but this user will no longer grant "super user" permissions

It should be noted here that the "Enable" item we have always checked can directly determine whether the user is valid, instead of adding and deleting users frequently. After setting up two users, you can click the "OK" button in the lower right corner to save the settings and return to the main interface of the HFS software.

1.2 Virtual file system

Next, we set a folder for storing uploaded files, and set permissions for this folder. First, we create a new folder on the local computer (here named "upload storage"), and then click the right side of the mouse on the blank space of the "Virtual File System" on the left side of the HFS main interface, and you can view it from the pop-up menu. Go to the "Add Directory from Disk" option, click to find our newly created "Upload Storage" folder, and select "Real Directory" in the pop-up dialog box, and this folder can be included in the "Virtual File System".

Next, we right-click the red "upload storage" folder, and click the bottom "Properties" button in the pop-up menu to set permissions for this folder. On this page, we click the "Permissions" tab, and on the "Upload" page, check the users who are allowed to upload according to actual needs. Finally, click the "Confirm" button at the bottom of the page to save the settings.

Of course, we can also click the "Upload" item in the "Menu" and click "How to upload" in the pop-up option bar to view the guidelines for upload settings.

After completing these settings, our setting of HFS comes to an end. However, it should be noted that hfs is a green software. If you want it to run stably for a long time, it is best to add it to the boot self-starting list and background running list. Next, we will establish an intranet penetration data tunnel through cpolar, publish the local HFS to the public Internet, and make our computer a simplified version of NAS that can upload, download and store files.

2. Use cpolar to establish an intranet penetration data tunnel

Next, we can use cpolar to establish an intranet penetration data tunnel, so that we can access hfs on the intranet on the public Internet to upload and download files.

2.1 Reserved Tunnel

First, we log in to the official website of cpolar, and on the left side of the main page of the official website, we find the "reserve" button. On the "Reservation" page, several pieces of information are required to establish a blank data tunnel. The first is "Region", which can be selected according to the actual use; followed by "Second-level domain name", the second-level domain name will eventually be displayed in the generated web page link, so you need to pay attention to fill in the content, here we fill in HFSNAS; finally " Description" can be understood as a comment for this data tunnel, which can be filled in arbitrarily. After filling in these contents, you can click the "Reserve button" on the right to reserve this data tunnel.

Then, we return to the local computer client of cpolar (you can find the shortcut of cpolar in the start menu, or enter localhost:9200 in the browser address bar to log in). On the left side of the main interface of the cpolar client, find "Create Tunnel" under the "Tunnel Management" item, and click the create tunnel page today to combine the blank data tunnel we set in the cpolar cloud with the local hfs software.

2.2 Tunnel name

The first is "Tunnel Name", which can be regarded as a note, mainly to distinguish it from other data tunnels. We choose HTTP in the second line "protocol"; the third item "local address" is the data output port of the hfs software. Click the "Port" button on the top of the interface to modify the output port number), just fill in "80" here; write down the "domain name type", since we have established a blank data tunnel in the cpolar cloud, so here select " Second-level sub-domain name", after selecting the second-level sub-domain name, a blank Sub Domain column will appear below, here we fill in the saved data tunnel name "HFSNAS"; the last "region" we choose according to the actual use area That's it.

After filling in the above information, you can click the "Create" button at the bottom of the page to associate the blank data tunnel with the output port of the local hfs software.

And we can find the tunnel entrance that can link to the local hfs software on the "Online Tunnel List" page under the "Status" item on the left side of the cpolar main interface, that is, the public Internet address. Let's try to enter this URL to see if we can link to the HFS software on the local computer

2.3 Successfully use cpolar to create a second-level subdomain name to access local hfs

It can be seen that we have successfully used the second-level subdomain URL created by cpolar to access hfs on the local computer. After logging in as a user, we can not only download various types of files from hfs, but also upload files to hfs " "Upload folder" to create a simple version of NAS at the lowest cost.

Summarize

So far, we have successfully used the combination of cpolar+hfs to build a simplified NAS. We can use it not only for corporate collaborative office, but also for the arrangement and tracking of important corporate work. It should be noted that the function of retaining the second-level subdomain name and custom domain name is an advanced function, and cpolar needs to be upgraded to the VIP level before it can be used. Of course, the combination of cpolar+hfs to create a private NAS is only one of the application scenarios of cpolar's powerful functions, and the data tunnel created by cpolar can also be applied in more scenarios.

Reprinted from the cpolar pole cloud article: [Build NAS through HFS at low cost, and achieve public network access through intranet penetration] ( Build NAS through HFS at low cost, and achieve public network access through intranet penetration-cpolar pole cloud )

Today's sharing is over here! If you think the article is not bad, you can support it three times . There are many interesting articles on Chunren's homepage . Friends are welcome to comment. Your support is the driving force for Chunren to move forward!

insert image description here

Guess you like

Origin blog.csdn.net/weixin_63115236/article/details/132673405