I have been browsing around the forums and can't seem to find an answer that works for me. I am running Ubuntu 16.04 in a vm, with Windows 10 as the host machine, connected to the internet with NAT. When I try to do a whois, or ping outside the network I get the error

$whois google.com
connect: Network is unreachable

Tools like dig and wget both work fine, and I can access the web through the browser, here are some of the usual command outputs for debugging


$dig google.com
; <<>> DiG 9.10.3-P4-Ubuntu <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7759
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

; EDNS: version: 0, flags:; MBZ: 0005 , udp: 4000
;google.com.            IN  A

google.com.     5   IN  A

;; Query time: 2029 msec
;; WHEN: Wed Feb 01 09:31:49 EST 2017
;; MSG SIZE  rcvd: 55


ping google.com
PING google.com ( 56(84) bytes of data.
--- google.com ping statistics ---
35 packets transmitted, 0 received, 100% packet loss, time 34075ms


$ifconfig ens33
ens33     Link encap:Ethernet  HWaddr 00:0c:29:81:b4:9e  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::cb32:1559:ed2e:9968/64 Scope:Link
          RX packets:399609 errors:0 dropped:0 overruns:0 frame:0
          TX packets:111912 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:318681424 (318.6 MB)  TX bytes:17133081 (17.1 MB)


Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         UG    100    0        0 ens33
link-local      *          U     1000   0        0 ens33    * 


    # interfaces(5) file used by ifup(8) and ifdown(8)
    auto lo
    iface lo inet loopback

I am using Oh My ZSH, but I dont think that would affect this. Any help would be appreciated!

  • Your route output look wrong ..I would expect it to be in the opposite order. Also the last line is missing 6 fields.
    – Soren A
    Feb 1, 2017 at 14:55
  • What flavor of VM is this? IIRC for VirtualBox, the default NAT range is 10.x.x.x - have you change that, and if so did you by any chance make it the same subnet as the host? Feb 1, 2017 at 15:02
  • @SorenA that last line was just from trying something out someone suggested, it wasn't there originally Feb 1, 2017 at 15:16
  • @steeldriver Its VMware Workstation, I have not changed the NAT range at all Feb 1, 2017 at 15:16
  • 1
    As wget, browser an dig are working (the default protocols HTTP/DNS), but not WHOIS (port 43) and PING (ICMP), this seems to be an issue with some sort of firewall (in your VM, VMWare or the windows host...). Try ping, which is the network endpint in VMWare, then ping <IP-of-your-host> etc. to find out where this stops.
    – ridgy
    Feb 1, 2017 at 15:20


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.