3

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:

$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

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

;; ANSWER SECTION:
google.com.     5   IN  A   216.58.219.206

;; Query time: 2029 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Wed Feb 01 09:31:49 EST 2017
;; MSG SIZE  rcvd: 55

Ping:

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

Ifconfig:

$ifconfig ens33
ens33     Link encap:Ethernet  HWaddr 00:0c:29:81:b4:9e  
          inet addr:192.168.93.137  Bcast:192.168.93.255  Mask:255.255.255.0
          inet6 addr: fe80::cb32:1559:ed2e:9968/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          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)

Route

$route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.93.2    0.0.0.0         UG    100    0        0 ens33
link-local      *               255.255.0.0     U     1000   0        0 ens33
192.168.93.0    * 

/etc/networking/interfaces

    # 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!

7
  • 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 192.168.93.2, 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

0

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.