Answer the question
In order to leave comments, you need to log in
How to port forward VirtualBox (Ubuntu 18.04)?
Good afternoon, I'm setting up a web server on an Ubuntu 18.04 guest, using VirtualBox for virtualization. I set everything up (photo), started the server and try to connect from the host (at 127.0.0.1:5550) - the connection is reset (ERR_CONNECTION_RESET). How to fix?
Resolved: the server was launched in development mode on a local IP. I changed the IP to 0.0.0.0, launched the virtual machine network in the "Network Bridge" mode. I connect, everything works. Thanks to all.
Answer the question
In order to leave comments, you need to log in
You cannot specify the host address 127.0.0.1 - at this address you can receive and transmit packets only to it (even to a virtual machine, because the virtual machine has its own address 127.0.0.1 ).
As a rule, there is no need for port forwarding, just set the connection type correctly in the network adapter settings and you can access the VM by its IP address.
I usually set the connection type to "Virtual host adapter" if the virtual machine needs access only from the host. In this case, by default, the virtual machine is assigned an address from the network 192.168.56.0/24, while on the host it is 192.168.56.1.
Here, all connection types are popularly painted in pictures, choose which one you need: https://www.nakivo.com/blog/virtualbox-network-set...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question