Host Interface Networking Without Bridge

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Quantum
Posts: 34
Joined: 6. Mar 2008, 04:02

Host Interface Networking Without Bridge

Post by Quantum »

Just installed VB over a Kubuntu Hardy AMD64 host. I want to use Host Interface so that the guest has to go through Linux to reach the internets, which means there can be no bridge.

I don't understand why all the instructions require a bridge before you can set up a Host Interface, because it is not secure.

VMware lets you set up a Host Interface without bridging or DHCP. You build the kernel driver, load it, and you get a vmnet0 interface to communicate with the guest through. I understand that VirtualBox disposed with the kernel module in favor of taps, so how to put this into practice? Surely taps don't imply the use of a bridge, as that defeats the purpose.

I've run VBoxAddIF, added vbox0 to /etc/network/interfaces, and ifup vbox0. I now have that interface. But still have the error on guest startup:

Code: Select all

Code:
  Failed to initialize Host Interface Networking. 
 VBox status code: -3100 (VERR_HOSTIF_INIT_FAILED). 
 
 Result Code: 
 0x80004005 
 Component: 
 Console 
 Interface: 
 IConsole {d5a1cbda-f5d7-4824-9afe-d640c94c7dcf}
What does it want?

I want the host and guest to have full communications, but for the guest to reach the internets it must masquerade through the host, for security.

Got no response to earlier questions, so am I way out ahead of everyone?
Quantum
Posts: 34
Joined: 6. Mar 2008, 04:02

Post by Quantum »

I am trying NAT to see whether I can at least get that to work, but it doesn't. Kubuntu host, WinXP guest, and Win NIC set to 192.168.1.x the same Class C address as my LAN.

Can't ping anything as NAT has that disabled. Not getting name service, although in Win setup I've defined the DNS server in my LAN.

Does anyone understand in detail exactly how VirtualBox NATting works? Why isn't there a new NIC on the host? How is traffic passed through the host? Where would I look for the problem?
Quantum
Posts: 34
Joined: 6. Mar 2008, 04:02

Post by Quantum »

OK, the depth of information is just not out there yet. Nobody knows of what I ask, as I've done a thorough search. Apparently I'm even beyond the developers in this.

I need to be getting actual work done and don't have the days to do research needed, so I'm going back to VMware. At least it does what I need securely.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

Expecting a responce within a day is redicilous. With NAT, there is an internal DHCP running that will give you 10.0.2.15 as IP address, with 10.0.2.2 as Gateway (your host) and 10.0.2.3 as DNS (VB itself). With that setting, you can browse the internet and your network. You can even print on a network printer with NAT. The only thing that does not work is Ping as you found out (and is also written in the Manual) and file sharing to other computers (they can't access you because of NAT, though you can access them).
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Quantum
Posts: 34
Joined: 6. Mar 2008, 04:02

Post by Quantum »

After reading countless documents, no one ever said I can browse my local network, in fact quite the opposite. So I had no hope of help here. I have two major real estate projects I must get on with, so am under quite a bit of pressure. Apologies and thanks, Sasquatch.

Being able to browse my own network is crucial, so I can install Winduhs apps on the Linux filesystem, and operate on Sketchup files there. Come to think of it, NATting through the Linux host would be the same as setting up a Host-only interface and masquerading; still gets the Shorewall security.

But just to be crystal-clear, the DHCP server is only looking toward the Guests, right? And no guest can get an address from the outside if my Linux firewall is open?

VirtualBox seems a helluvalot faster than VMware, maybe because it's native 64bit. However I am getting a USB error when I set up the VM, and indeed USB does not work in the guest. USB works fine in VMware.

Code: Select all

Could not load the Host USB Proxy Service (VERR_FILE_NOT_FOUND). The service might be not installed on the host computer.

Result Code: 
0x00004005
Component: 
Host
Interface: 
IHost {81729c26-1aec-46f5-b7c0-cc7364776d2b}
Callee: 
IMachine {f95c0793-7737-49a1-85d9-6da810157393b}
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

There is a small howto on this forum that I used to (and posted in, check my history) that works just fine for Ubuntu.

The DHCP server that is running for VB is from VB itself, giving addresses only to the Guests. No harm to your network.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Quantum
Posts: 34
Joined: 6. Mar 2008, 04:02

Post by Quantum »

Well, ridiculously, I have just spent the past several hours trying to get fscking USB working in VirtualBox. I searched your post history, and in fact the whole Linux forum for anything resembling Ubuntu and Howto, and nothing.

I did find some USB advice for Ubuntu, and so far I have in /etc.init.d/mountdevsubfs.sh uncommented:

Code: Select all

	# Magic to make /proc/bus/usb work
	#
	mkdir -p /dev/bus/usb/.usbfs
	domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
	ln -s .usbfs/devices /dev/bus/usb/devices
	mount --rbind /dev/bus/usb /proc/bus/usb
... made a usbusers group and made myself a member, modified 40-permissions.rules so:

Code: Select all

# USB serial converters
SUBSYSTEM=="usb_device", GOTO="usb_serial_start"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GOTO="usb_serial_start"
GOTO="usb_serial_end"
LABEL="usb_serial_start"
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", \
GROUP="usbusers", MODE="0660", GROUP="dialout"
LABEL="usb_serial_end"
... changed the group of /proc/bus/usb and every file below to usbusers, and changed their mod to 664, rebooted.

And in VM|Devices|USB Devices|Mass Storage Device is still grayed out!

VirtualBox wants me to shoot myself in the head, doesn't it!
gagarobu
Posts: 5
Joined: 15. May 2008, 05:00

Post by gagarobu »

Quantum wrote:Well, ridiculously, I have just spent the past several hours trying to get fscking USB working in VirtualBox. I searched your post history, and in fact the whole Linux forum for anything resembling Ubuntu and Howto, and nothing.

I did find some USB advice for Ubuntu, and so far I have in /etc.init.d/mountdevsubfs.sh uncommented:

Code: Select all

	# Magic to make /proc/bus/usb work
	#
	mkdir -p /dev/bus/usb/.usbfs
	domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
	ln -s .usbfs/devices /dev/bus/usb/devices
	mount --rbind /dev/bus/usb /proc/bus/usb
... made a usbusers group and made myself a member, modified 40-permissions.rules so:

Code: Select all

# USB serial converters
SUBSYSTEM=="usb_device", GOTO="usb_serial_start"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GOTO="usb_serial_start"
GOTO="usb_serial_end"
LABEL="usb_serial_start"
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", \
GROUP="usbusers", MODE="0660", GROUP="dialout"
LABEL="usb_serial_end"
... changed the group of /proc/bus/usb and every file below to usbusers, and changed their mod to 664, rebooted.

And in VM|Devices|USB Devices|Mass Storage Device is still grayed out!

VirtualBox wants me to shoot myself in the head, doesn't it!
do this:

/etc.init.d/mountdevsubfs.sh uncommented:

Code: Select all

	# Magic to make /proc/bus/usb work
	#
	mkdir -p /dev/bus/usb/.usbfs
	domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
	ln -s .usbfs/devices /dev/bus/usb/devices
	mount --rbind /dev/bus/usb /proc/bus/usb
and this:

check your vboxuser group id

Code: Select all

 grep vbox /etc/group 
my vboxuser group id is 123

edit your /etc/fstab
add this line:

Code: Select all

	none /proc/bus/usb usbfs devgid=123,devmode=664 0 0
and don't do this:

Code: Select all

 shoot yourself in the head 
:D :D :D
Quantum
Posts: 34
Joined: 6. Mar 2008, 04:02

Post by Quantum »

My gosh, it worked. I didn't have the fstab entry. Thank you.

I haven't used Winduhs for ten years (Debian), and it is sure queer now. I mount the USB drive into the VM and a window pops up showing the contents, but the flashdrive is nowhere to be found in Exploser! Where is it supposed to be?

Also it is nagging me about this damned phone-in activation. Wull, no. There is a little program which gets the activation key and cert from preinstalled disks like the one that just came with my notebook, but it is for Vista only. I have XP. I tried this app on my XP disk, but it only got the key and not the cert.

I wish there were an app to fetch activation for XP.
Post Reply