VirtualBox

Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#3465 closed defect (fixed)

CentOS host couldn't talk to Windows guest => Fixed in SVN

Reported by: Thameem Owned by:
Component: network/hostif Version: VirtualBox 2.1.4
Keywords: host to guest not working Cc: thameem_ansari@…
Guest type: Windows Host type: Linux

Description

I have host networking with cent os 5.2 host and windows xp guest and assigned a static ip to the guest OS. Internet works fine from guest. But from host can't talk to guest. I tried turning off the firewalls. If I do traceroute from host to guest IP, all hops failed.

I tested the same vbox guest with fedora 10 64bit, fedora 8 32bit host systems and all working fine. If I use NAT networking, i can talk to host from guest.

I am thinking it must be something vbox is doing in CentOS.

Attachments (2)

dump.txt (1.4 KB ) - added by virtualbox@… 15 years ago.
diff_vboxnetflt (1.5 KB ) - added by Frank Mehnert 15 years ago.
vboxnetflt patch for Linux kernels <= 2.6.18

Download all attachments as: .zip

Change History (24)

by virtualbox@…, 15 years ago

Attachment: dump.txt added

comment:1 by virtualbox@…, 15 years ago

I have the same problem:

  • ping works in all directions, from and to any ip address
  • connections from and to any address except the one of the VirtualBox host itself are working
  • connections from and to the IP address of the VirtualBox host itself (running e.g. a samba service) don't work.

I captured the traffic on both sides and realized that the vmnetflt module seemes to change the IP destination address of all incomming packets on the guest side which are greater than a few bytes.

Test setup

host side (CentOS v5.2, VirtualBox v2.1.4, IP 213.173.xxx.x49)

  echo "Hello world.\n" |nc -l 1234

host side (Windows XP Professional SP3, IP 213.173.xxx.x51)

  telnet 213.173.xxx.x49 1234

(see the attached dump.txt)

comment:2 by mk, 15 years ago

I set up Wireshark on the Windows XP guest. While telnetting to port 80 from the guest to the host in a DOS prompt, I see the proper source/destination IP addresses in wireshark until the actual response from the HTTP server comes back, and then the destination IP address is modified for that packet.

For example, my source IP is: 10.10.10.44

But the response returns to: 185.124.10.44 or: 216.84.10.44

Basically, it returns a random first two values of my source IP address every time.

comment:3 by Thameem, 15 years ago

Marckell, Are you sure that the wireshark is not showing internet traffic to your host. Because if you run wireshark in guest (as you mentioned), it will show the traffic on the interface (including internet traffic to host). So, it might look like the response is going to random IP. But you have mentioned that your first two dialects of ip is changed which is wiered.

comment:4 by mk, 15 years ago

I filtered the wireshark traffic to only port 80, and had no web browsers open in either the host or guest.

The response return IP addresses are partially randomized every time a connection is made. And it's a common pattern: the first two values are random, and the second two values are 10.44, which is the same as the last two values of the source IP.

comment:5 by mk, 15 years ago

Thought I'd add some error replication instructions:

  1. Install CentOS 5.2 as the host (http://mirror.centos.org/centos/5/isos/). I am running the i386 version.
  1. Install VirtualBox RPM from http://download.virtualbox.org/virtualbox/2.1.4/VirtualBox-2.1.4_42893_rhel5-1.i386.rpm.
  1. Install Windows XP Professional as the client in VirtualBox.
  1. Configure networking in VirtualBox to use host networking on eth0.
  1. Configure networking in Windows XP to have an IP address on the same network as the host, using the same netmask and gateway.
  1. Verify that from Windows that google.com is pingable, and the host is pingable. The host should be pingable and respond (ICMP).
  1. Test connectivity by opening a browser to get to google.com.
  1. Turn off iptables in CentOS.
  1. On the host, telnet to localhost on port 22, 80, or some other service known to be running. Confirm that a result is returned.
  1. Telnet from Windows to the host IP address on port 22, 80, or some other service known to be running. See previous postings on guesses as to where this traffic disappears to.

comment:6 by John Evans, 15 years ago

I have followed the steps posted by marckell since I was having the same problem. I have confirmed this bug exists. I figured a little backup would help. Just my $0.02.

comment:7 by John Evans, 15 years ago

I just upgraded to VBox 2.2.0 and have confirmed that this bug remains in the product.

comment:8 by yanshq, 15 years ago

I get the error,too. but i read the manual,say using TAP would get more functinos. I will try it tommorrow.

comment:9 by Shahmir, 15 years ago

Can confirm that this bug exists with CentOS 5.3 as the host and Windows 7 as the guest OS. Guest OS can't access any services running on host, like apache, ssh, etc.

comment:10 by devnull, 15 years ago

Having same problem with:
Host - CentOS 4.7 kernel 2.6.9-78.0.17.EL
VirtualBox - 2.2.0 and 2.2.2
Guest - freebsd, debian, centos
Guest network type - Bridged - DHCP
Absolutely not firewalls in place
ICMP works flawlessly between HOST and Guest

Host can communicate with anything but guest and Guest can communicate with anything but Host.

http://forums.virtualbox.org/viewtopic.php?f=7&t=17362 See forum topic for more details.

comment:11 by secondtreatise, 15 years ago

I'm having the same problem running:

Host - CentOS 5.2 Kernel 2.6.18-128.1.10.el5 Guest - Red Hat 3 Kernel 2.4.21-58.EL Network - Bridged DHCP

I was able to access the guest fine when I used the NAT configuration & VBox's port forwarding.

comment:12 by Frank Mehnert, 15 years ago

Sounds like the same issue as #3870. Can you try

/sbin/ethtool -K eth0 tx off

on the host?

comment:13 by Frank Mehnert, 15 years ago

This is probably the correct fix. Feedback welcome.

comment:14 by mk, 15 years ago

I have tried the fix recommended by frank. Re-building the kernel module was successful, but still unable to make a non-ICMP connection after starting the vm again.

comment:15 by mk, 15 years ago

I didn't see the recommendation by Frank regarding ethtool. That works. But the fix described in 3926 did not.

Thanks for the workaround, though!

comment:16 by Frank Mehnert, 15 years ago

marckell, could you check if VirtualBox 2.2.4 fixes the problem for you without using ethtool?

comment:17 by mk, 15 years ago

I have installed VirtualBox 2.2.4 from RPM (VirtualBox-2.2.4_47978_rhel5-1.i386.rpm) under CentOS 5.3.

Installation went without a problem. I restarted the system. My old setting files were upgraded when I started VirtualBox.

I was not able to connect to my host webserver from my guest version of Windows XP. I was able to ping the webserver.

I ran the ethtool workaround, and I was able to connect to my host webserver.

So I don't think any fixes in 2.2.4 had an effect on this bug.

But I'm still very, very happy with the ethtool workaround!

by Frank Mehnert, 15 years ago

Attachment: diff_vboxnetflt added

vboxnetflt patch for Linux kernels <= 2.6.18

comment:18 by Frank Mehnert, 15 years ago

Please could you apply this patch and check if this finally fixes your problem? Do

cd /usr/src/vboxnetflt-2.2.4
patch -p0 < path-to-diff_vboxnetflt
/etc/init.d/vboxdrv setup

We believe this patch should fix issues with Linux host kernels <= 2.6.18.

comment:19 by csfreak, 15 years ago

The patch works for VBox 2.2.4 on Centos 5.2.

Thanks

comment:20 by Frank Mehnert, 15 years ago

Thank you for the feedback!

comment:21 by Frank Mehnert, 15 years ago

Summary: CentOS host couldn't talk to Windows guestCentOS host couldn't talk to Windows guest => Fixed in SVN

comment:22 by Frank Mehnert, 15 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use