Page 1 of 1

cant ping the guest from the host

Posted: 28. Mar 2008, 15:10
by tom909
probably a stupid simple networking question that may be independent of virtualbox.

on the guest, /sbin/ifconfig reports that the guest's IP is 10.0.2.15 internet access and such works. however, I cannot ping the guest from my host. however, I can ping the host, 10.0.2.2, from the guest. maybe I am "in the wrong network". /sbin/ifconfig on the host reports only 192.168.1.106, the IP it got from the router. what I ultimately like to do is to use krdc or similar program using the rdp protocol, to display the guest on my host via this method.

having opensuse 10.3 (64bit) host using NAT for the guests and opensuse guest 10.3.

Posted: 28. Mar 2008, 15:50
by Sasquatch
If you would read the manual, you would know that Ping doesn't work with NAT. The reason you can ping 10.0.2.2 from the Guest, is because you ping VB itself. If you would create a second VM and use NAT there too, it would have the same ip configuration. If you want to communicate both ways with the host and guest, use Host Interface as described in the manual.

Posted: 6. Apr 2008, 23:58
by over_clox
NAT - Network Address Translation

It _is_ on a totally different LAN; NAT translates addresses between the host and guest. Why PING doesn't work is because the packet header gets translated, but the packet data (which contains the return address) does not get translated. The host should recognize the PING, but the host isn't aware of the net that the guest is on because that's the responsibility of NAT itself, not the host. Therefore, the guest never gets a response from the PING, because the host got it and responded to the wrong return address. This works just the same the other way around too.

Posted: 16. Apr 2008, 01:28
by Soulthiefuk2000
Sorry to disagree.

LAN - Local Area Network

It may not be on a differant LAN but is on a differant subnet. Ping does work over NAT. This has nothing to do with packet headers but ping not working correctly with VirtualBox is a 'feature' of VB's version of NAT not a limitation of NAT. My Internet router uses NAT (as do millions of others) and I can ping Internet hosts fine.

tom909,

If you want to connect to the guest from the host you need to 'bridge' between the 2 networks. The network the guest is on is invisible to the network the host is on (because the host simulates a NAT router). If you still have problems let me know and I'll try and help.

thank,

John.

Re: cant ping the guest from the host

Posted: 7. Aug 2009, 23:20
by gboswellsac
John, with VPC there is no problem. I can ping and use WinSCP from the XP host and Fedora guest. Are you saying VB has a subset/whatever that prevents the host from ssh ing the guest? I'm in an University environment and we have used VPC to isolate guests from the host for students to use and allowed WinSCP from the XP host and Fedora guest so students can get access to files created on the guest (no USB access in VPC). I'm trying to get VB to replace the VPC since you have USB access in the guest with VB. That was a bust as you need to give host admin rights to allow guest USB access with individual sticks. If VB is blocking ssh from host to guest on nat I'm in deep poop. Bridging brings up security issues as from the guest they can circumvent firewall/anti student activities.

Comments?

Re: cant ping the guest from the host

Posted: 7. Aug 2009, 23:33
by Sasquatch
gboswellsac wrote:John, with VPC there is no problem. I can ping and use WinSCP from the XP host and Fedora guest. Are you saying VB has a subset/whatever that prevents the host from ssh ing the guest? I'm in an University environment and we have used VPC to isolate guests from the host for students to use and allowed WinSCP from the XP host and Fedora guest so students can get access to files created on the guest (no USB access in VPC). I'm trying to get VB to replace the VPC since you have USB access in the guest with VB. That was a bust as you need to give host admin rights to allow guest USB access with individual sticks. If VB is blocking ssh from host to guest on nat I'm in deep poop. Bridging brings up security issues as from the guest they can circumvent firewall/anti student activities.

Comments?
This topic is more than a year old. Why did you respond to a reply when a lot has already changed? All the things that were discussed here are mostly invalid now. The only thing that IS still valid, is the inaccessibility of the Guest from the Host when using NAT.