Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

BIND v9 setup Name Server to point all requests for domains to ip address

Posted on 2008-10-09
10
Medium Priority
?
293 Views
Last Modified: 2012-05-05
Hi,

I have setup BIND v 9 on my Linux Red Hat Enterprise server and have several domain names i need to point to an IP address.
Can anyone help me with the config.
I have about 100 domain names that all requests for need to be resolved to an address on our network.


Kind Regards,

Daniel.
0
Comment
Question by:Daniel2040
[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
  • 5
  • 4
10 Comments
 
LVL 71

Expert Comment

by:Chris Dent
ID: 22679122

Hi Daniel,

You mean you need it to do:

nslookup name.com
> IP Address

If so, you will have to add an A record to each zone like one of these:

name.com.  IN A  <IPAddress>
Or
@  IN A  <IPAddress>
Or
IN A <IPAddress>

Chris
0
 
LVL 6

Expert Comment

by:RSLE
ID: 22679189
Are you asking for them all to point to the same IP or just for examples of how to add each?

To point them all to the same IP, you'll first have to enter them all into your zone file (I'm guessing named.conf) but point them all to the same file.

----
zone "example.com" { type master; file "db.global"; };
zone "example.net" { type master; file "db.global"; };
zone "example.org" { type master; file "db.global"; };
...
zone "example100.com" { type master; file "db.global"; };
----

Then you need to create said file (so db.global in my example) and rather than assign the IP to a specific domain, you use the @ symbol. thus...
"@       IN        A     192.168.100.101"

obviously changing the appropriate data  :-)
0
 

Author Comment

by:Daniel2040
ID: 22679318
Thanks,

so all the file named.conf needs to read is:

zone "domain.com" { type master; file "db.global"; };
zone "domain.net" { type master; file "db.global"; };
zone "domain.org" { type master; file "db.global"; };


Kind Regards,

Daniel.
0
Q2 2017 - Latest Malware & Internet Attacks

WatchGuard’s Threat Lab is a group of dedicated threat researchers committed to helping you stay ahead of the bad guys by providing in-depth analysis of the top security threats to your network.  Check out our latest Quarterly Internet Security Report!

 
LVL 6

Expert Comment

by:RSLE
ID: 22679380
well there's other data in that file like the BIND config options, but the lines posted are all you need to add to the named.conf for the domains.
0
 

Author Comment

by:Daniel2040
ID: 22679383
is it possible to have

zone "*" { type master; file "db.global"; };



Daniel.
0
 
LVL 6

Expert Comment

by:RSLE
ID: 22680030
you can do

zone "." { type master; file "db.global"; };

and then instead of using "@" use the * for the entry in the db.global there but this will make your nameserver respond with this single answer for ANYTHING that is queried against your nameserver... probably not a good thing.
0
 

Author Comment

by:Daniel2040
ID: 22710414
Thanks for all your help.

Where does the 'db.global' file go?
I have put it in the same directory as 'named.conf' but when i start the service it syas cannot find 'db.global'





Regards,

Daniel.
0
 
LVL 6

Expert Comment

by:RSLE
ID: 22710658
It should be relative to the 'directory "/path/to/namedb"' option.
0
 

Author Comment

by:Daniel2040
ID: 22710673
Thanks,

sorry for all the questions but what do i do for the NS and SOA records?

Currently the db.global file reads:

$TTL 86400
@       IN        A     81.145.63.83



Kind regards,

Daniel.



0
 
LVL 6

Accepted Solution

by:
RSLE earned 2000 total points
ID: 22710728

$TTL 86400
@       IN      SOA     pri.ns.yourdomain. hostmaster.yourdomain. (
                        2008101401      ; serial
                        7200            ; refresh
                        3600            ; retry
                        691200          ; expire
                        86400 )         ; ttl
 
        IN      NS      pri.ns.yourdomain.
        IN      NS      sec.ns.yourdomain.
 
@       IN      A       81.145.63.83

Open in new window

0

Featured Post

Q2 2017 - Latest Malware & Internet Attacks

WatchGuard’s Threat Lab is a group of dedicated threat researchers committed to helping you stay ahead of the bad guys by providing in-depth analysis of the top security threats to your network.  Check out our latest Quarterly Internet Security Report!

Question has a verified solution.

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

If you have a multi-homed DNS setup in windows, you can have issues with connectivity to the server that hosts the DNS services (or even member servers of your domain if this same DNS server is a DC). This is because windows registers all of its IPs…
There have been a lot of times when we have seen the need to enter a large number of DNS entries in a forward lookup zone. The standard procedure would be to launch the DNS Manager console, create the Zone and start adding new hosts using the New…
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…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

618 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