Accessing a Virtual Machine over Hamachi VPN

5,578

I just discovered what was going on on Linux, and this probably applies to Windows too.

Hamachi makes a bridged network interface to run the gateway through, and that becomes the "normal" network interface for the machine (on Linux, this is ham-br0 by default).

VirtualBox however, keeps the machine configuration bridged to the original physical network interface (eth0 on Linux). I ran the following while the VM was powered off to make VirtualBox bridge to the Hamachi adapter:

VBoxManage modifyvm <vm_name> --bridgeadapter1 ham-br0

This sets the adapter VirtualBox ties into to ham-br0. The VM is still visible from the non-Hamachi network as well. Like I said, this was on Linux, but VirtualBox's networking model remains more or less the same cross-platform.

Share:
5,578

Related videos on Youtube

James
Author by

James

Updated on September 18, 2022

Comments

  • James
    James over 1 year

    I've got two virtualized machines running Ubuntu on a Windows 7 Host machine - we're utilizing VirtualBox to handle this. The Host machine also acts as a Gateway for our VPN solution - Hamachi.

    The two VMs use Bridged Networking with static IPs assigned to each. When I'm on the network, I can see them both and access them (LAMP servers, one holds our Git repos, the other is a utility box).

    So, I can access the VMs internally, and I can get into the network externally over Hamachi. What I can't do, is access the VMs over Hamachi. Basically everything exists through Hamachi except my two VMs.

    The goal is to be able to work externally, and push changes to our Git repos over Hamachi and to the VM over SSH. This works fine internally, but not over Hamachi.

    Is this even possible? Suggestions, comments, or a solid "Hell no, not possible" are all welcomed.

  • James
    James over 12 years
    I'd all but given up hope on this question. Let me have a go at this and we'll see what happens.
  • James
    James over 12 years
    Man I can't believe I overlooked something so simple, this was the exact fix I needed. It was easy enough to translate from the command to the GUI. I simply added a 2nd network adapter that uses the Hamachi bridged network interface along side and now both local and remote connections work as expected. Thanks again for helping me out with this one.
  • Matt Erickson
    Matt Erickson over 12 years
    It was driving me batty for weeks as well. Glad it could help!