Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Bind DNS

Posted on 2014-10-16
8
Medium Priority
?
183 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
[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
  • 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
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.

 
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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

Postmortem reporting allow us to examine mistakes in a way that focuses on the situational aspects of a failure’s mechanism and the decision-making process of individuals proximate to the failure. Read our guide on how to handle IT post-mortem repor…
This month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
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…
Suggested Courses

722 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