Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Bind DNS

Posted on 2014-10-16
8
Medium Priority
?
184 Views
Last Modified: 2014-11-11
Hi,

I have used windows DNS previously, not much familiary with Bind DNS, i would like to a static entry into Bind DNS , to point it to internal IP address of an external machine, i can ssh to that machine at the moment as there is default route in our router, so networking is setup properly.

can somebody please tell me a sample ,how to add an A record and how to add an CNAME in bind ?

thanks
0
Comment
Question by:zen shaw
  • 4
  • 2
  • 2
8 Comments
 
LVL 23

Accepted Solution

by:
savone earned 2000 total points
ID: 40383996
Edit the zone file and add the record. Simple.

hostname.domain.com.         IN      A       192.168.1.1

Same goes for a CNAME record:

alias.domain.com.     IN    CNAME    hostname.domain.com.


Depending on how you installed BIND the zone file can be located in different places.  They are placed in /var/named/ by default, but if you installed bind-chroot, they will be in /var/named/chroot/var/named/.

Good luck.
0
 
LVL 7

Expert Comment

by:Stampel
ID: 40384077
Here is a full linux zone like the one i use.
You can change TTL if you need faster react.
Dont forget to increment 2014101600 when u change a value.


$TTL 86400
@      IN SOA yourfulldomainname.com. tech.your.full.domain.name.com. (2014101600 86400 3600 3600000 86400)
                         IN NS     dns1.registrar.net.
                         IN NS     dns2.registrar.net.
                         IN MX 1   mx1.mailserver.net.
                         IN MX 5   mx2.mailserver.net.
                         IN A      13.18.33.2      #### Your IP Address here
www                      IN CNAME  yourfulldomainname.com.
0
 

Author Comment

by:zen shaw
ID: 40385690
i think here, they have host files, which update zone file.

so i don't know really, how to figure out, which host file to update ..so that it can update zone file.
0
New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

 
LVL 7

Expert Comment

by:Stampel
ID: 40386904
you can retrieve the actual zone file using dig utility/command as follow :)
Btw dig is part of bind-utils package.

dig +nocmd yourfulldomainname.com any +multiline +noall +answer
0
 

Author Comment

by:zen shaw
ID: 40401742
Hi Stampel,

sounds good, can you please explain me this command , what does each argument do ?

looks, it's working.
0
 
LVL 7

Expert Comment

by:Stampel
ID: 40401943
+nocmd option is to remove useless info about dig itself like version ...
any cause you want everything for full zone
+multiline option will show records in a verbose multi-line format
+noall to turn off all by default and specify what you want
+answer, to get the answer. I dont know why but you could turn off the ansmer by using the +[no]answer option

You can get more information on the net on howto use dig for example here
https://www.madboa.com/geek/dig/
0
 
LVL 23

Expert Comment

by:savone
ID: 40401957
You can't update a zone file with a host file on a system.  That would be very insecure.  You need to have admin/root access to the server that is authoritative for the zone and edit that zone file.
0
 
LVL 7

Expert Comment

by:Stampel
ID: 40401974
Just ssh to the DNS that host the zone.
Edit /etc/named.conf file, you will find there your zone file name like this.

zone "foobar.com" in { type master; notify yes; allow-transfer  { common-allow-transfer; }; file "my-foobarzone-file.com"; };

You can then locate the file with find or locate. Usually this place would be /var/named/you-zone-file.txt /var/named/chroot/var/named/you-zone-file.txt
Edit the file with your change and increment the serial number (2014101600) , then reload DNS with command "rndc reload" or restart DNS with "service named restart" or "/etc/init.d/named restart"

Of course you need  admin/root
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

This month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
If you're a modern-day technology professional, you may be wondering if certifications are really necessary. They are. Here's why.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

824 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