How to setup BIND on Fedora server behind a router

I need some sample zone files
I have a domain hosted by godaddy
Who is Participating?
Kerem ERSOYConnect With a Mentor PresidentCommented:
In fact what you would enter to go-daddy screen should include:

- At least 1 DNS record:
- At least one e-MAil Exchanger Record
- At least one IP address
- host records
- One catch all DNS phrase.

@            IN    NS
@            IN    MX  10

@            IN     A   230.233.201.x

www      IN  A   230.233.201.x

*              IN   A   230.233.201.x

This is all you need to go live. All go daddy servers are fictitious. Replace them with actual host names provided by godady alongwith your welcome e-mail.

Kerem ERSOYPresidentCommented:

First of all you need to enable Port 53 TCP and UDP access over your firewall.

If your named will be the primary and you'll have secondaries you'll need both ports.

When it comes to configuration. first of all check this file /etc/sysconfig/named. It should include a ROOTDIR= directive poniting to some direct1ry such as


Your config file named.conf is located under /var/named/chroot/etc. The first thing to do is to create a symbolic link to your etc:

ln -s /var/named/chroot/etc/named.conf named.conf

And you are ready to go the named.conf file will include some of these options:

Some comment:
 *  Acme Company Bind Configuration
/* ACL for  your secondaries and your corporate intranet addresses*/
acl acme {;
/* Update key for your secondaries */
key secondary-update. {
        algorithm hmac-md5;
        secret "xxxxxxxxxxxxxxxx";
/* SECONDARY Server key assignment (if any) */ 
server {
        keys { seondary-update. ; };
/* Some options */
options {
        version "[DNS]";           /* To fake the Version */
        directory "/var/named";
        dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
/* who could transfer AXFR zones (= full zones) */
        allow-transfer { acme; };
/* who could use recursive queries = queries to Internet others
   could only get our authoritative domains   */
        allow-recursion { acme; };
logging {
        category lame-servers { null; };
        category client { null; };
        channel default_syslog {
                syslog daemon;
                severity info; };
/* Zones */
zone "." in {
        type hint;
        file "named.root";
zone "" in {
        type master;
        file "named.loc";
zone " in {
        type master;
        file "";

Open in new window

Kerem ERSOYPresidentCommented:
named.root file will contain adresses for Universal TLD servers and you should have this file already.  

named.loc will be similar to this:
$TTL 86400      ; 1 day    IN SOA  your.domain.origin. user.your.domain.origin. (
                                1997032801 ; serial
                                10800      ; refresh (3 hours)
                                3600       ; retry (1 hour)
                                1209600    ; expire (2 weeks)
                                86400      ; minimum (1 day)
1                       PTR     localhost.
------------------------------------------------ will we something like this:
$TTL 7200       ; 2 hours
@               IN SOA (
                                2009052701 ; Serial
                                10800      ; refresh (3 hours)
                                3600       ; retry (1 hour)
                                1209600    ; expire (2 weeks)
                                7200       ; minimum (2 hours)
                IN        NS
                IN        NS
                IN        A       ip.addr
                IN        MX      20 mail
localhost       IN        A
ftp             IN        A       ip.addr.1
mail            IN        A       ip.addr.1
www             IN        A       ip.addr.1
*               IN        A       ip.addr.1

Open in new window

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

Kerem ERSOYPresidentCommented:
I am not sending you a reverse DNS zone since you won't be hosting your reverse DNS. But it is a good idea to let Godaddy add your hostnames to their reverse DNS zones to prevent later errors with SMTP delivery.

Notice the dot after names. Without it named will run the macro @ = domainname and append the domain after names not ending with a dot.

so if we omit the . after then the inal domain will be because of the macro expansion.

This is why we use only www before in a so that it will be completeted to

The SOA values used here are according to the RFC's. RFC-1912, RFC-2308
Kerem ERSOYPresidentCommented:
Here re some links for bind configuration.

This is a wonderful book on DNS and Bin  by O'reilly
Some excerpts from the previous editions of the above book:
WJBMAuthor Commented: will we something like this:
 This is what I was looking for:

www             IN        A       ip.addr.1
What does ip.addr.1 mean.
Is this the internal ipaddress of the server.
My router gets the public address of


Kerem ERSOYPresidentCommented:
Yeah it is ithe IP address of your in the format

www         IN  A

(121 is given  as an example to demonstrate the format. Replace with your actual IP octet)
WJBMAuthor Commented:
I now have a much better understanding of where to place entries.

I have now implemented and wil be running tests.
So far so good

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.