Application of intranet penetration - How to build WebDAV locally and combine it with intranet penetration tools to create a private cloud disk that can be accessed remotely

Preface

How to build WebDav on Windows and combine it with cpolar's intranet penetration tool to achieve public network access.

WebDav is an http-based protocol that allows users to create, modify, delete and move files on the server. Its advantage is that it can easily access and manage files through the network, supports multi-user collaboration, and provides a secure encryption mechanism. Using the WebDav protocol, users can mount the network disk to a local computer or mobile phone, and directly operate files on the network disk.

1. Install the necessary WebDav components for IIS

Open the Control Panel, change the view mode to "Categories", go to "Programs", "Turn Windows features on or off"

In Internet Information Services (IIS), check "IIS Management Console", "Windows Authentication", "Management Services", "WebDAV Publishing" and "Directory Browsing", and then 确定install.

After completing the installation, find "IIS Manager" in "Windows Management Tools" and open it.

On the website, right click and add website

Give the website a name and select a physical path. Here, I named it webdav. The path selection is: D:\webdav3. The port number is set to 8099.

image-20231215101207396

Select the webdav site and enter its "WebDAV Authoring Rules"

20221117180007Enable authoring rules

20221117180012

Add creation rules

20221117180018

20221117180023

Select the webdav site and enter "Identity Authentication"

20221117180028

Enable "Basic Authentication" and disable "Windows Authentication" and "Anonymous Authentication"

20230206140528

Select "webdav" and enter "Directory Browse"

20221117180040

Click 'Enable'

20221117180046

Restart webdav site

20221117180051

2. Client testing

In the browser, enter http://127.0.0.1:8099, enter your username and password to log in, and you can access the file content in the WebDav service.

image-20231215101526822

3. Use cpolar intranet penetration to expose the WebDav service to the public network

3.1 Install cpolar intranet penetration

Log in to the cpolar official website: www.cpolar.com and find the download address.

On the download page of cpolar, find the corresponding version of the cpolar installation program. The author is using the Windows operating system, so I chose the Windows version to download.

image-20231215105220793

After the download is completed, unzip the downloaded file and double-click .msithe file to automatically execute the cpolar installation program. We only need to go all the way Nextto complete the installation.

20230322092212

20230322092213

Since cpolar will create an independent data tunnel for each user, supplemented by user passwords and token codes to ensure data security, we need to register users before using cpolar. The registration process is also very simple. Just click on the upper right corner of the cpolar homepage 用户注册and fill in the necessary information on the registration page to complete the registration.

20230322092214

20230322092215

3.2 Configure WebDav public network access address

After logging in to the official website, click Reserve on the left, select to reserve the second-level subdomain name, set a second-level subdomain name, click Reserve, and copy the reserved second-level subdomain name after the reservation is successful.

image-20231215102255210

image-20231215102351306

Open the browser and access 127.0.0.1:9200, log in to the cpolar web UI management interface, and log in with your cpolar email account.

20221117180109

Click Tunnel Management - Create Tunnel on the left dashboard to create a WebDav public network address tunnel!

  • Tunnel name: You can customize the name. Be careful not to duplicate the existing tunnel name.
  • Protocol: Select http
  • Local address: 8099 (port for local access)
  • Domain name type: Second-level subdomain name
  • Sub Domain: Fill in the successfully reserved second-level subdomain name
  • Region: Select China Vip

Click创建

image-20231215102525167

Open the online tunnel list, and you can see that two fixed second-level subdomain public network addresses have been generated.

image-20231215102658335

Copy one of the public network addresses and open a new browser to access it. You can see that you have entered the webdav login interface.

image-20231215102826310

4. Map local drive letter access

Every time you log in to WebDav, you have to open a webpage and enter the URL. It is troublesome to log in again with your account and password. In fact, WebDav can be mapped to a local drive letter, which facilitates direct local access.

Open the folder, click This PC, click Computer above - Map network drive

20230206142254

Enter the public network address just generated by mapping the local 8099 port through cpolar. Note that it needs to be https://filled in in the format

image-20231215103130473

Fill in the windows account password to connect

image-20231215103214397

The connection is successful and you can directly access the resources.

image-20231215103306669

Guess you like

Origin blog.csdn.net/weixin_42878111/article/details/135063131