6
6
I have enabled two adapters in my VirtualBox (running Ubuntu 12.10 Server Edition), with types as: Host-only and NAT.
My main motive is to be able to connect two VMs running on two different hosts (physical machines) on a port (say 22). I know the answer is Port Forwarding, but it is too confusing. Well I have tried with Bridged mode, there too from outside my machine it is not able to connect to the virtual machine.
Edit: Well I wouldn't suggest Bridged Network, as it takes up IP addresses from the network, hence would prefer a NAT-ing technique.
2Host-Only is not what you want. You want NAT or Bridged mode. How you enable traffic from the Host to the Guest is up to you. It won't be easy without Port forwarding in NAT mode. Bridged mode means that the Guest will need an IP in the same subnet as the host machine. HTH. – NickW – 2014-03-04T12:45:54.150
@NickW: you are very right.....I'm currently trying to do that only, port forwarding with NAT.....but I'm not able to understand what IP/ports to specify in the rule? And also should I mention the rule in the VirtualBox network or in the host? Please help. – Tanny – 2014-03-04T17:50:45.090
Well, you say
<host.ip>:<port> <-> <guest.ip>.<port> so your rule would be
1.2.3.4:22maps to
192.168.1.10:22` or something similar, you just forward the ports, you can even forward from a different port to port 22 internally, if you google search, for your host OS, there will be explanations on how to do it. – NickW – 2014-03-04T17:55:34.540