Intranet Penetration——Build a website using the website program that comes with Windows

1 Introduction

In various tutorials and introductions on the Internet, building a webpage will rely on the help of various software, such as Apache and Nginx running on the webpage, database software MySQL and MSSQL, etc. For the convenience of users, there are also XAMPP, PHPStudy, and pagoda panels. 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 IIS service means that a web page can be created. Moreover, IIS can also have an editing environment interface "FRONTPAGE", "INDEX SERVER" with full-text search function, "NET SHOW" with multimedia function, and the like.

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程序和功能

[External link picture transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the picture and upload it directly (img-Dak5euCD-1691996591778)(https://images.cpolar.com/img/2b91548073341bc99a9bcbd2b143c514.png)]

On 程序和功能the page, click the button on the left 启动或关闭Windows功能, and a small window will appear, which includes the IIS service (Internet Information Server) that 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 the required items are checked, you can click 确认the button at the bottom of the page to install these items and services

20230330092206

[External link picture transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the picture and upload it directly (img-bNqFhK8z-1691996591784)(https://images.cpolar.com/img/04fc4d19ccc7dd4291ed6045a1be26fa.png)]

Wait a short time for Windows to notify that the required services have been installed.

[External link picture transfer failed, the source site may have an anti-theft link mechanism, it is recommended to save the picture and upload it directly (img-I8tG5WAV-1691996591785)(https://images.cpolar.com/img/56c9ff1fd3b73f2a9bab3e76d112d7e5.png)]

At this point 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 to create web pages. First we open Windows and find the project 控制面板in it管理工具

[External link picture transfer failed, the source site may have an anti-theft link mechanism, it is recommended to save the picture and upload it directly (img-6weBtbY5-1691996591787)(https://images.cpolar.com/img/d4228561211667b103d8b03e317769e0.png)]

In 管理工具, you can find Internet Information Server(IIS)管理器the item, double-click to open it, and you can enter the main interface of 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 create a page called "Deault Web Site" by default (this page is often attacked by big guys, 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 (the website uses those programs to run, do not modify it unless you are an expert)", "physical path" (the root directory of the website you intend 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 name of the website "test", choose to use the DefaultAppPoolprogram pool, and put the physical path (the root directory of the website) in the newly created website\test folder under the D disk. And IP地址choose all unallocated, the port Then select 8080 (the port here needs to be an unoccupied port, otherwise our webpage will not start due to the port occupation). After completing these settings, you can click the button below to complete the setting of the new website 确定.

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

20230330092214

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

20230330092215

Finally, in the "test" webpage setting window, we find and click and 目录浏览double-click, 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 webpage setting window. In order to test whether our webpage can run normally, you can click 浏览the button on the right side of the window to conduct an access test on 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 established successfully. Among them, newpage.html is the content file created by the author, as long as you click on this file (or add the file name and extension after the domain name), you can display the content in the newly created web page.

20230330092220

When our webpage is successfully created, we can fill it with content. We can obtain webpage script compression packages on the Internet or elsewhere, unzip them to the root directory of the new webpage, and then load the content of the script.

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

3. Cpolar intranet penetration

3.1 Download and install Cpolar

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 just go all the way Nextto complete the installation.

20230330092223

20230330092224

为保证客户数据的安全,cpolar会为每个用户创建独立的数据隧道,并辅以用户密码和token码保证数据安全,因此我们必须注册cpolar,注册过程也非常简单,只要在cpolar主页右上角点击“用户注册”,在注册页面填入必要信息,就能完成注册。

20230330092225

20230330092226

3.2 Cpolar云端设置

完成cpolar内网穿透的安装注册和本地网页搭建后,我们就可以着手建立一条内网穿透数据隧道,将这个网页发布到公共互联网上。由于网页需要能够稳定访问,而cpolar免费版的数据隧道每24小时重置一次。笔者并不想每天进行重连设置,因此cpolar将升级至vip版,以便能获得能长期稳定存在的内网穿透数据隧道。

要建立长期稳定存在的数据隧道,我们先登录cpolar的官网,并在用户主页面左侧找到预留按钮,并点击进入cpolar的数据隧道预留页面。在这里生成一个公共互联网地址(也可以看做数据隧道的入口),由于此时这个地址没有连接本地的软件输出端口,因此也可以看做是一条空白的数据隧道。

20230330092227

在预留页面,可以看到很多种可保留的数据隧道,这里我们选择保留二级子域名栏位。如果自己已经购买了域名的,也可以选择“保留自定义域名”栏位,但需要在域名供应商处对自有的域名进行解析,才能与cpolar配合使用。

20230330092228

在“保留二级子域名”栏位,需要进行几项信息的简单设置

  • 地区:服务器所在区域,就近选择即可
  • 二级域名:会最终出现在生成的公共互联网地址中,作为网络地址的标识之一
  • 描述:可以看做这条数据隧道的描述,能够与其他隧道区分开即可)

完成这几项设置后,就可以点击右侧的“保留”按钮,将这条数据隧道保留下来。

20230330092229

20230330092230

如果这条数据隧道不打算再使用,还可以点击右侧的x将其轻松删除,节约宝贵的隧道名额。

3.3 Cpolar本地设置

二级子域名保留好后,我们就可以回到cpolar本地客户端,将cpolar云端生成的公共互联网地址与本地IIS建立的网页连接起来,让我们能在公共互联网上打开本地电脑上的网页。

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

20230330092231

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

On this page, several information settings also need to be made, including:

1. 隧道名称– It can be regarded as cpolar’s ​​local tunnel information comment, as long as it is convenient for us to distinguish;
2. 协议– We build a web page with http protocol, so we choose http protocol;
3. 本地地址– The local address is the output port number of the local website , and the port number we filled in when setting up the webpage is 8080, so fill in 8080 here;
4. 域名类型– In this example, we have reserved a data tunnel for the second-level subdomain name in the cpolar cloud, so check the " Second-level sub-domain name" (if the reserved domain name is a custom domain name, check the custom domain name), and fill in the reserved second-level sub-domain name in the "Sub Domain" column on the next line, here we fill in the reserved The second-level subdomain name "newpage" (if you just create a temporary data tunnel, you can directly check "random domain name", and the cpolar client will generate the network address by itself
) 地区; ;

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, where we can see the status of the data tunnel (whether it is smooth), Or control the opening, closing or deleting of the tunnel. 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

So far, 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 data tunnel created by cpolar to publish it to the public Internet. Although the process of creating web pages in IIS is a bit complicated, it is a good opportunity for us to get familiar with the Windows system, and it is also a very interesting and good thing to learn new knowledge

Reprinted from cpolar pole cloud article: [windows server comes with IIS to build a website and publish public network access [intranet penetration]] (windows server comes with IIS to build a website and publish public network access [intranet penetration] - cpolar pole cloud )

Guess you like

Origin blog.csdn.net/m0_72165281/article/details/132276394