Difference between revisions of "CentOS 7.x Bind split DNS configuration"
(Created page with "<yambe:breadcrumb>CentOS_7.x_DNS_configuration|CentOS 7.x DNS configuration</yambe:breadcrumb> =CentOS 7.x Bind split DNS configuration= Split view configuration allows diffe...") |
m |
||
Line 1: | Line 1: | ||
<yambe:breadcrumb>CentOS_7.x_DNS_configuration| | <yambe:breadcrumb self="Bind split DNS configuration">CentOS_7.x_DNS_configuration|DNS configuration</yambe:breadcrumb> | ||
=CentOS 7.x Bind split DNS configuration= | =CentOS 7.x Bind split DNS configuration= | ||
Line 41: | Line 41: | ||
<yambe:breadcrumb>CentOS_7.x_DNS_configuration| | |||
<yambe:breadcrumb self="Bind split DNS configuration">CentOS_7.x_DNS_configuration|DNS configuration</yambe:breadcrumb> |
Revision as of 16:29, 28 January 2019
<yambe:breadcrumb self="Bind split DNS configuration">CentOS_7.x_DNS_configuration|DNS configuration</yambe:breadcrumb>
CentOS 7.x Bind split DNS configuration
Split view configuration allows different DNS clients to get different response for same DNS query. Hence it is possible to setup both external and internal DNS which resolve to public IP or private IP based on the client who is querying. Other option is to resolve differently for different internal users as well.
To obtain split-view configuration add two or more view section as follows:
view "<view-name>" { //match-clients filter //zone definitions };
in /etc/named.conf.
In each view you need
view "internal" { match-clients {127.0.0.1/32; 10.0.0.0/8; 172.16.0.0/12; 192.168.0.0/16; }; //corresponding zones };
match-clients {}; directive to match clients.
Last view can have any; in match-clients for catch-all such as:
view "external" { match-clients {any; }; //corresponding zones };
Note that if views are used all zones must be inside view.. Zone declaration outside view{} is not allowed.
Use named-checkconf and named-checkzone as usual for checking configuration before reload/restart.
Refer:
- https://www.slashroot.in/how-to-configure-split-horizon-dns-in-bind
- https://www.cyberciti.biz/faq/linux-unix-bind9-named-configure-views/
<yambe:breadcrumb self="Bind split DNS configuration">CentOS_7.x_DNS_configuration|DNS configuration</yambe:breadcrumb>