Use the zone option 'in-view "viewname”;'
view "all-zones" { match-clients { none; }; zone "example.com" { type master; file "/etc/bind/db/example.com.db”; }; zone "example2.com” { type master; file "/etc/bind/db/example2.com.db”; }; }; acl "DE" {geoip country DE;}; view “DE” { match-clients { DE; }; zone "example.com” { type master; file "/etc/bind/geo/example.com_DE.db”; }; zone "example2.com" { in-view “all-zones”; }; ... }; view "default” { zone “example.com" { in-view “all-zones”; }; zone "example2.com" { in-view “all-zones”; }; ... }; > On 2 Dec 2024, at 04:13, Dimitry Bansikov <dimi...@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@lists.isc.org > https://lists.isc.org/mailman/listinfo/bind-users -- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: ma...@isc.org -- 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@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users