VirtualBox

Ticket #3465 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

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

Reported by: thameema Owned by:
Priority: major 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

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

Change History

Changed 5 years ago by virtualbox@…

comment:1 Changed 5 years ago by virtualbox@…

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 Changed 5 years ago by marckell

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 Changed 5 years ago by thameema

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 Changed 5 years ago by marckell

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 Changed 5 years ago by marckell

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 Changed 5 years ago by jtevans

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 Changed 5 years ago by jtevans

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

comment:8 Changed 5 years ago by yanshq

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

comment:9 Changed 5 years ago by sonrah

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 Changed 5 years ago by devnull

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 Changed 5 years ago by secondtreatise

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 Changed 5 years ago by frank

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

/sbin/ethtool -K eth0 tx off

on the host?

comment:13 Changed 5 years ago by frank

 This is probably the correct fix. Feedback welcome.

comment:14 Changed 5 years ago by marckell

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 Changed 5 years ago by marckell

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 Changed 5 years ago by frank

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

comment:17 Changed 5 years ago by marckell

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!

Changed 5 years ago by frank

vboxnetflt patch for Linux kernels <= 2.6.18

comment:18 Changed 5 years ago by frank

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 Changed 5 years ago by csfreak

The patch works for VBox 2.2.4 on Centos 5.2.

Thanks

comment:20 Changed 5 years ago by frank

Thank you for the feedback!

comment:21 Changed 5 years ago by frank

  • Summary changed from CentOS host couldn't talk to Windows guest to CentOS host couldn't talk to Windows guest => Fixed in SVN

comment:22 Changed 5 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use