NAT problem with XP guest (no internet!) SOLVED

Discussions related to using VirtualBox on Linux hosts.
Post Reply
davidlondon
Posts: 4
Joined: 18. May 2007, 23:27

NAT problem with XP guest (no internet!) SOLVED

Post by davidlondon »

Hi All,

When I installed virtualbox in kubuntu, I had access to the internet straight away with the XP VM and I have to say what a great product!.

However, for some reason I now cannot access the net using firefox in the VM. I have messed around with the TCP/IP settings for the virtual ethernet adaptor but nothing seems to work.

Auto settings assigned by dhcp give:

IP ADDRESS: 10.0.2.15
SUBNET MASK: 255.255.255.0
DEFAULT GATEWAY: 10.0.2.2
DHCP SERVER: 10.0.2.2
DNS SERVER: 10.0.2.3
WINS: blank

I have tried changing the dns to 192.168.1.1 which is the router and it still cannot access the internet. I checked linux log messages and I can see this:

DROPPED IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:0e:35:b6:c0:3b:08:00 SRC=192.168.1.10 DST=192.168.1.255 LEN=202 TOS=0x00 PREC=0x00 TTL=128 ID=18711 PROTO=UDP SPT=138 DPT=138 LEN=182

For some reason the net access of the XP guest just stopped and It is getting irritating! :)

Any ideas?

SOLVED:

If I could access the internet with XP VM out of the box, then I changed something and It could not be linux guarddog firewall.

Turns out it was the XP firewall I installed-I had not allowed access to the net by windows explorer and that stopped all internet access.
Cerin
Posts: 21
Joined: 7. Oct 2007, 20:50

Post by Cerin »

I have the same problem and setup, but I have both my host and guest firewalls disabled, and that's not fixing the problem. There's no second firewall installed on my WinXP guest.
Ingo
Volunteer
Posts: 731
Joined: 22. Aug 2007, 10:13
Location: Germany

Post by Ingo »

Cerin wrote:I have the same problem and setup, but I have both my host and guest firewalls disabled, and that's not fixing the problem. There's no second firewall installed on my WinXP guest.
I think you are using NAT, right?
Can you ping your router?
Cerin
Posts: 21
Joined: 7. Oct 2007, 20:50

Post by Cerin »

Ingo wrote:
Cerin wrote:I have the same problem and setup, but I have both my host and guest firewalls disabled, and that's not fixing the problem. There's no second firewall installed on my WinXP guest.
I think you are using NAT, right?
Can you ping your router?
No, "Request timed out."
Ingo
Volunteer
Posts: 731
Joined: 22. Aug 2007, 10:13
Location: Germany

Post by Ingo »

OK you are using NAT. Is your adapter enabled? Is your network driver in the VM installed properly? From within the VM, can you ping anything? Can you ping its own IP-Address? Can you ping the hosts IP-Address? Where is the network connection broken?
Cerin
Posts: 21
Joined: 7. Oct 2007, 20:50

Post by Cerin »

Yes, I'm using NAT, the default setup.

How do determine if the network driver in the VM is installed properly? It's just the default Windows ethernet "Local Area Connection". If I disable the connection, and re-enable, the VM locks-up, forcing me to do a Machine->Reset.

I can't ping anything other than localhost. I'm behind a router, but the host is in the DMZ. The host's IP is 192.168.1.100, and the VM's IP set by DHCP is 10.0.2.15, which I believe is the IP assigned by my provider (Comcast) to the router. I tried manually setting the VM's IP to a 192.168.x.x but I still couldn't ping anything.

I'm not sure where this means the connection is broken. I would guess it's broken in the VM. Oddly enough, the shared folder between host and VM through vboxsrv works just fine.
Ingo
Volunteer
Posts: 731
Joined: 22. Aug 2007, 10:13
Location: Germany

Post by Ingo »

Cerin wrote:How do determine if the network driver in the VM is installed properly?
Just doing the normal trouble shooting in Windows XP. In the Device Manager deinstall the Network Adapters and install the Guest Additions again. They contain also the Network Driver.
Cerin wrote:If I disable the connection, and re-enable, the VM locks-up, forcing me to do a Machine->Reset.
That is a really serious problem you have to fix first. It seems your VM installation is broken. You need a stable running VM.
Cerin wrote:The host's IP is 192.168.1.100, and the VM's IP set by DHCP is 10.0.2.15, which I believe is the IP assigned by my provider (Comcast) to the router.
No, 10.0.2.15 comes from the DHCP-server within VirtualBox. If you are interested how this works then look here:
http://www.virtualbox.org/wiki/Advanced ... king_Linux
Cerin
Posts: 21
Joined: 7. Oct 2007, 20:50

Post by Cerin »

Ingo wrote:
Cerin wrote:How do determine if the network driver in the VM is installed properly?
Just doing the normal trouble shooting in Windows XP. In the Device Manager deinstall the Network Adapters and install the Guest Additions again. They contain also the Network Driver.
Cerin wrote:If I disable the connection, and re-enable, the VM locks-up, forcing me to do a Machine->Reset.
That is a really serious problem you have to fix first. It seems your VM installation is broken. You need a stable running VM.
Ingo wrote: I agree. I've reinstalled the XP VM several times, but Virtualbox still crashes. I think it's more a VB problem than an XP problem.
Cerin wrote:The host's IP is 192.168.1.100, and the VM's IP set by DHCP is 10.0.2.15, which I believe is the IP assigned by my provider (Comcast) to the router.
No, 10.0.2.15 comes from the DHCP-server within VirtualBox. If you are interested how this works then look here:
http://www.virtualbox.org/wiki/Advanced ... king_Linux
Thanks, but that page is a little ambiguous on usage. Which script should I run? When should I run those scripts? Once? Everytime VB starts? Everytime the host starts? Should I use the "Host Interface" with one of those scripts as the "Setup Application"?
Ingo
Volunteer
Posts: 731
Joined: 22. Aug 2007, 10:13
Location: Germany

Post by Ingo »

Sorry Cerin,
I wouldn't advise you to follow the instructions at the link. I only would show you where the ip-addresses come from. The functionality in that howto is built in VirtualBox. Forget it.

Have you got a running machine without forcing a Machine->Reset? Try to get it stable with a simple setup.
Cerin
Posts: 21
Joined: 7. Oct 2007, 20:50

Post by Cerin »

Ingo wrote:Sorry Cerin,
Have you got a running machine without forcing a Machine->Reset? Try to get it stable with a simple setup.
Yes, it's stable for the most part. After I reinstalled the Guest, I can enable and disable the LAN connection without the VM crashing. Still no internet though.
native
Posts: 1
Joined: 23. Oct 2007, 18:36

Post by native »

Cerin wrote:
Ingo wrote:Sorry Cerin,
Have you got a running machine without forcing a Machine->Reset? Try to get it stable with a simple setup.
Yes, it's stable for the most part. After I reinstalled the Guest, I can enable and disable the LAN connection without the VM crashing. Still no internet though.
set your IP to DHCP, then manually set your DNS settings and your virtual box should be able to go online.
Cerin
Posts: 21
Joined: 7. Oct 2007, 20:50

Post by Cerin »

The IP for both Host and Guest *is* set to DHCP, which is the default. I'm not sure what you mean by "manually set your DNS" since this defeats the purpose of using DHCP...

I tried assigning the guest a static IP, but still no internet.

I tried disabling the option to "automatically option DNS information from provider" and statically assigned the primary and secondary DNS servers in the guest, but still no internet.
Ingo
Volunteer
Posts: 731
Joined: 22. Aug 2007, 10:13
Location: Germany

Post by Ingo »

Hi Cerin,
I'm using VirtualBox 1.5.2 with a sophisticated manual network setting. So it works all the time for me.
But if I setup the default settings with NAT like you to understand your issue I get the same error. Ping to my local router gives me Request timed out.

I do not understand this till now...
but I'm looking for it.
Do you heard from others here having the same problem?
Cerin
Posts: 21
Joined: 7. Oct 2007, 20:50

Post by Cerin »

Ingo,

I'm glad you've been able to reproduce the problem. Googling finds several people reporting this problem, but I haven't found any resolutions.

I've found two howto guides on setting up Virtualbox in Fedora. Both seem to use the "Host Interface" option instead of NAT.

1) http://www.yum-extender.org/wiki/Fedora/VirtualBox

This procedure fails at the step " VBoxAddIF vbox0 userid br0", since /etc/vbox does not exist. It also disables my entire internet connection, forcing me to reboot.

2) http://paparadit.blogspot.com/2007/08/v ... linux.html

This fails at the "tuntap" script they use to setup the bridge, which fails to create the tap1 interface:

#!/bin/bash
tunctl -t tap1 -u root
brctl addbr br0
ifconfig eth0 0.0.0.0 promisc
brctl addif br0 eth0
#ifconfig br0 192.168.1.10
dhclient br0
brctl addif br0 tap1
ifconfig tap1 up
exit

It's very frustrating.
Ingo
Volunteer
Posts: 731
Joined: 22. Aug 2007, 10:13
Location: Germany

Post by Ingo »

Let's go on here because it's not solved...
http://forums.virtualbox.org/viewtopic.php?t=2401
.
Post Reply