Article directory
-
- 1. Install the WebDav Server package in Synology Package Center
- 2. LAN test WebDav service
- 3. Create a cpolar TCP tunnel and penetrate the WebDav service through the intranet
- 4. Client tests external network access to WebDav service
- 5. Configure a fixed TCP address for long-term use (recommended)
- 6 Summary
WebDAV is a communication protocol based on the HTTP protocol. It is suitable for some customers who are restricted by other protocols and require the use of WebDAV protocol for data transmission. The following is a setup tutorial for accessing Synology NAS through WebDAV protocol.
1. Install the WebDav Server package in Synology Package Center
Click to open the Package Center, searchwebdav
, and click安装套件
.
1.1 After the installation is complete, start the webdav service and check the HTTP checkbox
Its default port is port 5005.
2. LAN test WebDav service
It is recommended to use a WebDAV client that supports UTF-8 to avoid encoding errors when using the WebDAV service. Here we test it through the RaiDrive client.
2.1 Download RaiDrive client
RaiDrive customer terminal:https://www.raidrive.com/download/
2.2 Open RaiDrive and set the interface language to Chinese.
2.3 Click the ‘Add’ button to create a new virtual drive area
Select and fill in the relevant information as shown below:
2.4 Successful test connection within LAN
Next, we need to penetrate the internal network to make the WebDav service accessible in the external network environment.
3. Create a cpolar TCP tunnel and penetrate the WebDav service through the intranet
It is assumed that you have installed the cpolar package. If you have not installed cpolar on Synology NAS, please refer to the tutorial
" Install the cpolar package on Synology NAS》
3.1 Log in to the cpolar-ui interface and create a temporary TCP tunnel
Open cpolar on Synology and log in to the cpolar web ui management interface. After successfully logging in, click隧道管理
———— on the left dashboard创建隧道
Fill in the tunnel information:
- Tunnel name: In this example, it is
tunnel-webdav
, it can be customized, just be careful not to repeat it - Agreement Type: Select
TCP
- Local address: Select the port number of the WebDav service
5005
- Port type: The current selection is random and can be used for free. Let’s test it temporarily.
3.2 Obtain the public network temporary tunnel address
After the tunnel is successfully created, we can see the results generated by the tunnel we just created in the 状态
————在线隧道列表
on the left dashboard. The random URL address is currently: 1.tcp.cpolar.top:30819
, where 1.tcp.cpolar.top
is the public network address, and 30819
is the corresponding public network The port number.
4. Client tests external network access to WebDav service
Open RaiDrive, we modify the previous virtual drive letter link to the public network address we just obtained, and change the port number to the public network port number. Click Connect, and the connection can still be successful.
5. Configure a fixed TCP address for long-term use (recommended)
Because what we have just established is a temporary tunnel, the connection can be successful, but the temporary tunnel will change within 24 hours, and we hope that the TCP tunnel of the virtual drive letter is a long-term fixed link. Therefore, it is strongly recommended to upgrade to the professional package and configure it as Fixed TCP port address, long-term use, and the bandwidth will be increased to 3M accordingly.
5.1 Reserve fixed TCP addresses
Visit cpolar official website backend: https://dashboard.cpolar.com/
Log in to the backend of the cpolar official website—>Reservation—>Reserve a fixed TCP address—>Select a region and add a TCP port:
- Select region as China VIP
- The description is customizable, in this case webdav
After the address is successfully reserved, the system will return you a TCP address, for example: 2.tcp.vip.cpolar.cn:11186
5.2 Modify random tunnel to fixed TCP address
Go back to the cpolar web-ui interface on Synology, edit the previous tunnel-webdav tunnel, and click the 编辑
button
Modify the tunnel information:
- Tunnel type: Select fixed TCP port
- Reserved TCP address bar: 2.tcp.vip.cpolar.cn:11186 (this example)
Click更新
5.3 View the online tunnel list
After the tunnel is updated successfully, you can see that the tunnel is online, indicating that the configuration is successful. Click 状态
————在线隧道列表
on the left dashboard, and you can see that the public network address has been updated to the public network fixed TCP port address we just reserved.
5.4 Modify the final test of WebDav client
Go back to RaiDrive, disconnect first, then change the address to a fixed TCP address and port number, and then reconnect.
5.5 Successfully connected to the fixed public network TCP address
6 Summary
Today we shared how to build the WebDav service on Synology NAS for file sharing, and cooperate with cpolar to penetrate the intranet and make the public network accessible. At the same time, the terminal RaiDrive client is used to share remote server files with a virtual local drive letter, achieving the purpose of freely accessing NAS file server file sharing at home or outside.