Conditional DNS forwarding with named on Linux

Posted on 2010-01-03
Last Modified: 2012-05-08

I have a Centos 5.2 server which runs named for DNS resolution - it doesn't hold any information of its own, and just forwards all requests. From the named.conf:

options {
        forwarders {;; };

All other lines in named.conf are left as default.

I want to change the configuration so requests for anything under get passed to, while requests for any other address go to or

How can I configure the DNS on this server to do this?
Question by:DrStalker
    1 Comment
    LVL 6

    Accepted Solution

          In /etc/named.conf file, you can have global attributes and domain specific attributes.

    For domain specific attributes, use the following syntax.

    zone "" {
    type forward;
    forwarders {; };

    Then, use this as a global attribute.

    options {
            forwarders {;; };

    Please try this and give your feedback.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Suggested Solutions

    This article explains how a domain name may be inadvertently appended to all DNS queries. This exhibits as described below. (CODE)And / Or: (CODE) Cause This issue can occur in either of these two scenarios. EITHER 1. A Primary DNS S…
    I wrote this article to explain some important DNS concepts that should be known to avoid some typical configuration errors I often see in forums. I assume that what is described here is the typical behavior of Microsoft DNS client. I don't know …
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    760 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

    7 Experts available now in Live!

    Get 1:1 Help Now