Setting name servers via dhclient
Into the /etc/dhclient.conf
file, add the following line:
prepend domain-name-servers 8.8.8.8, 8.8.4.4;
8.8.8.8
and 8.8.4.4
are DNS servers of Google, replace them with ones you like in case.
The prepend
keyword tells dhclient to add these nameservers to the beginning of /etc/resolv.conf
. Replace prepend
with append
if you want them to be appended to, or default
if you want them to be overridded with the values dhclient
finds.
For more information, see man pages for dhclient.conf
, dhclient
and resolv.conf
.
Written by Göktuğ Kayaalp
Related protips
1 Response
Thanks for the tip!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Dns
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#