Get virtual box to work on mac for windows 10 to open

broken image
broken image

I like things to be neat, for example, if I wanted to use an apache2 server on the guest, I will have to do another port forwarding for that purpose, the same for mysql so on. I don’t particularly like port forwarding for personal reasons. It means you can map on your machine some random port like say 8888 to the port 22 of the guest OS within virtualbox. Now that the problem statement is made let’s start working a really simple solution.Just in case you know about port forwarding, this issue can be solved using port forwarding. That also works but the downside of that is that if you have a laptop and wants to work on your guest at home, it might not be accessible. Maybe if you are in an organization and IPs are assigned by a DHCP server, in that case if you choose to set a bridge adapter you would have your guest OS would be a node on the network. The IP assigned to the guest is not reachable by the host(since it’s in different subnet), so there is no way to connect to the guest machine using your favorite ssh client under NAT adapter.

broken image

But that will limit your access to the client virtualbox frame which is a direct access to the guest machine. There are situations where a guest OS on vitualbox will need to have Internet connection which is by default through the NAT interface. The title of this post can be misleading but basically the challenge I would like us to solve is pretty simple.