Page 1 of 1

Using TAP-Devices?

Posted: 17. Nov 2009, 14:17
by souljumper
Hi,

i tried to setup virtual box so that every ip-packet that is sended from within the virtual machine is directly send to the internet. i search the web and found the osi layer 2 solution 'TAP Device'.

The idea was to tell the virtual machine to send all ethernet frames to my tap device -> setting up just 1 NIC that uses the tap device. the tap device is bridged together with my physical network interface. i hoped now that i could reach the internet from my virtual machine now.

well the result is that it doesn't work like i expected it...(it doesn't work at all right now). my question is now if anyone has experince with that topic? i found several website discussing the same thing but using QEmu with linux operation system. that points me to the conclusion that it has to work for other VMs aswell?
(for example this one: http://blog.alantan.com/2007/01/qemu-ta ... ation.html)

but virtual box isn't obeying me.... :( hope someone can help?

greetz

Re: Using TAP-Devices?

Posted: 17. Nov 2009, 17:39
by Sasquatch
Using TAP devices was the old way of using bridges. What you can do now, is set up Internet Connection Sharing (see google for that, "internet sharing linux"), which creates a NAT network between the VM and the internet and you should be able to capture all packets.

Re: Using TAP-Devices?

Posted: 17. Nov 2009, 20:08
by souljumper
i am actually interested in this way because this way guarentees me that my virtual machine gets no connection to my actual host-os environmet and the networks which might be connected to my host-os.

my goal is to have two virtual machines connected over a internet connection and sending ip-traffic which can include network attacks. so vm1 in new york would attack vm2 in boston (or somehting like that). i want to make sure that those attacks will not end up in some other network which is connected to the host-system.

(next step will be a vpn connection so that no other host in the net might be victim of an attack by mistake - but first things first. ping vm1 <-> vm2 will be fine for the beginning)

so what do i have to do get the tap device working?

Re: Using TAP-Devices?

Posted: 17. Nov 2009, 21:32
by Sasquatch
With the current versions, using a TAP interface for bridged, then bridge the actual TAP interface to your physical NIC could render it useless. Are you sure that you couldn't see the Guest packets from the Host? The interface should be in promisc mode, the same you need when listening for other packets.