I have a Debian based virtual machine running on VMWare Fusion with a OS X 10.9 host OS.
In VMWare Fusion I have a private network setup that allows the Mac and the VM to communicate without access to the outside world, this is for me so that I can SSH/SHCP into the server without packets going out to a router. This is necessary for me so I can work with the VM when I'm not on an external network, such as when I'm on a plane or out and about.
In addition to the private network I would like to have the VM attached to a public network which I may enable or disable from time to time. Obviously having the VM able to reach the Internet may be necessary at time, so I configured the VM to have two network connections.
The first in the public network, which in VMWare is configured to be essentially whatever the Mac is connected to.
The second network is the private network.
This is the /etc/network/interfaces file I've written.
# The loopback network interface auto lo iface lo inet loopback # The public network interface auto eth0 allow-hotplug eth0 iface eth0 inet dhcp # The private network interface auto eth1 allow-hotplug eth1 iface eth1 inet static address 192.168.1.250 netmask 255.255.255.0 gateway 192.168.1.1
As far as I can tell, this should work just fine but my VM cannot ping google.com, however oddly enough it seems to be able to resolve google.com to it's IP just fine.
I'm sure this is something simple, but I need help, thanks in advance!
cody@eureka:/$ ping google.com PING google.com (188.8.131.52) 56(84) bytes of data. ^C --- google.com ping statistics --- 78 packets transmitted, 0 received, 100% packet loss, time 77025ms
cody@eureka:/$ sudo ifconfig eth0 Link encap:Ethernet HWaddr 00:0c:29:a6:d9:b3 inet addr:192.168.0.104 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fea6:d9b3/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:553 errors:0 dropped:0 overruns:0 frame:0 TX packets:27 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:105473 (103.0 KiB) TX bytes:2318 (2.2 KiB) eth1 Link encap:Ethernet HWaddr 00:0c:29:a6:d9:bd inet addr:192.168.1.250 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fea6:d9bd/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:601 errors:0 dropped:0 overruns:0 frame:0 TX packets:461 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:53403 (52.1 KiB) TX bytes:56656 (55.3 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)