diff options
author | Stuart Wyatt <stuart@gogglespisano.com> | 2015-04-09 09:39:47 -0700 |
---|---|---|
committer | Stuart Wyatt <stuart@gogglespisano.com> | 2015-04-09 09:39:47 -0700 |
commit | 1bab1a2665febb7a9f69adccacda1e7dc92574ed (patch) | |
tree | a6817ccce8a11a60dfe2af1f13c59c47deafa03b /config/bind | |
parent | 52d9fc60c41d93242396976091deaa5ade61e4db (diff) | |
download | pfsense-packages-1bab1a2665febb7a9f69adccacda1e7dc92574ed.tar.gz pfsense-packages-1bab1a2665febb7a9f69adccacda1e7dc92574ed.tar.bz2 pfsense-packages-1bab1a2665febb7a9f69adccacda1e7dc92574ed.zip |
BIND - add support for IPv6 reverse zones
Add a supplemental checkbox to "Reverse Zone" which further qualifies the reverse zone as an IPv6 reverse zone.
The resulting zone name will be *.ipv6.arpa rather than *.ip-addr.arpa
This change was originally submitted by https://github.com/cuteredstorm/pfsense-packages/commit/2b4e8084a92c8e9936f1b2fdca8272d29217c20a for Bug #4553
Diffstat (limited to 'config/bind')
-rw-r--r-- | config/bind/bind.inc | 18 | ||||
-rw-r--r-- | config/bind/bind_zones.xml | 7 |
2 files changed, 23 insertions, 2 deletions
diff --git a/config/bind/bind.inc b/config/bind/bind.inc index 77f3a770..747fdc27 100644 --- a/config/bind/bind.inc +++ b/config/bind/bind.inc @@ -349,6 +349,7 @@ EOD; $zoneipslave = $zone['slaveip']; $zoneforwarders = $zone['forwarders']; $zonereverso = $zone['reverso']; + $zonereversv6o = $zone['reversv6o']; // Ensure zone view folder exists if (!(is_dir(CHROOT_LOCALBASE."/etc/namedb/$zonetype/$zoneview"))) { @@ -374,7 +375,11 @@ EOD; if ($zoneview == $viewname) { // Add zone name if ($zonereverso == "on") { - $bind_conf .= "\tzone \"$zonename.in-addr.arpa\" {\n"; + if ($zonereversv6o == "on") { + $bind_conf .= "\tzone \"$zonename.ip6.arpa\" {\n"; + } else { + $bind_conf .= "\tzone \"$zonename.in-addr.arpa\" {\n"; + } } else { $bind_conf .= "\tzone \"$zonename\" {\n"; } @@ -442,10 +447,15 @@ EOD; $zonenameserver = $zone['nameserver']; $zoneipns = $zone['ipns']; $zonereverso = $zone['reverso']; + $zonereversv6o = $zone['reversv6o']; $zone_conf = "\$TTL {$zonetll}\n;\n"; if ($zonereverso == "on") { - $zone_conf .= "\$ORIGIN {$zonename}.in-addr.arpa.\n\n"; + if ($zonereversv6o == "on") { + $zone_conf .= "\$ORIGIN {$zonename}.ip6.arpa.\n\n"; + } else { + $zone_conf .= "\$ORIGIN {$zonename}.in-addr.arpa.\n\n"; + } } else { $zone_conf .= "\$ORIGIN {$zonename}.\n\n"; } @@ -706,6 +716,7 @@ function bind_print_javascript_type_zone() document.iform.tll.disabled = 0; document.iform.nameserver.disabled = 0; document.iform.reverso.disabled = 0; + document.iform.reversv6o.disabled = 0; document.iform.forwarders.disabled = 1; document.iform.dnssec.disabled = 0; document.iform.backupkeys.disabled = 0; @@ -723,6 +734,7 @@ function bind_print_javascript_type_zone() document.iform.tll.disabled = 1; document.iform.nameserver.disabled = 1; document.iform.reverso.disabled = 0; + document.iform.reversv6o.disabled = 0; document.iform.forwarders.disabled = 1; document.iform.dnssec.disabled = 0; document.iform.backupkeys.disabled = 0; @@ -740,6 +752,7 @@ function bind_print_javascript_type_zone() document.iform.tll.disabled = 1; document.iform.nameserver.disabled = 1; document.iform.reverso.disabled = 1; + document.iform.reversv6o.disabled = 1; document.iform.forwarders.disabled = 0; document.iform.dnssec.disabled = 1; document.iform.backupkeys.disabled = 1; @@ -757,6 +770,7 @@ function bind_print_javascript_type_zone() document.iform.tll.disabled = 1; document.iform.nameserver.disabled = 0; document.iform.reverso.disabled = 1; + document.iform.reversv6o.disabled = 1; document.iform.forwarders.disabled = 1; document.iform.dnssec.disabled = 1; document.iform.backupkeys.disabled = 1; diff --git a/config/bind/bind_zones.xml b/config/bind/bind_zones.xml index a62c1aaf..a227aabd 100644 --- a/config/bind/bind_zones.xml +++ b/config/bind/bind_zones.xml @@ -165,6 +165,13 @@ <fieldname>reverso</fieldname> <description>Enable if this is a reverse zone.</description> <type>checkbox</type> + <enablefields>reversv6o</enablefields> + </field> + <field> + <fielddescr>IPv6 Reverse Zone</fielddescr> + <fieldname>reversv6o</fieldname> + <description>Enable if this is a IPv6 reverse zone. Reverse Zone must also be enabled.</description> + <type>checkbox</type> </field> <field> <fielddescr>Custom Option</fielddescr> |