Solved

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

Posted on 2011-02-17
4
382 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
Comment Utility
on domain i would use nslookup

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

Accepted Solution

by:
jeremycrussell earned 200 total points
Comment Utility
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
Comment Utility
try dnsubound
0
 

Author Closing Comment

by:rgbcof
Comment Utility
Very nice jeremycrussell.  Thanks.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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…

772 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

15 Experts available now in Live!

Get 1:1 Help Now