L
L
LoliDeveloper2021-06-11 14:47:02
Computer networks
LoliDeveloper, 2021-06-11 14:47:02

How can a client application from VirtualBox-Ubuntu connect to localhost (127.0.0.1) of the main windows machine?

I have VirtualBox installed with OS-Ubuntu. It has a client. I need to test the interaction of this client with a server that is on the main Windows machine.
I launched the client specifying the server 127.0.0.1 and found something about 10.0.2.2 on the Internet, but it doesn’t work, it’s as if he just doesn’t see it or I don’t know. Can someone explain what's wrong and how to set it all up?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Drno, 2021-06-11
@LoliDeveloper

Can explain. But first you need to understand how the network works, including specifically in virtualbox))
Firstly, set the virtual machine's network setting to network bridge mode. Then the virtual machine will receive a network connection from your router (like your PC).
Next, we look at which IP your PC receives from the router, and specify it on the client. Something like 192.168.0(1).*** If you have a regular home router
Do not forget to turn off the firewall on your PC

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question