Physical machines can access Web sites built into virtual machines

Source: Internet
Author: User

1, set the network of virtual machine is bridge mode

650) this.width=650; "title=" 1.png "src=" https://s5.51cto.com/wyfs02/M01/8E/51/ Wkiol1i9n82sgjpfaadlgpdhela248.png-wh_500x0-wm_3-wmp_4-s_906876357.png "alt=" Wkiol1i9n82sgjpfaadlgpdhela248.png-wh_50 "/>


2. Turn off the firewall (shutdown state for the firewall)

Look at the settings for firewall rules Iptables-l

Let's talk about the commands for starting and shutting down the firewall:

1) After reboot, open: Chkconfig iptables on off: chkconfig iptables off

2) immediate effect, fail-Open after reboot: Service iptables start off: Service iptables stop


650) this.width=650; "title=" 3.png "src=" https://s5.51cto.com/wyfs02/M02/8E/51/ Wkiol1i9os-yvbhuaaa0sxkbruc575.png-wh_500x0-wm_3-wmp_4-s_3274002488.png "alt=" Wkiol1i9os-yvbhuaaa0sxkbruc575.png-wh_50 "/>


3. Turn off SELinux (if the SELinux status parameter is enabled is turned on)

Modify the/etc/selinux/config file
Change Selinux=enforcing to Selinux=disabled
Restart the machine

650) this.width=650; "title=" 2.png "src=" https://s1.51cto.com/wyfs02/M02/8E/51/ Wkiol1i9odmtrgodaaawg3mcgja044.png-wh_500x0-wm_3-wmp_4-s_1709819781.png "alt=" Wkiol1i9odmtrgodaaawg3mcgja044.png-wh_50 "/>


The Web site configured on the virtual machine can be accessed by the above configuration (the virtual machine is equipped to start the Tomcat service)

650) this.width=650; "title=" 4.png "src=" https://s4.51cto.com/wyfs02/M01/8E/51/wKioL1i9Ol3gNt4YAABh5ZOWY_ U297.png-wh_500x0-wm_3-wmp_4-s_1557792950.png "alt=" Wkiol1i9ol3gnt4yaabh5zowy_u297.png-wh_50 "/>

Physical machines can access Web sites built into virtual machines

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.