Statically Assign a DNS Server to Expedition (DO NOT EDIT resolv.conf)

Printer Friendly Page

If needed, the steps to statically configure a DNS server to the Expedition server will be to edit the dns-nameserver in the /etc/network/interfaces file. 

 

Editing resolv.conf is not reliable as any edits will be overwritten on reboot of the Expedition server.

 

expedition@Expedition:/etc/network$ sudo vi interfaces

 

Configured to use DHCP

 

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

iface ens33 inet dhcp

dns-nameservers  8.8.8.8  4.2.2.2

 

Configured with a static IP

 

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

iface ens33 inet static

       address 192.168.252.136

       netmask 255.255.255.0

       gateway 192.168.252.2

       dns-nameservers      8.8.8.8 4.2.2.2

Tags (3)