?
Solved

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

Posted on 2011-02-17
4
Medium Priority
?
403 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 200 total points
ID: 34921569
on domain i would use nslookup

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

Accepted Solution

by:
jeremycrussell earned 800 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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…
Suggested Courses
Course of the Month14 days, 9 hours left to enroll

840 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