Difference between revisions of "CentOS 7.x Bind split DNS configuration"
m |
m |
||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 7.x]] > [[CentOS 7.x DNS configuration|DNS]] > [[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. | 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. | ||
Line 42: | Line 41: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 7.x]] > [[CentOS 7.x DNS configuration|DNS]] > [[CentOS 7.x Bind split DNS configuration]] |
Latest revision as of 16:13, 28 August 2022
Home > CentOS > CentOS 7.x > DNS > 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/
Home > CentOS > CentOS 7.x > DNS > CentOS 7.x Bind split DNS configuration