|
| 1 | +bind: |
| 2 | + configured_acls: # We have an internal ACL restricted to our |
| 3 | + internal: # private IP range. |
| 4 | + - 10.0.0.0/8 # In this case, an ACL for external isn't needed |
| 5 | + # as that view will be matched by 'any'. |
| 6 | + |
| 7 | + # Notice that there is no 'configured_zones' at this indentation level. |
| 8 | + # That is because when you are using views, the bind service forces all zones to be served via a view. |
| 9 | + # |
| 10 | + # Also note - any other zones defined in any other conf files will either need to be commented out, or |
| 11 | + # also served via a view using a file include. If you have other zones being served outside of a view, bind will |
| 12 | + # fail to start and give you an error message indicating this. You will likely find these externally-defined zones |
| 13 | + # in /etc/named.conf and /etc/named.conf.local |
| 14 | + |
| 15 | + configured_views: |
| 16 | + external: # A view called 'external' to match anything except the 'internal' ACL. |
| 17 | + match_clients: |
| 18 | + - any # This will match anything, including the public internet. |
| 19 | + configured_zones: |
| 20 | + mydomain.com: # Notice that this value matches on both views. |
| 21 | + type: master |
| 22 | + file: external.mydomain.com.txt # Specify the file to be used, which must match the file |
| 23 | + recursion: yes # name of the zone below under available_zones. |
| 24 | + # This filename also must match the corresponding zone name |
| 25 | + # without the .txt extension (and be sure to use .txt as the extension). |
| 26 | + notify: False |
| 27 | + dnssec: False |
| 28 | + |
| 29 | + internal: # The 'internal' view that is restricted to the 'internal' ACL. |
| 30 | + match_clients: |
| 31 | + - internal # This will match only our ACL named 'internal'. |
| 32 | + configured_zones: |
| 33 | + mydomain.com: # Same as above - both views will serve the same zone. |
| 34 | + type: master |
| 35 | + file: internal.mydomain.com.txt # Different file - matches the internal zone below. |
| 36 | + # Again, this filename must match the corresponding zone name |
| 37 | + # without the .txt extension (and be sure to use .txt as the extension). |
| 38 | + recursion: yes |
| 39 | + notify: False |
| 40 | + dnssec: False |
| 41 | + |
| 42 | + available_zones: |
| 43 | + external.mydomain.com: # Beginning of the 'external' zone definition. |
| 44 | + file: external.mydomain.com.txt # The file in which to save this zone's record set - matches the file |
| 45 | + # specified in the 'external' view. |
| 46 | + |
| 47 | + soa: # Declare the SOA RRs for the zone |
| 48 | + ns: ns1.external.mydomain.com # Required |
| 49 | + contact: [email protected] # Required |
| 50 | + serial: auto # Alternatively, autoupdate serial on each change |
| 51 | + class: IN # Optional. Default: IN |
| 52 | + refresh: 8600 # Optional. Default: 12h |
| 53 | + retry: 900 # Optional. Default: 15m |
| 54 | + expiry: 86000 # Optional. Default: 2w |
| 55 | + nxdomain: 500 # Optional. Default: 1m |
| 56 | + ttl: 8600 # Optional. Not set by default |
| 57 | + records: # Records for the zone, grouped by type |
| 58 | + A: |
| 59 | + portal: 50.60.70.80 |
| 60 | + gateway: 50.60.70.81 |
| 61 | + directory: 50.60.70.82 |
| 62 | + ns1: 50.60.70.83 |
| 63 | + www: 50.60.70.84 |
| 64 | + NS: |
| 65 | + '@': |
| 66 | + - ns1 |
| 67 | + CNAME: |
| 68 | + login: portal.mydomain.com. |
| 69 | + dashboard: www.mydomain.com. |
| 70 | + |
| 71 | + internal.mydomain.com: # Beginning of the 'internal' zone definition. |
| 72 | + file: internal.mydomain.com.txt # The file in which to save this zone's record set - matches the file |
| 73 | + # specified in the 'internal' view. |
| 74 | + |
| 75 | + soa: # Declare the SOA RRs for the zone |
| 76 | + ns: ns1.mydomain.com # Required |
| 77 | + contact: [email protected] # Required |
| 78 | + serial: auto # Alternatively, autoupdate serial on each change |
| 79 | + class: IN # Optional. Default: IN |
| 80 | + refresh: 8600 # Optional. Default: 12h |
| 81 | + retry: 900 # Optional. Default: 15m |
| 82 | + expiry: 86000 # Optional. Default: 2w |
| 83 | + nxdomain: 500 # Optional. Default: 1m |
| 84 | + ttl: 8600 # Optional. Not set by default |
| 85 | + records: # Records for the zone, grouped by type |
| 86 | + A: |
| 87 | + portal: 10.0.0.10 # Here we serve all private IPs as opposed to the public IPs |
| 88 | + gateway: 10.0.0.11 # in the external zone. |
| 89 | + directory: 10.0.0.12 |
| 90 | + ns1: 10.0.0.13 |
| 91 | + www: 10.0.0.14 |
| 92 | + NS: |
| 93 | + '@': |
| 94 | + - ns1 |
| 95 | + CNAME: |
| 96 | + login: portal.mydomain.com. |
| 97 | + dashboard: www.mydomain.com. |
0 commit comments