Using TAP-Devices?

This is for discussing general topics about how to use VirtualBox.
Post Reply
souljumper
Posts: 2
Joined: 17. Nov 2009, 14:08
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu 9.10

Using TAP-Devices?

Post 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
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

Re: Using TAP-Devices?

Post 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.
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.
souljumper
Posts: 2
Joined: 17. Nov 2009, 14:08
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu 9.10

Re: Using TAP-Devices?

Post 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?
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

Re: Using TAP-Devices?

Post 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.
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.
Post Reply