Losing network connection w/NAT on WinXP guest on Linux host

Discussions related to using VirtualBox on Linux hosts.
Post Reply
skubik
Posts: 5
Joined: 11. Jan 2009, 23:25

Losing network connection w/NAT on WinXP guest on Linux host

Post by skubik »

What I have:
- Slackware Linux 12.2 (custom kernel 2.6.29.4) on host.
- VirtualBox 2.2.4 (upgraded today from 2.2.2)
- WinXP Pro installed as guest OS (originally installed under VBox 1.4.2- I think, definitely 1.x. Seemed to migrate well to 2.2.2)
- NAT used for guest networking
- McAfee 2007/2008 (not sure which) installed on XP guest. Firewall turned on, Windows Firewall turned off.
- Host uses OpenVPN to connect as a client to VPN.
- Installed OpenVPN in the XP guest to connect to the same VPN that the host connects to- but with different keys so it acts as it's own entity on the VPN.

What's happening / happened:
- Noticed the following day after installing VBox 2.2.2 that XP could not see anything beyond the local network. Was working fine prior.
- Pinging my router (192.168.0.1) was fine. Pinging the host (192.168.0.100) was fine. Pinging google.com, failed (timeout).
- Shut down and restarted the OpenVPN service in XP guest. Sometimes this seemed to work, sometimes it didn't.
- Turning off McAfee firewall resolved nothing.
- Tried manually removing and re-adding Trusted networks from McAfee. This seemed to temporarily resolve the problem more consistently than anything else, but not always.
- Tried completely removing McAfee from system to ensure it isn't getting in the way of network settings.
- Removed OpenVPN entirely from XP guest.
- Can still see the VPN from the XP guest despite not being connected to the VPN itself! (???- could XP be piggybacking on the host network connections?)
- Local Area Connection settings in XP guest:
- IP Address: 10.0.2.15
- Default Gateway: 10.0.2.2
- DHCP Server: 10.0.2.2
- DNS Servers: 10.9.0.1 (VPN server???) & 192.168.0.100 (host)
- Connection to Internet seems to fail after the IP Address lease expires (every 24 hrs).

What I've Tried/Done (some dupes from above):
- Turning off McAfee Firewall / Removing McAfee entirely.
- Removing OpenVPN from XP guest.
- Uninstalled the network adapter from XP guest and have XP guest reinstall upon rebooting.
- Uninstalled old VirtualBox Guest Additions & Reinstall Guest Additions for new/current version of VBox (2.2.4).

The Question(s):
- Why does my Local Area Connection lose it's connection to the Internet, yet the local network remains unaffected? (no problems with the host whatsoever)
- How can my XP guest still see and access my VPN despite not having OpenVPN installed?
- Should I be using a different configuration besides NAT in order to resolve these issues? If so, what?

I'd appreciate any insight as I'm almost to the point on tear out hair. :)

Thanks,

- skubik.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Losing network connection w/NAT on WinXP guest on Linux host

Post by Perryg »

More than likely has something to do with the VBox network drivers. Not sure though but to answer your question on what I would be using I have NAT on guests (3 or 4) that I do not use that often and only need Internet access and for me to check programs and do support. Everything else I use bridged for my network. It has never let me down.
skubik
Posts: 5
Joined: 11. Jan 2009, 23:25

Re: Losing network connection w/NAT on WinXP guest on Linux host

Post by skubik »

Thanks Perryg. After my O/P I did a little more digging and discovered that my vboxnetflt kernel module was NOT loaded (vboxdrv was). I modprobed it and restarted the VM, but sadly doesn't seem to have resolved anything.

Here's an interesting quirk though: while I'm unable to ping google (apparently VBox w/ NAT has a problem with ping? Might explain a few things), Outlook and even IE seem to work just fine! In fact, even when I reinstall OpenVPN and start the service, it connects successfully.
So perhaps some of my O/P was out of mere confusion about the ping issue. Perhaps.

However, it still doesn't explain why the connection to the Internet goes down altogether after the IP lease expiration. In those instances, ping, IE, Outlook or OpenVPN (among other network-enabled programs) fail to connect.
I figure it *is* a problem since I used NAT on my previous VBox version (1.x) and it worked fine- never had a problem, and now with 2.2.x I am.

I'll try changing over to bridged tonight and see how it goes.
Still open to insight as to why NAT is failing me though.

Thanks,

- skubik
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Losing network connection w/NAT on WinXP guest on Linux host

Post by Perryg »

Here is one reason why I do not use NAT unless it is for a connection that is only temporary or non-essential.
Taken from the latest Users Manual.
<snip>
  • 6.4.3. NAT limitations
    There are four limitations of NAT mode which users should be aware of:

    ICMP protocol limitations:
    Some frequently used network debugging tools (e.g. ping or tracerouting) rely on the ICMP protocol for sending/receiving messages. While ICMP support has been improved with VirtualBox 2.1 (ping should now work), some other tools may not work reliably.

    Receiving of UDP broadcasts is not reliable:
    The guest does not reliably receive broadcasts, since, in order to save resources, it only listens for a certain amount of time after the guest has sent UDP data on a particular port. As a consequence, NetBios name resolution based on broadcasts does not always work (but WINS always works). As a workaround, you can use the numeric IP of the desired server in the \\server\share notation.

    Protocols such as GRE are unsupported:
    Protocols other than TCP and UDP are not supported. This means some VPN products (e.g. PPTP from Microsoft) cannot be used. There are other VPN products which use simply TCP and UDP.

    Forwarding host ports < 1024 impossible:
    On Unix-based hosts (e.g. Linux, Solaris, MacOS X) it is not possible to bind to ports below 1024 from applications that are not run by root. As a result, if you try to configure such a port forwarding, the VM will refuse to start.

    These limitations normally don't affect standard network use. But the presence of NAT has also subtle effects that may interfere with protocols that are normally working. One example is NFS, where the server is often configured to refuse connections from non-privileged ports (i.e. ports not below 1024).
<snip>
Post Reply