S
S
Studencheskaya322018-04-22 13:01:07
linux
Studencheskaya32, 2018-04-22 13:01:07

How to set up a network between virtualboxes in VirtualBox?

Created two host-only networks. .57.0 and .56.0.
In each subgrid, a virtual machine is configured. Each virtualka punches the gateway on 57.1 and 56.1 respectively.
Both virtual machines are pinged from the host machine.
But the host machine has the following settings:

IP
Destination Gateway Routing Table Genmask Flags Metric Ref Use Iface
default rt 0.0.0.0 UG 100 0 0 enp4s0 192.168.0.0
* 255.255.255.0 U 100 0 0 enp4s0
192.168.56.0 * 255.255.255.0 UG 0 02.box
* 255.255.255.0 U 0 0 0 vboxnet1


#echo 1 > /proc/sys/net/ipv4/ip_forward
#iptables -P FORWARD ACCEPT
doesn't help. all the same virtualki each other do not ping. what's wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
#
#, 2018-04-22
@mindtester

And why is everything so complicated?
you on the host system, now you need to add static routes for both subnets
if you want to provide virtual machines with the Internet and mutual communication - it's easier to configure a network bridge https://i.imgur.com/r6KJiMl.png

S
Sanes, 2018-04-22
@Sanes

If there is a router, then it is easier to make a Network bridge.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question