How to Make Virtual Machines Talk to Each Other in VirtualBox

CISO Global
20 Apr 201904:52

Summary

TLDRThis tutorial demonstrates how to enable communication between a Windows 10 and a Kali Linux virtual machine running in VirtualBox. By default, they operate in isolated NAT environments with the same default IP address, preventing mutual connectivity. The solution involves setting up a new NAT network, 'Top Gun Network', with a unique address space to facilitate communication and DHCP assignment. The process includes configuring both VMs to use this new network, resulting in unique IP addresses for each and successful ping tests, ensuring both machines can communicate and access the internet.

Takeaways

  • πŸ’» The script discusses setting up network connectivity between two virtual machines, a Windows 10 and a Kali machine, running in VirtualBox.
  • πŸ”’ By default, both machines are isolated in their own NAT networks and cannot communicate with each other.
  • πŸ“ The script demonstrates how to check the current network configuration by using 'ifconfig' on the Kali machine and 'ipconfig' on the Windows machine.
  • 🌐 The default IP address assigned by VirtualBox for NAT is 10.0.2.15, which is the same for both machines, hence they cannot communicate.
  • πŸ› οΈ The solution is to set up a separate NAT network to enable communication between the two virtual machines.
  • βž• The script guides through adding a new NAT network in VirtualBox Manager under the network settings.
  • πŸ”„ The new network is named 'Top Gun Network' and has a different address space to avoid conflicts with the default NAT.
  • πŸ“ The address space for the new network is changed to 192.168.100.0 with the last 24 bits intended to support DHCP.
  • πŸ”„ The script shows how to change the network settings of both virtual machines to the newly created 'Top Gun Network'.
  • πŸ“ˆ After reconfiguring, both machines should be assigned unique IP addresses in the 192.168.100.x range, allowing them to communicate.
  • πŸ’‘ The script concludes with a demonstration of successful connectivity between the two machines and confirms that they can access the internet.

Q & A

  • What is the default network setting for virtual machines in VirtualBox?

    -The default network setting for virtual machines in VirtualBox is NAT (Network Address Translation), which isolates each VM in its own network environment.

  • Why can't two virtual machines running on the same NAT network communicate with each other?

    -Even though they have the same default address (e.g., 10.0.2.15), they can't communicate with each other because NAT isolates each VM in its own network, preventing direct communication.

  • What is the purpose of setting up a separate NAT network for virtual machines?

    -Setting up a separate NAT network allows the virtual machines to communicate with each other while still maintaining internet connectivity.

  • How can you verify the network settings of a virtual machine in VirtualBox?

    -You can verify the network settings of a virtual machine in VirtualBox by going to the machine's settings under the 'Network' section.

  • What command can you use to check the IP address of a virtual machine running in VirtualBox?

    -You can use the 'ifconfig' command on Linux-based systems (like Kali) or 'ipconfig' on Windows systems to check the IP address of a virtual machine.

  • What is the significance of the 'Top Gun Network' mentioned in the script?

    -The 'Top Gun Network' is a custom NAT network created in the script to allow the virtual machines to communicate with each other. It's a playful name given to the network by the author.

  • How do you create a new NAT network in VirtualBox?

    -To create a new NAT network in VirtualBox, go to 'Tools' > 'Preferences' > 'Network', click on the plus sign to add a new network, and configure the network settings as desired.

  • What is the IP address range used for the 'Top Gun Network' in the script?

    -The IP address range used for the 'Top Gun Network' is 192.168.100.x, with the last 24 bits (.x) being the host address.

  • Why is it important to enable DHCP for the new NAT network?

    -Enabling DHCP for the new NAT network allows the virtual machines to automatically receive IP addresses, ensuring they can communicate with each other and access the internet.

  • How can you confirm that the virtual machines are connected to the new NAT network?

    -You can confirm the virtual machines are connected to the new NAT network by checking their network settings and using the 'ifconfig' or 'ipconfig' command to see if they have been assigned IP addresses within the new network range.

  • What command can you use to test connectivity between the virtual machines?

    -You can use the 'ping' command followed by the IP address of the other virtual machine to test connectivity.

Outlines

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Mindmap

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Keywords

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Highlights

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Transcripts

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now
Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
VirtualBoxNetworkingVMsNATIP ConfigDHCPInternet AccessInter-VM PingTop Gun NetworkTutorial