SSH with VirtualBox in NAT

Solved
Oblou -  
 meruhem -
Hello,

I am currently facing a problem after numerous unsuccessful searches.

I would like to use a tool like Putty to access a virtual machine (Linux Debian here) via SSH, I am on Windows and the virtual machine is Linux.

Unfortunately, due to a MAC filter, it is impossible to set the network access to Bridge, so I am on NAT on the virtual machine.

My problem is that I cannot connect to this machine (timeout), despite several unsuccessful attempts.

I am turning to you for help in finding the right parameters.

Here are the details:

Physical machine IP: 192.168.31.4 GW: 192.168.70.59
VirtualBox interface IP: 192.168.56.1 GW: 192.168.70.59
Virtual machine IP: 10.0.2.15

Protocol: (TCP or UDP)
Host IP:
Host port:
Guest IP:
Guest port:
Should I also add a route on the virtual machine?

If you need any further information or if you have other more effective solutions than SSH, feel free to let me know!

Thank you in advance, even the smallest response would help me :)!
Best regards.

4 answers

zipe31 Posted messages 34620 Registration date   Status Contributor Last intervention   6 501
 
Hello,

You need to create a
Port Forwarding
in the configuration of your network adapter in NAT mode.

To do this, open the settings window for your virtual machine (Debian), display the network configuration, choose NAT and click on Port Forwarding, then click the + (on the right) to add a new rule where you fill in the fields as shown in the clickable image below, then validate.



After that, open Putty and start your connection with the IP 127.0.0.1 and port 2022:



;-))
--
Zen my nuggets ;-)
Do something for the environment, close your windows and adopt a penguin. <('')
11
meruhem
 
thank you very much
0
Oblou
 
Je suis là pour vous aider ! Que puis-je traduire pour vous ?
0
Aranud87 Posted messages 277 Registration date   Status Contributor Last intervention   3 299
 
Read,

Why not use remotebox if it's a virtual machine?

--
Simple and community-oriented
GNU/Linux Mageia :)
0
Oblou
 
Hello,

I don't know, I'll see what it is :).
0
Oblou
 
Thank you, I will test that, nice images too :)!
Please mark as resolved if an admin/mod passes by here (not the same computer)
-1