20100304

Set DNS server in Ubuntu

DNS server IP is set in "/etc/resolv.conf", but if DHCP is used, the DNS server IP recieved from DHCP server will cover the config in "/etc/resolv.conf".

Caution: Dont define DNS server IP in "/etc/network/interfaces" like this:
===============
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.1
dns-search 192.168.1.1
===============
This will make you cant connect to the website using domain name, but only using IP address will connect to the website.

Ref:
http://www.cyberciti.biz/faq/setting-up-an-network-interfaces-file/
https://help.ubuntu.com/8.04/serverguide/C/network-configuration.html

没有评论:

发表评论