I'm willing to do any amount of frobbing of settings in .plist
and .xml
files to make this work.
The scenario is this:
I have a nice Android based phone. The phone can do USB tethering. OS X 10.6 cannot do USB tethering. Fedora can. For several different reasons, I constantly have a Fedora guest running inside VirtualBox on my laptop. I would like to be able to tell OS X to use the host-only vboxnet interface as its primary way of talking to the Internet so I can use Fedora's ability to do USB tethering to talk to the Internet through my phone. In fact, it would be nice to share out my phone's Internet connection over my MacBook Pro's Ethernet or WiFi port.
I can manually set up OS X so it will route through the Fedora guest instance using the route
command. But then the thorny problem of setting up DNS kicks in. I've discovered that 10.6 (and possibly 10.5) don't really have the concept of a global DNS configuration and instead associate it with an individual net connection. This means that using networksetup
and scutil
to frob settings is rather problematic because there isn't a connection that's recognized by the whole Mac infrastructure as actually being there, so there's nothing to associate the DNS information with.
Also, if the vboxnet
interface shows up in the UI, then I can go about doing all kinds of marvelous things like sharing the Internet connection without having to do a bunch of manual setup of NAT and other such ridiculous things.
By way of clarification, I'm currently using a WiFi connection and my routing setup looks like this:
$ netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.43.1 UGSc 3 0 en1
127 127.0.0.1 UCS 0 0 lo0
127.0.0.1 127.0.0.1 UH 6 5946331 lo0
169.254 link#5 UCS 0 0 en1
192.168.43 link#5 UCS 3 0 en1
192.168.43.1 2:23:76:99:44:2e UHLWI 1 13 en1 1178
192.168.43.14 127.0.0.1 UHS 0 0 lo0
192.168.43.255 ff:ff:ff:ff:ff:ff UHLWbI 0 12 en1
192.168.56 link#7 UC 2 0 vboxnet
192.168.56.101 8:0:27:b4:ee:b3 UHLWI 1 29 vboxnet 1191
192.168.56.255 ff:ff:ff:ff:ff:ff UHLWbI 0 12 vboxnet
So, is there a way to make this happen?