Geo DNS for 1 domain in view impossible?

Greg Choules gregchoules+bindusers at googlemail.com
Sun Dec 1 17:30:00 UTC 2024


Hi Dimitry.
Views are selected by any/all of "match-clients" and "match-destinations".
Once a view has been selected it is then completely responsible for
handling the query, so there is no automatic fall through to the next view.

However, in the "DE" view you could configure global forwarding/forward
only to the "default" view. You will need to be careful about IP addresses;
make sure that this server itself - the IP address it will use as a
query-source - does *not* appear in the "DE" ACL.

If a client matches the "DE" view but there is no zone matching the QNAME,
the server will forward back to itself, but since the new source address
does not match "DE" it will ignore that view and go to "default" instead.

I hope that helps.
Cheers, Greg

On Sun, 1 Dec 2024 at 17:13, Dimitry Bansikov <dimitry at bansikov.de> wrote:

> Hallo.
>
> I tried to create GeoIP DNS for one domain. So, its work great for
> example.com, but it does not work for default domains in default view. As
> example DNS server for domain example2.com does not return any records
> for clients from DE. Yes, i know, to get worked i need to add example2.com
> to view "DE" section too. But if i have a lot of domains its too complex.
> Is there a way to add Geo zones only in Geo view and  if zone not found we
> get zone from default view?
>
> acl "DE" {geoip country DE;};
> view "DE" {
>     match-clients { DE; };
>     zone "example.com" {type master; file
> "/etc/bind/geo/example.com_DE.db";};
> };
>
> view "default" {
>     zone "example.com" {type master; file "/etc/bind/db/example.com.db";};
>     zone "example2.com" {type master; file
> "/etc/bind/db/example2.com.db";};
>     ... lot of domains ...
> };
> --
> Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe
> from this list
>
> ISC funds the development of this software with paid support
> subscriptions. Contact us at https://www.isc.org/contact/ for more
> information.
>
>
> bind-users mailing list
> bind-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20241201/0b0c1c8f/attachment.htm>


More information about the bind-users mailing list