Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 20911  / 2 Years ago, wed, january 26, 2022, 10:11:43

This is a fresh install of Ubuntu Server 12.10 running VirtulBox 4.8.2 on a Kubuntu 12.10 host. I have Ubuntu Server running w/ a NAT'ed IP Address (10.0.2.X or something like that). I want to ssh from my Kubuntu laptop to my VBox server so during install I selected OpenSSL Server or whatever the option is. Outside of that selection there is nothing custom done and the system is completely up to date.



So when I try to ssh to that device I get a timeout response and am unable to connect. The service is running on my VM but nothing happens. I also cannot ping the VM either.



Is there something I'm missing? A firewall between my VM and Host? Not quite sure



Thanks for the help in advance,



Jonathan


More From » server

 Answers
2

The problem is the NAT. When you are using NAT, VirtualBox basically acts like a router making a subnet, and just like with a normal Router setup you can't access a device on a lower subnet. As I see it you have two options here:




  1. Switch your VM to a "Bridged Adapter" mode(can be done even after an OS is installed) and then Reboot or Renew your Server's IP. Your VM should show up with a normal IP on your Network and then you can easily access it. I usually recommend this for Servers anyway because burying a Server defeats the use of one.


  2. Make a Reverse SSH Tunnel. Basically instead of making a tunnel from your Host to the Guest Server, you do it the other way around. This is a pretty straight forward task and there's a nice HowTo to be found here: http://www.howtoforge.com/reverse-ssh-tunneling, Just use your Host's normal network IP and it should work. A user also posted a nice thing in the comments of the article about SSH Tunnels between 2 PCs with both being behind NATs.




Out of the above I still recommend #1 for obvious advantages to a server setup but if you really want to keep the Server Sandboxed then #2 should work fine.


[#33923] Friday, January 28, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
vigorousom

Total Points: 394
Total Questions: 96
Total Answers: 110

Location: Pitcairn Islands
Member since Fri, Oct 15, 2021
3 Years ago
;