Currently, there are two main ways to solve the problem of VM surfing and Host communication in Virtual Box: 1. Using Bridge Connection 2. Using Host-Only and Nat (this problem is solved today) 1. for network adapter 1, select Host-Only and Host-Only from windows. (If not, choose "manage"> "global settings"> "add a Host-Only NIC to the network".) 2. Set the IP address of the Host-Only NIC in Windows: (set it as a gateway here) for example, 192.168.56.1, 255.255.255.0 (do not set other parameters) 3. in Linux/etc/sysconfig/network-scripts, set the NIC information (if you do not know the specific Nic please use ifconfig-a) ifcfg-eth0 www.2cto.com such as: 01 DEVICE = eth002NM_CONTROLLED = yes03ONBOOT = yes04HWADDR = 08: 00: 27: 1c: 15: 5605 TYPE = Ethernet06BOOTPROTO = none07IPADDR = 192.168.56.13708PREFIX = 2409 GATEWAY = 192.168.56.110DEFROUTE = Signature = yes123166init = no13NAME = "System eth0" 14 UUID = Signature = no and then: restart or service network restart. The host and virtual machine should be able to communicate normally at this time. Next, set NAT to access the Internet;
4. In the virtual machine settings, select a NIC and select NAT Internet access mode. 5. Set the corresponding Nic information like 3. Because the NAT mode is automatic, DHCP is used for the IP address here, for example, www.2cto.com 1 DEVICE = eth22NM_CONTROLLED = yes3ONBOOT = yes4HWADDR = 08: 00: 27: 8B: 95: AB5BOOTPROTO = dhcp 6, Reboot author fat bear