Answer the question
In order to leave comments, you need to log in
How to connect a virtual machine from one local network to a computer from another local network via the Internet?
I have a Windows 10 laptop with VirtualBox installed. Ubuntu is installed on the virtual machine, which communicates with the host network through NAT.
The laptop is connected via Wi-Fi to the Internet through a router. Dynamic addresses are used between the laptop and the router on the network.
There is a computer with Windows 10, it is connected via Wi-Fi to the Internet through a router. The network between the computer and the router uses dynamic addresses. The router has a static Internet address.
This computer is connected via ethernet to an Ubuntu computer. This is a point-to-point connection using static addresses.
How can I SSH from an Ubuntu VM to an Ubuntu machine across multiple LANs and the Internet?
Answer the question
In order to leave comments, you need to log in
VPN server where there is a thread on the internet, connection from both computers to it, interaction with each other through vpn
How can I SSH from an Ubuntu VM to an Ubuntu machine across multiple LANs and the Internet?This requires a white IP address. No way without him.
In the diagram, the lower router has a static ip on the internet and it is on the right local network with the Ubuntu machine, and it has a static ip, you can’t imagine better.
On this router, you set up port forwarding (this is usually called a virtual private server) when connections from the Internet on the specified port are forwarded to a machine on the router's local network on the specified port, such as router: 1021 -> ubuntu: 21
Since the virtual machine with ubuntu is in the upper network through double nat (first the virtualbox router, then the router itself) goes online, then you connect to the second router using the port specified in the forwarding with a simple ssh.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question