0

I'm trying to setup a bind9 server which can provide DNS lookups for both internal and external IP's. I have access to an external name server which can provide IP details of external IP's and I have knowledge of the internal IP's.

E.g requests going to foo.bar.com (or any unknown domain) are forwarded to 8.8.8.8, whilst requests to internal.bar.com are resolved locally.

Any help at all very much appreciated.

1 Answers1

3

Setup your local configuration/domain and add in named.local.options forwarders like this:

forwarders {
            208.67.222.222; //OpenDNS Primary
            208.67.222.220; //OpenDNS Secondary
    };

Whenever your DNS server don't have the answer, it will forward the request to those servers.

Nabil Bourenane
  • 755
  • 4
  • 11
  • Basically I'm trying to spoof the response, eventually I used dnsmasq to do this properly, I'm slightly annoyed bind doesn't have a better way of doing this :( – user3229731 Apr 24 '15 at 15:08
  • Hello @user3229731 Can you be more explicit, please. – Nabil Bourenane Apr 24 '15 at 15:42
  • USERA requests spoof.google.com, I send them 10.0.0.1, USERA requests real.spoof.com, I forward the request to 8.8.8.8 (even though spoof.google.com exists on 8.8.8.8). Certain requests for a subdomain will get forwarded, others will not - even though they're part of the same domain. I wanted to continue using bind9, but dnsmasq was the only (obvious) way to accomplish this. – user3229731 Apr 24 '15 at 15:49