IIS builds a local computer server: a step-by-step guide for realizing public network access through intranet penetration technology

1 Introduction

In various tutorials and introductions on the Internet, building web pages will use the help of various software, such as Apache and Nginx that run the web page, and database software MySQL and MSSQL. For the convenience of users, XAMPP, PHPStudy, Pagoda Panel, etc. have also appeared. A series of integration services, such as , are all for the convenience of us to quickly build a website. Is it impossible to build a website without using these software? The answer is of course no, the Windows system actually integrates the software environment necessary to build a website. Let us take a look today, how to use the website program that comes with Windows to build a website.

2. Windows web page settings

Among the many services that come with the Windows system, there is an IIS service. The full name of IIS is Internet Information Server, which includes Gopher server and FTP server. Installing the IIS service means that you can create a web page. Moreover, IIS can also have the editing environment interface "FRONTPAGE", the "INDEX SERVER" with the full-text search function, and the "NET SHOW" with the multimedia function.

After understanding what IIS service is, we can start IIS service on our Windows computer and try to create a web page.

2.1 Windows IIS function settings

First of all, we need to open the IIS service of Windows, and these services can be opened in the settings of the start menu. The specific operation method is to open 开始菜单, click the button, and select the item 设置on the page设置应用

20230330092201

After entering 应用the interface, scroll to the bottom of the page and click程序和功能

20230330092202

On 程序和功能the page, click the button on the left 启动或关闭Windows功能, and a small window will appear, including the IIS service (Internet Information Server) we need to install.

20230330092203

As you can see here, there are a lot of content under the Internet Information Server project, here we have to check Web管理工具and 万维网服务two items. In these two items, it is not necessary to check all the contents. The specific contents that need to be checked are as follows:

20230330092204

20230330092205

After all the required items are checked, you can click 确认the button at the bottom of the page to install these items and services

20230330092206

20230330092207

Wait for a short period of time and Windows will notify you that the required services have been installed.

20230330092208

At this time we can use the IIS service to create a new web page.

2.2 IIS web page access test

After completing the opening of the IIS service, we can start creating the web page. First we open Windows and find the project 控制面板in it管理工具

20230330092209

In 管理工具, you can find Internet Information Server(IIS)管理器the item and double-click it to open it to enter the main interface of the web page settings.

20230330092210

20230330092211

On the left side of the "Internet Information Server (IIS) Manager" page, you can see the web page under the computer. Generally, Windows will build a page called "Deault Web Site" by default (some experts have said that this page is often attacked, so we can stop it from running). But we don't want to operate on the page at this time, so don't worry about it.

We 网站right-click the icon, click the right-click menu添加网站

20230330092212

On the pop-up 添加网站page, you can set up the website you plan to create. The specific settings include "website name (to distinguish other existing websites)", "application pool (which programs are used to run this website, do not modify it unless you are an expert)", "physical path" (the root directory of the website you plan to build) , since Windows has high requirements on the permissions of the C drive, it is best to establish the root directory of the website under other disks), "IP address" and "port", etc.

20230330092213

In this example, we set up a webpage with the website name "test", choose to use the DefaultAppPoolprogram pool, and place the physical path (the root directory of the website) in the newly created website\test folder under the D drive. And IP地址select all unallocated ports. Then select 8080 (the port here needs to be an unoccupied port, otherwise our web page will not be able to start because the port is occupied). After completing these settings, you can click the button below to complete the settings of the new website 确定.

Next, after we click on the newly created test web page, we find 身份验证the option in the settings box on the right and double-click to enter the "Authentication" page.

20230330092214

On the "Authentication" page, we find and select it 匿名身份验证. After selecting it, click the "Edit" button on the right to edit the "Anonymous Authentication" content. The specific editing content is very simple, just check 应用程序池标识the box. After editing is completed, click "OK" to save the changes.

20230330092215

Finally, we find and click and double-click in the "test" web page settings window , and select directory browsing 目录浏览on the "Directory Browsing" setting page .启用

20230330092216

20230330092217

After completion, we click on the "test" page on the left to enter the web page settings window. In order to test whether our webpage can run normally, you can click 浏览the button on the right side of the window to access the newly created webpage.

20230330092218

20230330092219

Here, the webpage has successfully displayed the content without returning an error message such as "404", indicating that our webpage has been successfully established. Among them, newpage.html is a content file created by the author. As long as you click on the file (or add the file name and extension after the domain name), the content can be displayed in the newly created web page.

20230330092220

When our web page is successfully created, we can fill it with content. We can obtain web script compressed packages from the Internet or elsewhere, and unzip them to the root directory of the new web page to load the script content.

However, web pages that cannot be accessed on the public Internet are of no practical significance, so we can use cpolar intranet penetration to publish the new web page created by this ISS service to the public Internet.

3. Cpolar intranet penetration

3.1 Download and install Cpolar intranet penetration

To install cpolar intranet penetration on a local computer, we can visit the official website of cpolar and download the Windows version of cpolar software

cpolar official website: https://www.cpolar.com/

20230330092221

20230330092222

After the download of Cpolar is complete, decompress the downloaded file, double-click the decompressed .msifile, and the installation program can be executed automatically. Then it only takes one step Nextto complete the installation.

20230330092223

20230330092224

In order to ensure the security of customer data, cpolar will create an independent data tunnel for each user, supplemented by user passwords and token codes to ensure data security. Therefore, we must register with cpolar. The registration process is also very simple. Just click on the upper right corner of the cpolar homepage. "User Registration", fill in the necessary information on the registration page to complete the registration.

20230330092225

20230330092226

3.2 Cpolar cloud settings

After completing the installation and registration of cpolar intranet penetration and building the local web page, we can start to establish an intranet penetration data tunnel and publish this web page to the public Internet. Since the webpage needs to be able to be accessed stably, the data tunnel of the free version of cpolar is reset every 24 hours. The author does not want to reconnect settings every day, so cpolar will be upgraded to the VIP version in order to obtain a long-term stable intranet penetration data tunnel.

To establish a long-term and stable data tunnel, we first log in to cpolar's official website, find the 预留button on the left side of the user's home page, and click to enter cpolar's data tunnel reservation page. A public Internet address is generated here (can also be regarded as the entrance of the data tunnel). Since this address is not connected to the local software output port at this time, it can also be regarded as a blank data tunnel.

20230330092227

On the reservation page, you can see many kinds of data tunnels that can be reserved. Here we select 保留二级子域名the field. If you have purchased a domain name, you can also select the "Reserve custom domain name" field, but you need to resolve your own domain name at the domain name provider before it can be used with cpolar.

20230330092228

In the field of "Reserve the second-level subdomain name", you need to make simple settings for several information

  • 地区: The area where the server is located, just select the nearest one
  • 二级域名: Will eventually appear in the generated public Internet address as one of the identifiers of the network address
  • 描述: It can be regarded as the description of this data tunnel, which can be distinguished from other tunnels)

After completing these settings, you can click the "Reserve" button on the right to retain this data tunnel.

20230330092229

20230330092230

If this data tunnel is no longer intended to be used, you can click on the right xto delete it easily, saving valuable tunnel quota.

3.3 Cpolar Local Settings

After the second-level subdomain name is reserved, we can return to the cpolar local client and connect the public Internet address generated by the cpolar cloud with the web page created by the local IIS, so that we can open the web page on the local computer on the public Internet.

Open and log in to the cpolar client locally (you can enter localhost:9200 in the browser to access it directly, or you can click the cpolar client shortcut in the start menu).

20230330092231

After logging in to the cpolar client, click the 隧道管理- 创建隧道button on the left side of the client's main interface to enter the local tunnel creation page (if you want to create a temporary data tunnel that does not reset the address for 24 hours, you can set it up directly here, without having to set it up on the cpolar official website blank data tunnel).

On this page, you also need to make several information settings, which include:

> 1. 隧道名称– It can be regarded as cpolar’s ​​local tunnel information annotation, as long as it is convenient for us to distinguish;
> 2. 协议– We are creating a web page with http protocol, so we choose http protocol;
> 3. 本地地址– The local address is the local website’s Output the port number, and the port number we filled in when setting up the web page is 8080, so we also fill in 8080 here;
> 4. 域名类型– In this example, we have reserved a data tunnel for the second-level subdomain name in the cpolar cloud, Therefore, check "Second-level subdomain name" (if the reserved domain name is a custom domain name, check the custom domain name), and fill in the reserved second-level subdomain name in the "Sub Domain" column on the next line. Here we fill in The reserved second-level subdomain name "newpage" (if you are only creating a temporary data tunnel, directly check "Random domain name", and the cpolar client will generate the network address by itself); > 5. - Just like when setting up the cpolar cloud
, 地区we Fill in the nearest location according to the actual location;

After completing these settings, you can click the "Create" button below to connect the public Internet address created on the cpolar cloud with the local web page

20230330092232

After completing the data tunnel connection between the cpolar client and the cpolar cloud, the cpolar client will automatically jump to the "Tunnel List" page under the "Tunnel Management" item. We can see the status of the data tunnel (whether it is smooth) on this page. Or control the opening, closing or deletion of tunnels. If you need to change the information of the tunnel, you can also use the "Edit" button here

20230330092233

4. Public network access test

The public Internet address of the created data tunnel can be seen on the 状态-- 在线隧道列表page.

20230330092234

We copy and paste this address into the browser, and we can access the new web page created by the local IIS service through the public Internet.

20230330092235

5 Conclusion

At this point, we have successfully used the IIS service that comes with Windows to create a new web page on the local computer, and used the intranet created by cpolar to penetrate the data tunnel and publish it to the public Internet. Although the process of creating a web page in IIS is a little complicated, it is a good opportunity for us to become familiar with the Windows system, and it is also a very interesting and good thing to learn new knowledge.

Reprinted from the cpolar pole cloud article: [IIS website building] local computer as server to build a website and public network access "intranet penetration"

Guess you like

Origin blog.csdn.net/weixin_46703995/article/details/132601617