Rotten mud: real machines access websites in virtual machines

Source: Internet
Author: User

This article is sponsored by 0 degrees outdoor and first launched in the dark world.

Today, for an experiment on a linux system, I plan to access the website in the virtual machine on a real machine.

Because the VM is used, the operation is relatively easier. We will first use windows server 2003 as the demonstration site.

Step 1: Install a website on the server or directly use the one that comes with IIS. However, you can use the built-in website directory to slightly modify it to distinguish normal access, prompt information that cannot be accessed. For example:

650) this. width = 650; "title =" clip_image001 "style =" border-right-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; border-top-width: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image001 "src =" http://www.bkjia.com/uploads/allimg/140211/225Q21645-0.png "width =" 741 "height =" 430 "/>

Step 2: configure the IP address. The IP address configured here is a static IP address, not a dynamic IP address. At the same time, there are three network connection methods used by our Virtual Machine (NAT) to connect to the network ). For example:

650) this. width = 650; "title =" clip_image002 "style =" border-right-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; border-top-width: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image002 "src =" http://www.bkjia.com/uploads/allimg/140211/225Q251D-1.png "width =" 424 "height =" 262 "/>

650) this. width = 650; "title =" clip_image003 "style =" border-right-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; border-top-width: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image003 "src =" http://www.bkjia.com/uploads/allimg/140211/225Q21360-2.png "width =" 931 "height =" 394 "/>

After configuring the IP address, you need to map the port.

Step 3. Port ing:

650) this. width = 650; "title =" clip_image004 "style =" border-right-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; border-top-width: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image004 "src =" http://www.bkjia.com/uploads/allimg/140211/225Q22T7-3.png "width =" 316 "height =" 227 "/>

650) this. width = 650; "title =" clip_image005 "style =" border-right-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; border-top-width: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image005 "src =" http://www.bkjia.com/uploads/allimg/140211/225Q212O-4.png "width =" 715 "height =" 571 "/>

650) this. width = 650; "title =" clip_image006 "style =" border-right-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; border-top-width: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image006 "src =" http://www.bkjia.com/uploads/allimg/140211/225Q25F6-5.png "width =" 596 "height =" 357 "/>

It should be noted that the "host port" is filled with the port number for accessing the real machine, and the "virtual machine IP Address" is filled with the virtual machine to be mapped out, the "virtual machine port" is the port number provided by the virtual machine.

Enter the following information:

650) this. width = 650; "title =" clip_image007 "style =" border-right-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; border-top-width: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image007 "src =" http://www.bkjia.com/uploads/allimg/140211/225Q2M64-6.png "width =" 937 "height =" 432 "/>

After the above configuration is complete, we can access the website in the virtual machine on the real machine, as shown in:

650) this. width = 650; "title =" clip_image008 "style =" border-right-width: 0px; background-image: none; border-bottom-width: 0px; border-top-width: 0px; padding-top: 0px; padding-left: 0px; padding-right: 0px; "border =" 0 "alt =" clip_image008 "src =" http://www.bkjia.com/uploads/allimg/140211/225Q25217-7.png "width =" 1200 "height =" 601 "/>

This article from the "muddy world" blog, please be sure to keep this source http://ilanni.blog.51cto.com/526870/1357913

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.