Potential solution for host-only networking in VMs?

196 views
Skip to first unread message

Die Google

unread,
Oct 17, 2022, 8:54:08 PM10/17/22
to tunnelblick-discuss
Hey, I'm wondering if tunnelblick could fix a problem people have using VMs in Big Sur or Monterey. 

I used to be able to route networking from a guest OS (running as a router) to the host MacOS using "host-only" networking in either Parallels Desktop or VirtualBox. The host-only network would create a network interface in MacOS (like "vnic0") then I could set the guest OS's IP as the MacOS router IP. Unfortunately this solution hasn't worked since I upgraded to a newer Mac as this probably needed a kmod to create the virtual network interface. I have been searching for a work-around without success thus far. 

What if I create a virtual network interface with tunnelblick and then bridge it to the VM's virtual ethernet device? I'm thinking this should allow me to make an IP connection between the two, which is all I need in theory. 

Before I try this I thought I'd ask (since I can't see it documented anywhere) which version is compatible with Monterey running on an M1, and also what is the minimal I need just to get a TAP (I don't need OpenVPN), and how do I get just the TAP. 

Tunnelblick developer

unread,
Oct 17, 2022, 11:07:49 PM10/17/22
to tunnelblick-discuss
Tunnelblick 3.8.8beta04 is a universal (Intel and M1) binary that works on macOS 10.10 and higher (which is documented, or described, anyway, on our Downloads page). It works on Monterey; we have not tested it on Ventura.

Tunnelblick includes a TAP kext. To create a TAP device, first you would need to install the TAP extension (see https://tunnelblick.net/cKextsInstallation.html).

Then, when you want to use it, you'd have to "load" it (which is something that Tunnelblick does) and then create the TAP interface (which is something that OpenVPN does). You can examine the source code for both to figure out how they do that, but the easiest way might be for you to create an OpenVPN TAP configuration that doesn't do any actual routing (I'm not sure how to do that, though). Then you can just connect the VPN using Tunnelblick and the TAP "interface" will be created.

I think, however, that the TAP interface that's created isn't quite the same as the virtual devices that are created by Parallels or VirtualBox. I don't know if that will affect what you want to do.

Die Google

unread,
Nov 3, 2022, 4:47:23 AM11/3/22
to tunnelblick-discuss
Thanks for getting back to me. I followed the instructions here:
(I'm running Monterey on an M1 MacBook)

I'm unsure how to actually create the tap network interface. The web page assumes I know how to do this already. I'm not using tunnelblick for a VPN (it keeps asking for a configuration when I boot which is annoying) I just want an interface both sides can bridge to. I seem to remember there was a command line I needed to run but cannot find the instructions anywhere. 

Die Google

unread,
Nov 3, 2022, 4:51:25 AM11/3/22
to tunnelblick-discuss
OK, I tried to follow this tidbit:

this is the terminal result:
/Applications/Tunnelblick.app/Contents/Resources/openvpnstart loadKexts 2

The system reported that the tap kext was loaded successfully

However, I don't see a new interface in System Preferences -> Network 
Is there some voodoo I'm missing here?

Die Google

unread,
Nov 3, 2022, 4:51:57 AM11/3/22
to tunnelblick-discuss
My apologies, this was the link with that tidbit:

Tunnelblick developer

unread,
Nov 3, 2022, 6:42:56 AM11/3/22
to tunnelblick-discuss

Dead Ballo

unread,
Nov 3, 2022, 7:47:36 PM11/3/22
to tunnelbli...@googlegroups.com
I have attempted to route traffic to a network interface via command lines (since the "Network Service" is absent) without success. I tried using commands like
route add default $gateway -ifscope $interface
to no avail despite the fact I can ping the gateway.
I then tried to find a way to create/add a Network Service for the interface but haven't found a way to do so. The networksetup app doesn't appear to have a way. Some sources suggested editing /Library/Preferences/SystemConfiguration/preferences.plist with the unhelpful suggestion of copying the existing ethernet service which of course I don't have.

Does anyone know how to add a "Network Service" for the interface?

--
You received this message because you are subscribed to a topic in the Google Groups "tunnelblick-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tunnelblick-discuss/_TX5-R7d3Rw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tunnelblick-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tunnelblick-discuss/ddfff681-fb2c-4d9a-81d2-b439ea7c40fdn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages