0

I have a domain (example.com) that the hosts are split in several different networks/places. Most of these hosts are hosted in our office. What i am trying to do is configure a zone that resolves internally these hosts (eg1.example.com, eg2.example.com) that are hosted here and then redirect to other dns (like google 8.8.8.8) to solve the other hosts (*.example.com) that are hosted in other places.

Is it possible to archive it ?

Best regards,

1

Yes it is possible. I call it Split DNS.

https://en.wikipedia.org/wiki/Split-horizon_DNS

Doing it with Bind

http://www.cyberciti.biz/faq/linux-unix-bind9-named-configure-views/

0

If you want to partially override public DNS server entries, use the Bind9 "RPZ" feature. With this, you can partially overwrite the DNS answers and e.g. redirect them to you own entries. Example config:

a) enable RPZ in named.conf:

options {
  ...

  response-policy { zone "rpz-overrides"; };
}

zone "rpz-overrides" IN {
   type master;
   file "db.rpz-overrides";
};

b) Add the special zone file db.rpz-overrides in RPZ format:

@ IN SOA localhost. root.localhost.  (2 3H 1H 1W 1H)

IN NS localhost.

; overrides
examplehost.mydomainexample.com   A     10.1.2.3 
otherexample.mydomainexample.com  CNAME www.google.com.
nasty-ad-server.badproviderx.net  A     127.0.0.1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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