I am having problem on natnetwork now : from the VM, I can't ping ANY ip except the natnetwork gateway, but the vm actually has internet and can access any outside port, just can't ping.
My configuration:
C:\Program Files\Oracle\VirtualBox>VBoxManage list natnetworks
NetworkName: PN1
IP: 172.16.100.1
Network: 172.16.100/24
IPv6 Enabled: No
IPv6 Prefix:
DHCP Enabled: No
Enabled: Yes
Port-forwarding (ipv4)
ssh:tcp:[]:22:[172.16.100.102]:22
loopback mappings (ipv4)
127.0.0.1=2
question 1: where is this 172.16.100.1 gateway IP?
virtualbox has a adapter for hosted network:
Ethernet adapter VirtualBox Host-Only Network:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::5089:daf1:a1fb:bad9%15
IPv4 Address. . . . . . . . . . . : 192.168.56.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
but it doesn't have a virtual adapter for natnetwork.
The VM is a SuseLinux VM with IP 172.16.100.102, it's configured on the PN1 Nat network. I can actually ssh into this VM with the 22 port forwarding.
From the Suse VM:
va:~ # ifconfig eth0
eth0 Link encap:Ethernet HWaddr 08:00:27:DB:32:6E
inet addr:172.16.100.102 Bcast:172.16.100.255 Mask:255.255.255.0
inet6 addr: fe80::a00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:709 errors:0 dropped:0 overruns:0 frame:0
TX packets:1196 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:290397 (283.5 Kb) TX bytes:128300 (125.2 Kb)
va:~ # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 172.16.100.1 0.0.0.0 UG 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
link-local * 255.255.0.0 U 0 0 0 eth0
172.16.100.0 * 255.255.255.0 U 0 0 0 eth0
va:~ #
va:~ # ping 172.16.100.1
PING 172.16.100.1 (172.16.100.1) 56(84) bytes of data.
64 bytes from 172.16.100.1: icmp_seq=1 ttl=255 time=2.27 ms
64 bytes from 172.16.100.1: icmp_seq=2 ttl=255 time=0.860 ms
^C
It can ping 172.16.100.1 ( where is it? )
va:~ #
va:~ # ping 10.4.117.32
PING 10.4.117.32 (10.4.117.32) 56(84) bytes of data.
^C
Can't ping 10.4.117.32 ( virtualbox windows 2008 host's real IP)
va:~ #
va:~ # ping 10.4.38.140
PING 10.4.38.140 (10.4.38.140) 56(84) bytes of data.
^C
Can't ping another machine in our network
va:~ # ping google dot com
PING google dot com (173.194.115.65) 56(84) bytes of data.
^C
Can't ping google, dns is working fine.
va:~ # wget 10.4.38.140
Connecting to 10.4.38.140:80... connected.
Length: 37500 (37K) [text/html]
Saving to: `index.html'
2014-02-20 11:30:28 (19.7 MB/s) - `index.html' saved [37500/37500]
Can access 10.4.38.140's website.
va:~ # telnet 10.4.38.140 22
Trying 10.4.38.140...
Connected to 10.4.38.140.
Escape character is '^]'.
SSH-2.0-OpenSSH_4.3
^]
Can access 10.4.38.140's port 22.
va:~ # telnet 10.4.38.140 732
Trying 10.4.38.140...
Connected to 10.4.38.140.
Escape character is '^]'.
^]
Can access non-standard port.
va:~ # telnet 10.4.117.32 3389
Trying 10.4.117.32...
Connected to 10.4.117.32.
Escape character is '^]'.
^]
Can access VB host's port 3389.
va:~ # netstat -nap | grep tcp | grep EST
tcp 0 48 172.16.100.102:22 10.4.38.140:35563 ESTABLISHED 3254/sshd: setup [p
I actually ssh into this VM from 10.4.38.140 by "ssh setup@10.4.117.32"
I run wireshark on the VB host to catch ICMP package, but couldn't see anything when I run "ping" command from the VM.
Almost like the VB natnetwork driver is dropping the ping package. I am using 4.3.6-91406