FreeBSD > How to setup FreeBSD as DNS client?November 15, 2010 by: upa_kid
Local name resolution is done via /etc/hosts file. If you have small network then use /etc/hosts file. DNS (domain name service is accountable for associating domain names with ip address, for example domain yahoo.com is easy to remember than IP address 220.127.116.11) provides better name resolution. To configure FreeBSD as DNS client you need to edit or modify /etc/resolv.conf file. This file defines which name servers to use.
Steps to configure FreeBSD as DNS client
1) Login as a root user
$ su -
2) Open /etc/resolv.conf file using text editor
# vi /etc/resolv.conf
3) Add ISP nameserver as follows:
Note Max. three nameserver can be used/defined at a time.
4) Save file
5) Test dns using ping, dig or nslookup commands:
$ dig www.cyberciti.biz
$ dig mx google.com
$ dig a yahoo.com
$ nslookup nixcraft.com
$ ping www.cyberciti.biz
Use browser to browse Internet.
* How do I improve DNS performance on Linux/Windows Desktop (if you are using Linux/FreeBSD as a Router)Have you found this script useful? Please support author by PayPal donation.
- Linux: Setup as DNS Client / Name Server IP Address
- Why my Linux seems to hang at Sendmail or Httpd service screen while booting server?
- Solaris UNIX: How to Setup DNS Client configuration / name server
- Query Internet name servers with a certain DNS server
- Installation Of BIND As A Secondary (Slave) DNS Server On CentOS
- Howto: Ubuntu Linux convert DHCP network configuration to static IP configuration
- Solaris: How do I setup a default static route / static router IP address?
- Improve DNS performance for Linux / Windows desktop using DNS caching software
- 9 Tips to diagnose remote GNU/Linux server network connectivity issues
- Howto Setup Linux as router for ppp dial up (PSTN/ISDN) connections