- I still want to use DHCP to obtain IP4 and IP6 addresses.
- DHCP delivers DNS servers
- I want that the DNS servers from DHCP are ignored and two servers I specify manually are used instead.
- Must be done on a headless server (no GUI) via Bash.
- ubuntu-14.04.2-server-amd64, standard minimal installation + sshd
How is this configured correctly?
How to verify that the configuration works as expected?
/etc/network/interfaces is:
# 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
# The primary network interface
auto em1
iface em1 inet dhcp
resolvconf is installed.
vi
to edit/etc/network/interfaces
and add your own DNS server entries?dns-nameservers <your DNS server IPs>
to the end of yourinterfaces
file and reboot the server... this should add the required DNS servers to the network config...<
and>
- this was my way of saying "this is where you type your DNS server IPs". For example:dns-nameservers 8.8.8.8 8.8.4.4
to add Google's primary and secondary DNS addresses.