1

Ubuntu 18.04 cannot ping or nslookup outside the LAN.

When I do nslookup www.google.comit hangs for a while and returns ;; connection timed out; no servers could be reachedI cannot ping www.google.com but I can ping 10.100.10.1, my gateway. The server is using netplan. When I do a netplan apply, I don't get errors. Here is my netplan config file.

network:
  version: 2
  ethernets:
          ens160:
            dhcp4: no
            dhcp6: no
            addresses: [10.100.10.26/24]
            gateway4: 10.100.10.1
            nameservers:
               addresses: [8.8.8.8, 8.8.4.4]

Here is my resolv.conf:

nameserver 8.8.8.8
nameserver 8.8.4.4

I can't install apps because it cannot resolve DNS.

This is an image from a ESXI implementation. Other images in the network respond to all network requests except this linux client.

2
  • Show not a configuration file but ip addr and ip route from the running system. Last should display a line similar to default via 10.100.10.1 dev ens160; try ping 10.100.10.1 (or whatever your actual default route is) and see if that works. Jun 7 at 7:38
  • And check if there is a firewall blocking your outbound requests.
    – bjoster
    Jun 16 at 14:55

1 Answer 1

0

It was related to the firewall, there are two types of NAT that can be figured on the firewall: 1 to 1 with Nat, or 1 to many with NAT.

What worked was 1 to many with NAT.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .