User Tools

Site Tools


blog:configure_dns_settings_in_etc_network_interfaces

Configure dns settings in /etc/network/interfaces

In newer Ubuntu versions, resolv.conf can not be edited, since the network manager will automatically chnage the file. If you want to configure your dns settings by hand, you have to add them directly into the interfaces file. This is the cleaner approach, since all settings are in one place, but a hint in resolv.conf would have been nice…

In /etc/network/interfaces, add a the following lines to the end of the stanza for a particular interface:

# The primary network interface
auto eth0  
  iface eth0 inet static   
  address 192.168.1.200   
  netmask 255.255.255.0   
  gateway 192.168.1.1   
  dns-nameservers 192.168.1.1   
  dns-domain example.com   
  dns-search example.com

~~LINKBACK~~

Discussion

Enter your comment. Wiki syntax is allowed:
   ____  _____   ____  _      __  ____
  /  _/ / ___/  / __/ | | /| / / /_  /
 _/ /  / /__   / _/   | |/ |/ /   / /_
/___/  \___/  /___/   |__/|__/   /___/
 
blog/configure_dns_settings_in_etc_network_interfaces.txt · Last modified: 2014-04-24 09:11 by brb