I have an Ubuntu server, but when I try to update I get this error
Err:1 http://es.archive.ubuntu.com/ubuntu artful InRelease
Temporary failure resolving 'es.archive.ubuntu.com'
I know that the problem is DNS.
This is the content of /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eno1
iface eno1 inet static
address 175.23.11.2
netmask 255.255.255.0
gateway 175.23.11.1
dns-nameservers 8.8.8.8 8.8.4.4
With ifconfig
this is what I see:
eno1 Link encap:Ethernet HWaddr a4:ba:db:32:f5:18
inet addr:175.23.11.2 Bcast:172.21.11.255 Mask:255.255.255.0
inet6 addr: fe80::a6ba:dbff:fe32:f518/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3269550 errors:0 dropped:35950 overruns:0 frame:0
TX packets:45180 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:243192512 (243.1 MB) TX bytes:65765157 (65.7 MB)
Interrupt:16
Everything looks great but doesn't work.
root@server:/etc/network# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=2 ttl=54 time=4.11 ms
root@server:/etc/network# ping google.com
ping: unknown host google.com
root@server:/etc/network# ping www.google.com
ping: unknown host www.google.com
My resolv.conf
is empty because the DNS conf is in interfaces file instead
Note: I have this file resolv.conf
but not resolvconf
.
How can I fix this?