Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm creating a dns server for a local network, and I need to do redirection based on the domains. Also, i'm fairly new to DNS.

I have to redirect all "ia.in" domains to a different local nameserver (172.31.1.30) which already contains their entries, and all others to any external nameserver (currently i'm trying to use Google's 8.8.4.4).

I tried using forwarders, and they worked, but the DNS server is an old, slow system, so I thought it'd be better if I could use NS entries, so that the forwarding load mainly falls onto the client's side.

With the NS entries, it gives a servfail when I try to ping either any "ia.in" domain, or any external domain. Here are the relevant named.conf and zone file entries:

named.conf

zone "." IN {
    type master;
    file "out.redirect";
    allow-transfer { any; };
};

zone "ia.in" IN {
    type master;
    file "ia.zone";
    allow-transfer { any; };
//  The entries below worked
//  type forward;
//  forwarders { 172.31.1.30; };
};

out.redirect

$ORIGIN .
$TTL 1D
@       IN      SOA @ none. ( 0 1D 1H 1W 3H );
* IN NS 8.8.4.4

ia.zone

$ORIGIN ia.in.
$TTL 1D
@       IN      SOA @ none. ( 0 1D 1H 1W 3H );
ia.in IN NS 172.31.1.30

What should I change in my configuration so that this works?

share|improve this question
add comment

1 Answer

You can't do that. What you currently do is create new authoritative zones. It will redirect nothing nothere. Besides you probably shouldn't - DNS loads is probably negligible.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.