VirtualBox

Opened 14 years ago

Closed 13 years ago

#8076 closed defect (fixed)

tcpdump not logging packets to guests => Fixed in SVN

Reported by: bboe Owned by:
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 (1)

netflt_start_xmit_enable.patch (555 bytes ) - added by Aleksey Ilyushin 14 years ago.
Enable alternative egress packet filter.

Download all attachments as: .zip

Change History (21)

in reply to:  description comment:1 by Ludovico Cavedon, 14 years ago

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 :)

by Aleksey Ilyushin, 14 years ago

Enable alternative egress packet filter.

comment:2 by Aleksey Ilyushin, 14 years ago

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 by bboe, 14 years ago

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

Thanks!

comment:4 by Aleksey Ilyushin, 14 years ago

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 by Adrienn, 14 years ago

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 by Adrienn, 14 years ago

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

comment:7 by yohan, 14 years ago

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

Even if the patch is applied

comment:8 by Aleksey Ilyushin, 14 years ago

yohan,

can you try with 4.0.4?

comment:9 by oxoocoffee, 14 years ago

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 by oxoocoffee, 14 years ago

Opps Forgot to mention. Guest is running XP x32

comment:11 by Klaus Espenlaub, 14 years ago

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

comment:12 by Aleksey Ilyushin, 13 years ago

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

comment:13 by oxoocoffee, 13 years ago

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 by oxoocoffee, 13 years ago

Just downloaded and installed 4.1 and sam deal

comment:15 by Aleksey Ilyushin, 13 years ago

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 by oxoocoffee, 13 years ago

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 by Aleksey Ilyushin, 13 years ago

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 by Aleksey Ilyushin, 13 years ago

Summary: tcpdump not logging packets to gueststcpdump not logging packets to guests => Fixed in SVN

comment:19 by Frank Mehnert, 13 years ago

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

comment:20 by Frank Mehnert, 13 years ago

Resolution: fixed
Status: newclosed

Fixed in VBox 4.1.4.

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette