Article directory
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.
Select the webdav site and enter its "WebDAV Authoring Rules"
Enable authoring rules
Add creation rules
Select the webdav site and enter "Identity Authentication"
Enable "Basic Authentication" and disable "Windows Authentication" and "Anonymous Authentication"
Select "webdav" and enter "Directory Browse"
Click 'Enable'
Restart webdav site
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.
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.
After the download is completed, unzip the downloaded file and double-click .msi
the file to automatically execute the cpolar installation program. We only need to go all the way Next
to complete the installation.
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.
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.
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.
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创建
Open the online tunnel list, and you can see that two fixed second-level subdomain public network addresses have been generated.
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.
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
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
Fill in the windows account password to connect
The connection is successful and you can directly access the resources.