Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The external DNS server for our domain "example.com" is provided by our ISP. We have mail, www, ftp machines hosted by another hosting company.
Now we have a machine on our LAN that is available on the internet (hostname is "members.example.com"). We have the external DNS setup correctly for "members.example.com" at our ISP.
However for internal users to get to "members.example.com" we now are running a private internal DNS server. It is on CentOS 5.1 (it is actually the same box as "members.example.com").
How do I configure the internal DNS server to:
1. resolve "members.example.com" to it's LAN address.
2. forward ALL other "example.com" requests to our ISP's DNS server.
3. forward ALL other DNS requests to our ISP's DNS server.
So the internal DNS server's sole purpose is to handle name requests for "members.example.com" and forward all other requests to the ISP nameserver.
I believe that if you have a cacheing nameserver already set up on your CentOS machine, all you need to do is to make it authoritative for the subdomain members.example.com, by providing a zone file to it which contains a SOA record for that subdomain (and an A record to specify the address).
For extra credit, you might be able to add your ISP's nameserver to the hints file that all cacheing nameservers load, so that they have a clue about how to begin resolving a name.
Thanks guys. It works now. That is actually the first setup I tried and it didn't work. Queries for "members.example.com" would time out. Queries for "www.example.com" and the others would work fine.
So I went with a setup for a zone file of "example.com" but then I had to duplicate the information for the other "example.com" hosts (www, ftp, mail). And that worked but I didn't like it because of the duplication.
After reading your posts I tried doing the setup for a zone of "members.example.com" again to avoid the duplication problem. It works now! I'm not sure why it didn't work the first time, but I think it may be because I had this line in the configuration that didn't work:
IN A 192.168.0.7
I excluded that line this time and it worked. So my final zone file looks like this:
$TTL 3h
@ IN SOA members.example.com. myemail.example.com. (
200805204 ; serial
2H ; refresh slaves
5M ; retry
1W ; expire
1M ; Negative TTL
)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.