Solved

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

Posted on 2011-02-17
4
388 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Retreiving column names in Windows but not in Unix 11 76
linux 13 109
Migrating a Linux server to VMware 3 112
check the file dates in unix 14 30
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…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.:

726 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