VirtualBox

Ticket #8076 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

tcpdump not logging packets to guests => Fixed in SVN

Reported by: bboe Owned by:
Priority: major Component: network/hostif
Version: VirtualBox 4.0.0 Keywords: tcpdump vboxnet0 packets
Cc: Guest type: other
Host type: Linux

Description

I was running guests with host only networking on VirtualBox 4.0 on top of a 64bit Ubuntu 10.04 machine installed from the virtualbox repository. I attempted to capture traffic on on the vboxnet0 interface using tcpdump -i vboxnet0 and to my disappointment I was only able to see packets coming from the guest os, and not the packets to the guest os.

This problem does not occur in the virtualbox-ose package (version 3.1.6_OSEr59338) as I can see both sides of the traffic just fine. It is my speculation that the "bugfix" for  this bug may be the culprit.

Attachments

netflt_start_xmit_enable.patch Download (555 bytes) - added by aleksey 3 years ago.
Enable alternative egress packet filter.

Change History

comment:1 in reply to: ↑ description Changed 3 years ago by cavedon

I would like to subscribe to the bug, but the interface does not allow me. Maybe posting a comment will keep me updated on further replies :)

Changed 3 years ago by aleksey

Enable alternative egress packet filter.

comment:2 Changed 3 years ago by aleksey

Could you upgrade to 4.0.2, apply the attached patch and try if this alternative solution works stable for you? To apply the patch go to the directory with source files for vboxnetflt (if you install from ubuntu package it should be /usr/share/virtualbox/src/vboxhost/vboxnetflt/linux) and issue:

patch -p0 -i <path-to-netflt_start_xmit_enable.patch>

then rebuild the vbox kernel modules with

sudo /etc/init.d/vboxdrv setup

comment:3 Changed 3 years ago by bboe

That patch corrected the problem. Can I expect to see it applied in a later version of VirtualBox?

Thanks!

comment:4 Changed 3 years ago by aleksey

Please keep using the patched version and let us know if you encounter any trouble with it. Thanks a lot for cooperation! The patch will be included in a later version if no problem is discovered.

comment:5 Changed 3 years ago by csacska.macska

I've experienced a similar problem with bridged networking. I was brave and applied the patch above, but the problem got worse, on the guest os. too: tcpdump does not show packages from guest to host.

comment:6 Changed 3 years ago by csacska.macska

To my previous post: I've opened a ticket: #8256

comment:7 Changed 3 years ago by yohan

I use VirtualBox 4.0.2, on host Mandriva 2010.2. I confirm the same problem.

Even if the patch is applied

comment:8 Changed 3 years ago by aleksey

yohan,

can you try with 4.0.4?

comment:9 Changed 3 years ago by OxOOCOFFEE

I am using 4.0.4 on MacOSX 10.6.7 and having problem of n0t being able to see the device

$ ifconfig

vboxnet0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500

ether 0a:00:27:00:00:00 inet 192.168.77.1 netmask 0xffffff00 broadcast 192.168.77.255

$ sudo tcpdump -D 1.fw0 2.en0 3.en1 4.lo0

$ sudo tcpdump -i vboxnet0 tcpdump: vboxnet0: No such device exists

comment:10 Changed 3 years ago by OxOOCOFFEE

Opps Forgot to mention. Guest is running XP x32

comment:11 Changed 3 years ago by klaus

Just to clarify: as of VirtualBox 4.0.4 the patch is NOT included.

comment:12 Changed 3 years ago by aleksey

Does anybody still have the problem with capturing packets at vboxnet0 interface using VirtualBox 4.0.12 or 4.1?

comment:13 Changed 3 years ago by OxOOCOFFEE

I am running 10.6.8 with vbox 4.0.12 I do not see vboxnet0 in the list I did not try or was aware of 4.1 version. Where can I find it. Please let me know if you need any other info

[OxMBP ~]: sudo tcpdump -D Password: 1.fw0 2.en0 3.en1 4.lo0

[OxMBP ~]: sudo tcpdump -i vboxnet0 tcpdump: vboxnet0: No such device exists

comment:14 Changed 3 years ago by OxOOCOFFEE

Just downloaded and installed 4.1 and sam deal

comment:15 Changed 3 years ago by aleksey

In newer versions vboxnet0 is no longer created at boot. If it is configured in Preferences->Network it will be created as soon as you start VirtualBox.

comment:16 Changed 3 years ago by OxOOCOFFEE

So I installed Lion 10.7.0 and still no go. Running VBox 4.1

[MacPro valgrind]:sudo tcpdump -D Password: 1.fw0 2.en0 3.en1 4.p2p0 5.lo0

ifconfig ... vboxnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500

ether 0a:00:27:00:00:00 inet 10.146.77.1 netmask 0xffffff00 broadcast 10.146.77.255

[MacPro valgrind]:sudo tcpdump -i vboxnet0 tcpdump: vboxnet0: No such device exists (BIOCSETIF failed: Device not configured)

comment:17 Changed 3 years ago by aleksey

The support for Berkeley Packet Filter was missing in vboxnetX interfaces. Also, since BPF uses callbacks from the network driver to capture packets, the packets sent from a guest to the host never reached the driver and were not captured. This problem applies to all bridged interfaces, not only vboxnetX ones. Now if the interface is in the promiscuous mode the packets will always be sent down to the wire, thus reaching the driver and BPF callbacks.

comment:18 Changed 3 years ago by aleksey

  • Summary changed from tcpdump not logging packets to guests to tcpdump not logging packets to guests => Fixed in SVN

comment:19 Changed 3 years ago by frank

Just let me add that the fix will be part of the next maintenance release.

comment:20 Changed 3 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in VBox 4.1.4.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use