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