M
M
Mr_Howell2017-03-02 21:50:56
Computer networks
Mr_Howell, 2017-03-02 21:50:56

How to set up a network in VirtualBox - a virtual machine like a remote server?

There is a VirtualBox virtual machine (Oracle with USB and not OSE-version)
as a guest - Ubuntu, as a host - Windows.
You need to access the virtual machine as if it is a remote server with a specific IP
(even if it is local from 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16)
Port forwarding through NAT is currently used.
For example, I go via SSH through 127.0.0.1:55522, but I would like, for example, through 10.0.2.15:22.
Neither ping nor nmap can reach the host.
In which direction to dig?
7d272d2e93024b4d89139fe349bb89a2.png382838dbb41a4457aa3384dc3634b77e.png308f30d89d7b46198fc4690c8de204a4.png
I tried to turn it on with the second network adapter
285a339ac2274761b0a4940253d3b320.png
, but sudo ifconfig (no changes in the output) showed no results either with nmap scan.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
W
Wexter, 2017-03-02
@Mr_Howell

in the host system (Windows) on the VirtualBox Host-Only Ethernet Adapter interface, write the address from the same network

M
Mr_Howell, 2017-03-02
@Mr_Howell

Wexter .
1) Shut down the virtual machine.
2) Added the second adapter "VirtualBox Host-Only Ethernet Adapter"
12616011b7ec45eab1f313aebbd71908.png241395c9bb354847b04378804b77c5f5.png3) Changed the IP settings in the host adapter to:
ba57ea264e2d4320bb6d7f34beed2770.png9690bb55e1274732bf3bcc96ffab654d.png4) Turned on the machine.
There are no changes in "sudo ifconfig", in indicators "VirtualBox Host-Only Ethernet Adapter - host" also zero. Neither ping nor nmap port scan - they still do not see the guest machine.
================================================= ====================================
_
_ settings to turn on the machine.
but the traffic is still not going through it.
================================================= ====================================
Thank you all. With these settings, the traffic passed:
e1be8a550e8345d8b10343efeff9317b.png

N
NikitaBogdanov, 2019-10-31
@NikitaBogdanov

And why not make it easier, select a network bridge connection in the VirtualBox settings and look at the address on the guest OS that the ipconfig / ifcinfig router gave it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question