Solved

freebsd, how to set and get dns name stored in the system.

Posted on 2011-02-17
4
383 Views
Last Modified: 2016-02-10
How do I set dns name and get dns name not just of itself but others as well.
0
Comment
Question by:rgbcof
4 Comments
 
LVL 14

Assisted Solution

by:JAN PAKULA
JAN PAKULA earned 50 total points
ID: 34921569
on domain i would use nslookup

http://www.computerhope.com/nslookup.htm
0
 
LVL 9

Accepted Solution

by:
jeremycrussell earned 200 total points
ID: 34921646
To configure a freebsd and linux box to use DNS, you'll edit two files.

/etc/nsswitch.conf
/etc/resolv.conf

look for the "hosts: " line in /etc/nsswitch.conf make sure it uses files and dns.

ie:
-------<snip>----------
hosts:      files dns
-------<snip>----------

Then in /etc/resolv.conf you'll setup your DNS servers and search domains.

nameserver ip.to.name.server
nameserver ip.to.other.nameserver
search yourdomain.com otherdomain.com


To create a DNS entry for your machine, its a little more involved.  It all depends if you are hosting a local domain, on a local server, or if you have a registered domain somewhere.

To set up a name for your server you'll edit the /etc/hosts file for one.

You'll have a line with the IP of your machine and its name... usually followed by the fqdn, if you want to configure that.  For example.

ip.to.your.machine              yourhostname     yourhostname.yourdomain.com


You can also set the machines hostname using the "hostname" command.

# hostname yourhostname

0
 
LVL 16

Expert Comment

by:santoshmotwani
ID: 34921672
try dnsubound
0
 

Author Closing Comment

by:rgbcof
ID: 34922246
Very nice jeremycrussell.  Thanks.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now