Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Two ways for VMware virtual machine to connect directly to physical network

Shulou Source: shulou.com Published: 2022-06-01 02:07:51 10月01日 Update

Two ways for VMware virtual machine to connect directly to physical network

Use VMware to build virtual machines, usually in NAT mode. At this point, the virtual machine has a separate network segment. Using NAT mode, data between virtual machines are transmitted through a virtual network, which does not affect the physical network where the physical machine is located. In many cases, penetration testers need to use virtual machines to directly infiltrate the physical machine, such as man-in-the-middle attacks. At this point, you need to connect the virtual machine directly to the physical network.'

There are two ways to connect directly to a physical network. The first way is to set the network of the virtual machine to bridged Bridge. In this mode, the virtual machine can obtain the independent IP address assigned by the router in the physical network and connect to the physical network. At this time, the virtual machine and the physical machine are connected to the router device through the same network cable and share the same port of the router.

As mentioned in our previous port theft (Port Stealing) article, the same port will only be bound to the same IP address. If the virtual machine does not send the packet, but the physical machine sends the packet, the router defaults that the port is bound to the physical machine. At this point, if another device accesses the IP of the virtual machine, there will be an unresponsive situation. This is also the reason why virtual machines that use bridging are often not discovered by other physical machines.

For the stability of the network, the second way can be adopted. The second way is to use the wired network card with USB interface. Let the virtual machine directly use the USB wired network card, and the wired network card uses a separate network cable to connect to the routing device. This avoids the problem of port grabbing.

This assignment:

(1) modify the network mode of the virtual machine to bridge.

(2) after waiting for the virtual machine to obtain the IP, use Ifconfig to obtain the IP address of the virtual machine.

(3) do not operate in the virtual machine, and access the network frequently in the physical machine.

(4) use another device of the physical network to connect the virtual machine to verify the network availability of the virtual machine.

Tags: Network entity mode physical port route mode device router address wired network card stand-alone time network cable one frequent unblocked man in the middle between Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple macOS Redmi MariaDB Shulou Technology