Add resolvers to ubuntu server


sudo nano /etc/network/interfaces


# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static 
address ipAddress 
netmask 255.255.255.0 
gateway gatewayIP 
dns-nameservers 69.64.66.11 69.64.66.10

Once you have entered the values correctly, press Ctrl+Enter to save it with the current filename, then press Ctrl+X to exit the editor.

Provided you entered your values correctly, verify the new settings by retyping the cat command:


cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static 
address 123.45.67.89
netmask 255.255.255.0 
gateway 123.45.67.1 
dns-nameservers 8.8.8.8 8.8.4.4

Apply setting to Interface

After you have determined the values entered are correct, restart networking with the following command:


sudo service networking restart
stop: Unknown instance: 
networking stop/waiting
administrator@ubuntu:~#

Verify it works
To verify the resolvers are working, simply ping a known domain.


ping google.com
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=45 time=42.1 ms
64 bytes from 8.8.8.8: icmp_req=2 ttl=45 time=42.2 ms
64 bytes from 8.8.8.8: icmp_req=3 ttl=45 time=42.0 ms

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.