Solved

Bind DNS

Posted on 2014-10-16
8
174 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 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 7

Expert Comment

by:Stampel
Comment Utility
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:zen shaw
Comment Utility
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
Comment Utility
+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
Comment Utility
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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Online collaboration can help businesses be more efficient, help employees grow their skills and foster a team environment.
As a long-time IT Professional, the most important skill I have developed and consider to be my most valuable tool is Effective Troubleshooting. Step through my problem-solving procedure in this 10-step guide adapted from The Universal Troubleshooti…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 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

10 Experts available now in Live!

Get 1:1 Help Now