How to Make Virtual Machines Talk to Each Other in VirtualBox
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
π₯οΈ Setting Up Communication Between VMs in VirtualBox
This paragraph explains the default network isolation of virtual machines (VMs) in VirtualBox when using NAT. It details the process of configuring two VMs, a Windows 10 machine and a Kali machine, to communicate with each other by setting up a new NAT network. The default NAT network assigns the same private IP address range to both VMs, preventing communication. The solution involves creating a custom NAT network named 'Top Gun Network' with a unique IP address space to ensure both VMs receive unique DHCP addresses, enabling them to ping each other and maintain internet connectivity.
Mindmap
Keywords
π‘VirtualBox
π‘NAT (Network Address Translation)
π‘IP Address
π‘ifconfig
π‘IP Address Range
π‘DHCP (Dynamic Host Configuration Protocol)
π‘Network Interface
π‘Ping
π‘Internet Connectivity
π‘Virtual Machine (VM)
Highlights
Two virtual machines in VirtualBox are not communicating by default without a separate NAT network setup.
VirtualBox assigns a default NAT address to machines, which results in both machines having the same address but being unable to communicate.
To enable communication between the virtual machines, a new NAT network must be configured in VirtualBox.
The default NAT network configuration in VirtualBox is identified as having an address of 10.0.2.15.
A new NAT network named 'Top Gun Network' is created to allow virtual machines to communicate exclusively.
The address space for the new NAT network is changed to 192.168.100.0 to differentiate from the default address.
DHCP support is enabled for the new NAT network to automatically assign IP addresses to virtual machines.
The process of assigning the new NAT network to the virtual machines involves changing the network settings in VirtualBox.
After assigning the new NAT network, the virtual machines should receive unique IP addresses within the specified range.
The Kali virtual machine is reconfigured to use the 'Top Gun Network' for communication.
The Windows 10 virtual machine is also reconfigured to use the 'Top Gun Network' for network communication.
After reconfiguration, the virtual machines are expected to receive IP addresses in the 192.168.100.x range.
Ping tests are performed to verify connectivity between the virtual machines after network reconfiguration.
Both virtual machines are confirmed to have internet connectivity in addition to internal network communication.
The final step includes verifying that the virtual machines can ping each other, indicating successful network configuration.
Transcripts
so finally you have a Windows 10 machine
running and a Kali machine running both
of them in VirtualBox but they're not
talking to each other by default if you
do not set up a separate nat network
they will both be nat 'add but they'll
beam added in an isolated environment
for instance on the left over here I've
got Kali if I do an ifconfig and this is
running in VirtualBox I see my
addressing kept address for Kali is 10 0
to 15 on the right side I have Windows
to enterprise if I do a type II config I
see my address is 10 0 to 15 so they
both have the same address but they
can't talk to each other the 10 0 to 15
is the default address that VirtualBox
assigns to any machine that has setup
for NAT so what we need to do if you
want these two machines to talk to each
other
and beam added we have to set up a
separate new NAT network and that's what
we'll do in this video so let's go to
VirtualBox and if we just verify what I
was discussing if we look at the Kali
machine and look at the settings go to
network it's configured for just NAT
there's a default to go to Windows 10
Enterprise that is configured for NAT
which is the default so what we need to
do is set up a new network so let's
click on Tools click on preferences and
this is in VirtualBox manager click on
network click on the little plus sign
here to add a new network it called it
nat network we can click on the gear
icon here to change it let's call this
our this is the Top Gun Network
so only the elite can be part of this
network so so we're gonna change this
address space I like to change it to
something different so it doesn't look
the same as the 1002 so let's change
this to 1 9 2 1 6 8 . 100 let's say dot
0 this last 24 we certainly wanted to
support DHCP because we want both of our
virtual machines assigned a DHCP address
that's pretty much it so click on OK now
we have the top gun' network it is 192
168 1
to the callee and the Windows 10 machine
to this new network and they should be
automatically assigned an IP address in
the 192.168.1 hundred space so I'll
start with Kali over here click on Kali
I'll go to settings you could also on
the machine itself go to machine and
settings up here either way works so
I'll do it this way through the virtual
machine interface go to network we're
going to change this right here so right
now it says net it was nat we're gonna
we're gonna change it to a nat network
and then we'll select the one we just
created which is top gun' network so the
steps are select nat network and it will
choose the nap network we saw we created
ok so now if I do I have to fig I should
get the 192 168 address you may have to
do it a couple of times like I did right
there so this one is 192 168 dot 100.4
on the windows machine will do the same
thing machine settings go to network nap
network top gun network ok so if I hit
the up arrow ipconfig it says
disconnected it's reconnecting and we'll
go ahead and say yes to that so now I
see this is dot 5 over here for Windows
on the left side Kali is 4 so
technically they should be able to ping
each other and talk to each
because they have unique IP addresses so
for this one and the windows we'll see
if we can ping Kali
so ping one 92168 dot 104 that's working
let's see if we can ping little bug comm
as well that's working so we have
connectivity between the guest on the
same network and we have internet
connectivity so that's how to make sure
two different machines or as many
machines as you have in VirtualBox can
talk to each other and at the same time
have access to the Internet
Browse More Related Video
![](https://i.ytimg.com/vi/cQ45laXmnvg/hq720.jpg)
Konfigurasi DHCP Server dan DHCP Client pada Router Mikrotik RB 951Ui-2HnD
![](https://i.ytimg.com/vi/0ZG9tydub2I/hq720.jpg)
How to Configure LAN Segments in VMware Workstation Pro
![](https://i.ytimg.com/vi/ZCz9rRhzNy4/hq720.jpg)
How to configure DHCP server | DHCP server configuration step by step
![](https://i.ytimg.com/vi/FTUV0t6JaDA/hq720.jpg)
NAT Explained - Network Address Translation
![](https://i.ytimg.com/vi/MRGBYFNCYs8/hq720.jpg)
IPv4 and IPv6 - CompTIA A+ 220-1101 - 2.5
![](https://i.ytimg.com/vi/ZpdotjCCbQ4/hqdefault.jpg?sqp=-oaymwEXCJADEOABSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLCDY0tQxLgei_b-3BEU9d1IOej-XA)
CARA KONFIGURASI MIKROTIK AWAL (KONEKSI INTERNET)
5.0 / 5 (0 votes)