Host and virtual machines using VirtualBox to communicate with each other method:
(Use VirtualBox do not use the green version, because the green version of the virtual network card driver is not installed, so the host and the virtual machine can not communicate with each other, remember)
1. Set the "settings" corresponding to the installed operating system
2, select: Network, the NIC 1 is set to: Bridge network card,
3. Set NIC 2 as: Network address translation (NAT)
4, point confirmation, start the system, in CentOS, input command: ifconfig
(In fact, it is now interoperable, but CentOS has a firewall enabled by default, so 80 ports are not normally accessible)
5. Enter the command:
-j ACCEPT
Let the firewall open 80 ports to the outside.
If you do not want to enter such a command to open the firewall every time, you can use this installation service:
Service Iptables Save
If run this command appears: No such file or ..... Error, stating that there is no installation to the service, use the following command:
Yum Install iptables-servicessystemctl restart Iptables.service
Reference article: HTTP://WWW.TUICOOL.COM/ARTICLES/UVYVBQ
[Linux] VirtualBox-Host and virtual machine interoperability-CentOS