2

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 
10
  • if you use nat adapter and host has access to internet the guest use that connection through the router, so the router doesn't know about the guest machine, so it is not the router. you can check the firewall on guest machine sometimes the ping are blocked but web access no
    – emirjonb
    Commented Jul 17, 2015 at 10:04
  • curl www.google.com on the guest also does not work
    – ptr
    Commented Jul 17, 2015 at 10:11
  • I am also inclined to think that it is a setup issue. Just as a side-issue, did you install the guest additions? I use Oracle VirtualBox with Ubuntu 12.04 guests, 14.04 guests, Win7 and Win XP guests, and as long as I use bridged adapter on DHCP, I never have issues. Please check this post Commented Jul 17, 2015 at 10:11
  • guest additions is installed- and my only doubts with it being a setup issue is that the exact setup works perfectly fine without problems on the work network, only when I bring the laptop home and try to use it on the home network does this issue occur
    – ptr
    Commented Jul 17, 2015 at 10:19
  • Does the host machine on your home network has access on internet and able to ping any global IP? If yes the guest machine using nat bridge should be able to access internet without issues. You can do a check on the firewall on host machine if virtualbox is allowed.
    – emirjonb
    Commented Jul 17, 2015 at 10:35

0

You must log in to answer this question.

Browse other questions tagged .