Asked on server fault: https://serverfault.com/questions/706488/ubuntu-14-04-virtualbox-guest-unable-to-ping-outside-world but put on hold as off topic:
I have an Ubuntu 14.04 VM running on Ubuntu 14.04 host on my home network, the host can access the network and internet completely fine, and the guest can ping devices on the network and be pinged- however it cannot ping (or curl
) the outside world (i.e. google):
ptinkler@ptinkler-dev:~$ ping www.google.com
PING www.google.com (216.58.208.68) 56(84) bytes of data.
From ptinkler-dev.home (192.168.1.75) icmp_seq=1 Destination Host Unreachable
From ptinkler-dev.home (192.168.1.75) icmp_seq=2 Destination Host Unreachable
From ptinkler-dev.home (192.168.1.75) icmp_seq=3 Destination Host Unreachable
^C
--- www.google.com ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3014ms
I've tried both bridged and NAT adapters, and the VM works perfectly on my work network, making me think it may be an issue with my home network router.
edit:
sysctl net.ipv4.ip_forward
returned 0, but setting it to 1 didn't make a difference.
iptables -L -n -v
came back with:
ptinkler@ptinkler-dell-xps:~$ iptables -L -n -v
modprobe: ERROR: could not insert 'ip_tables': Operation not permitted
iptables v1.4.21: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded
Host:
wlan0 Link encap:Ethernet HWaddr c8:f7:33:da:68:21
inet addr:192.168.1.72 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::caf7:33ff:feda:6821/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:248973 errors:0 dropped:0 overruns:0 frame:0
TX packets:160935 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:233346198 (233.3 MB) TX bytes:22586578 (22.5 MB)
Guest:
eth0 Link encap:Ethernet HWaddr 08:00:27:31:7d:f6
inet addr:192.168.1.75 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe31:7df6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1349 errors:0 dropped:0 overruns:0 frame:0
TX packets:687 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:144462 (144.4 KB) TX bytes:50305 (50.3 KB)
Interrupt:19 Base address:0xd020
curl www.google.com
on the guest also does not work