From 6afbe7bd09a996a49abee197c321b16335f2d21a Mon Sep 17 00:00:00 2001 From: Marcello Coutinho Date: Mon, 7 Oct 2013 23:47:51 -0300 Subject: bind - First package files --- config/bind/bind.inc | 605 +++++++++++++++++++++++++++++++++++++++++++++ config/bind/bind.xml | 231 +++++++++++++++++ config/bind/bind_acls.xml | 138 +++++++++++ config/bind/bind_sync.xml | 130 ++++++++++ config/bind/bind_views.xml | 168 +++++++++++++ config/bind/bind_zones.xml | 382 ++++++++++++++++++++++++++++ config/bind/pkg_bind.inc | 11 + 7 files changed, 1665 insertions(+) create mode 100644 config/bind/bind.inc create mode 100644 config/bind/bind.xml create mode 100644 config/bind/bind_acls.xml create mode 100644 config/bind/bind_sync.xml create mode 100644 config/bind/bind_views.xml create mode 100644 config/bind/bind_zones.xml create mode 100644 config/bind/pkg_bind.inc diff --git a/config/bind/bind.inc b/config/bind/bind.inc new file mode 100644 index 00000000..65d3c4f7 --- /dev/null +++ b/config/bind/bind.inc @@ -0,0 +1,605 @@ +$bind_listenonv6 $bind_listenon"; + if (key_exists("ipv6allow",$config['system'])){ + $bind_conf .="\t\tlisten-on-v6 { $bind_listenonv6 };\n"; + } + $bind_conf .="\t\tlisten-on { $bind_listenon };\n"; + + #forwarder config + if ($bind_forwarder == on) + $bind_conf .="\t\tforwarders { $forwader_ips };\n"; + if ($bind_notify == on) + $bind_conf .="\t\tnotify yes;\n"; + if ($hide_version == on) + $bind_conf .="\t\tversion \"N/A\";\n"; + + $bind_conf .="\t\t$custom_options\n"; + $bind_conf .= "\t};\n\n"; + + if ($bind_logging == on){ +$bind_conf .= << + +on_type_zone_changed()\n"); +} + +# Carregar o campo com os dados da views +# ----------------------------------------------------------------------------- + +function get_bind_conf_items_list($data_group, $fieldname) { + global $config; + $res = ''; + if (is_array($config["installedpackages"][$data_group])){ + $conf = $config["installedpackages"][$data_group]["config"]; + if (is_array($conf)) + foreach($conf as $cf) $res[] = $cf[$fieldname]; + } + return $res; +} + +# Carregar o campo com os dados da views +# ----------------------------------------------------------------------------- + +function bind_views_before_form_dest($pkg,$data_group,$fieldname,$dest) { + + $destination_items = get_bind_conf_items_list($data_group,$fieldname); + $i=0; + if (is_array($pkg['fields']['field'])) + foreach($pkg['fields']['field'] as $field) { + # + if ($field['fieldname'] == $dest) { + $fld = &$pkg['fields']['field'][$i]; + if (is_array($destination_items)) + foreach($destination_items as $nmkey => $nm) + $fld['options']['option'][] = array('name'=>ucfirst(strtolower($nm)), 'value'=>strtolower($nm)); + } + $i++; + } +} + +# Analizador do serial da zona de dns +# ----------------------------------------------------------------------------- + +function get_bind_conf_serial($data_group, $fieldname) { + global $config; + $res = ''; + if (is_array($config["installedpackages"][$data_group])){ + $conf = $config["installedpackages"][$data_group]["config"]; + if (is_array($conf)) + foreach($conf as $cf) $res[] = $cf[$fieldname]; + } + return $res; +} + +# Carregar o campo com os dados da views +# ----------------------------------------------------------------------------- + +function bind_zona_before_form_dest($pkg,$data_group,$fieldname,$dest) { + + $destination_items = get_bind_conf_serial($data_group,$fieldname); + $i=0; + if (is_array($pkg['fields']['field'])) + foreach($pkg['fields']['field'] as $field) { + # + if ($field['fieldname'] == $dest) { + $fld = &$pkg['fields']['field'][$i]; + $fld['default_value'] = date("Y")."000000"; + #$fld['value'] = date("Ymdhms")."boa"; + } + $i++; + } +} +function bind_write_rcfile() { + $rc = array(); + $BIND_LOCALBASE = "/usr/local"; + $rc['file'] = 'named.sh'; + $rc['start'] = <</dev/null +sleep 2 +EOD; + $rc['restart'] = <</dev/null + sleep 3 + $BIND_LOCALBASE}/sbin/named -c /etc/namedb/named.conf -u bind + fi + +EOD; + conf_mount_rw(); + write_rcfile($rc); + conf_mount_ro(); +} + +function create_log_file(){ + mwexec("touch /var/log/named.log"); + mwexec("chown bind:bind /var/log/named.log"); + mwexec("chmod 755 /var/log/named.log"); +} + +function delete_log_file(){ + mwexec("rm /var/log/named.log"); +} +/* Uses XMLRPC to synchronize the changes to a remote node */ +function bind_sync_on_changes() { + global $config, $g; + if (is_array($config['installedpackages']['bind']['config'])){ + $bind_sync=$config['installedpackages']['bind']['config'][0]; + $synconchanges = $bind_sync['synconchanges']; + $synctimeout = $bind_sync['synctimeout']; + switch ($synconchanges){ + case "manual": + if (is_array($bind_sync[row])){ + $rs=$bind_sync[row]; + } + else{ + log_error("[bind] xmlrpc sync is enabled but there is no hosts to push on bind config."); + return; + } + break; + case "auto": + if (is_array($config['installedpackages']['carpsettings']) && is_array($config['installedpackages']['carpsettings']['config'])){ + $system_carp=$config['installedpackages']['carpsettings']['config'][0]; + $rs[0]['ipaddress']=$system_carp['synchronizetoip']; + $rs[0]['username']=$system_carp['username']; + $rs[0]['password']=$system_carp['password']; + } + else{ + log_error("[bind] xmlrpc sync is enabled but there is no system backup hosts to push bind config."); + return; + } + break; + default: + return; + break; + } + if (is_array($rs)){ + log_error("[bind] xmlrpc sync is starting."); + foreach($rs as $sh){ + $sync_to_ip = $sh['ipaddress']; + $password = $sh['password']; + if($sh['username']) + $username = $sh['username']; + else + $username = 'admin'; + if($password && $sync_to_ip) + bind_do_xmlrpc_sync($sync_to_ip, $username, $password,$synctimeout); + } + log_error("[bind] xmlrpc sync is ending."); + } + } +} +/* Do the actual XMLRPC sync */ +function bind_do_xmlrpc_sync($sync_to_ip, $username, $password, $synctimeout) { + global $config, $g; + + if(!$username) + return; + + if(!$password) + return; + + if(!$sync_to_ip) + return; + + if(!$synctimeout) + $synctimeout=25; + + + $xmlrpc_sync_neighbor = $sync_to_ip; + if($config['system']['webgui']['protocol'] != "") { + $synchronizetoip = $config['system']['webgui']['protocol']; + $synchronizetoip .= "://"; + } + $port = $config['system']['webgui']['port']; + /* if port is empty lets rely on the protocol selection */ + if($port == "") { + if($config['system']['webgui']['protocol'] == "http") + $port = "80"; + else + $port = "443"; + } + $synchronizetoip .= $sync_to_ip; + + /* xml will hold the sections to sync */ + $xml = array(); + $xml['bind'] = $config['installedpackages']['bind']; + $xml['bindacls'] = $config['installedpackages']['bindacls']; + $xml['bindviews'] = $config['installedpackages']['bindviews']; + $xml['bindzone'] = $config['installedpackages']['bindzone']; + /* assemble xmlrpc payload */ + $params = array( + XML_RPC_encode($password), + XML_RPC_encode($xml) + ); + + /* set a few variables needed for sync code borrowed from filter.inc */ + $url = $synchronizetoip; + log_error("[bind] Beginning bind XMLRPC sync to {$url}:{$port}."); + $method = 'pfsense.merge_installedpackages_section_xmlrpc'; + $msg = new XML_RPC_Message($method, $params); + $cli = new XML_RPC_Client('/xmlrpc.php', $url, $port); + $cli->setCredentials($username, $password); + if($g['debug']) + $cli->setDebug(1); + /* send our XMLRPC message and timeout after defined sync timeout value*/ + $resp = $cli->send($msg, $synctimeout); + if(!$resp) { + $error = "A communications error occurred while attempting bind XMLRPC sync with {$url}:{$port}."; + log_error($error); + file_notice("sync_settings", $error, "bind Settings Sync", ""); + } elseif($resp->faultCode()) { + $cli->setDebug(1); + $resp = $cli->send($msg, $synctimeout); + $error = "An error code was received while attempting bind XMLRPC sync with {$url}:{$port} - Code " . $resp->faultCode() . ": " . $resp->faultString(); + log_error($error); + file_notice("sync_settings", $error, "bind Settings Sync", ""); + } else { + log_error("[bind] XMLRPC sync successfully completed with {$url}:{$port}."); + } + + /* tell bind to reload our settings on the destination sync host. */ + $method = 'pfsense.exec_php'; + $execcmd = "require_once('/usr/local/pkg/bind.inc');\n"; + $execcmd .= "bind_sync('yes');"; + /* assemble xmlrpc payload */ + $params = array( + XML_RPC_encode($password), + XML_RPC_encode($execcmd) + ); + + log_error("[bind] XMLRPC reload data {$url}:{$port}."); + $msg = new XML_RPC_Message($method, $params); + $cli = new XML_RPC_Client('/xmlrpc.php', $url, $port); + $cli->setCredentials($username, $password); + $resp = $cli->send($msg, $synctimeout); + if(!$resp) { + $error = "A communications error occurred while attempting bind XMLRPC sync with {$url}:{$port} (pfsense.exec_php)."; + log_error($error); + file_notice("sync_settings", $error, "Bind Settings Sync", ""); + } elseif($resp->faultCode()) { + $cli->setDebug(1); + $resp = $cli->send($msg, $synctimeout); + $error = "[Bind] An error code was received while attempting bind XMLRPC sync with {$url}:{$port} - Code " . $resp->faultCode() . ": " . $resp->faultString(); + log_error($error); + file_notice("sync_settings", $error, "bind Settings Sync", ""); + } else { + log_error("Bind XMLRPC reload data success with {$url}:{$port} (pfsense.exec_php)."); + } + +} +?> diff --git a/config/bind/bind.xml b/config/bind/bind.xml new file mode 100644 index 00000000..4e0c4326 --- /dev/null +++ b/config/bind/bind.xml @@ -0,0 +1,231 @@ + + + + + + . + All rights reserved. + */ +/* ========================================================================== */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + ]]> + + + Describe your package here + Describe your package requirements here + Currently there are no FAQ items provided. + bind + 1.0 + Bind: Domain Named Settings + /usr/local/pkg/bind.inc + + Bind Server + Modify Bind settings +
Services
+ /pkg_edit.php?xml=bind.xml +
+ + named + named.sh + named + Domain Name Service + + + + Settings + /pkg_edit.php?xml=bind.xml + + + + ACLs + /pkg.php?xml=bind_acls.xml + + + Views + /pkg.php?xml=bind_views.xml + + + Zones + /pkg.php?xml=bind_zones.xml + + + Sync + /pkg_edit.php?xml=bind_sync.xml + + + + + + /usr/local/pkg/ + 0755 + http://www.useb.org.br/packages/config/bind/bind.xml + + + /usr/local/pkg/ + 0755 + http://www.useb.org.br/packages/config/bind/bind_views.xml + + + /usr/local/pkg/ + 0755 + http://www.pfsense.org/packages/config/bind/bind_zones.xml + + + /usr/local/pkg/ + 0755 + http://www.pfsense.org/packages/config/bind/bind_acls.xml + + + /usr/local/pkg/ + 0755 + http://www.pfsense.org/packages/config/bind/bind.inc + + + /usr/local/pkg/ + 0755 + http://www.pfsense.org/packages/config/bind/bind_sync.xml + + + /usr/local/www/shortcuts/ + 0755 + http://www.pfsense.org/packages/config/bind/pkg_bind.inc + + + + Enable Bind + enable_bind + Enable DNS Bind on Server. + checkbox + + + + Enable logging + bind_logging + Enable Bind logs, /var/log/named.log + checkbox + + + Enable Notify + bind_notify + Update imediaty slave zone + checkbox + + + Hide Version + bind_hide_version + Hide the version of BIND, this prevents discover the version of our servers, use any exploit that exploits a vulnerability in Bind. + checkbox + + + Limitar Memory RAM + bind_ram_limite + Limits the use of RAM for the DNS when much use does not exhaust the resources of the machine, recommend 256M + input + 80 + 256M + + + listtopic + Listen on Interfaces + temp01 + + + Listen-on + listenon + Enable Named to listen on + interfaces_selection + + + + + + listtopic + Forwarder Config + temp01 + + + Forwarder + bind_forwarder + Forwardes enable DNS Bind on Server. + checkbox + bind_forwader_ips + + + Forwarder IPs + bind_forwader_ips + Paste here ips do forwarder. Separate by semi-colons (;). [Applies only to Forwarder mode] + input + 80 + + + listtopic + Custon Options + temp01 + + + Custom Options + bind_custom_options + + They'll be added to the configuration. They need to be named.conf native options.]]> + + textarea + 65 + 5 + base64 + + + + + + bind_views_before_form_dest(&$pkg,"bindacls","name","listenonv6"); + bind_views_before_form_dest(&$pkg,"bindacls","name","listenon"); + + + + + + + bind_sync(); + + + bind_write_rcfile(); + create_log_file(); + + + delete_log_file(); + + +
diff --git a/config/bind/bind_acls.xml b/config/bind/bind_acls.xml new file mode 100644 index 00000000..b8d10158 --- /dev/null +++ b/config/bind/bind_acls.xml @@ -0,0 +1,138 @@ + + + + + + . + All rights reserved. + */ +/* ========================================================================== */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + ]]> + + Describe your package here + Describe your package requirements here + Currently there are no FAQ items provided. + bindacls + 0.1.0 + Bind: ACLs Settings + /usr/local/pkg/bind.inc + + Bind Server + +
Services
+ bind.xml +
+ + + Settings + /pkg_edit.php?xml=bind.xml + + + ACLs + /pkg.php?xml=bind_acls.xml + + + + Views + /pkg.php?xml=bind_views.xml + + + Zones + /pkg.php?xml=bind_zones.xml + + + Sync + /pkg_edit.php?xml=bind_sync.xml + + + ['installedpackages']['bindacls']['config'] + + + ACL + name + + + Description + description + + on + + + + + ACL Name + name + Enter name ACL. + input + + + + Description + description + Enter the description for this ACL. + input + + + Enter IP or range bloc network. + Leave blank to allow All + none + rowhelper + + + Value + value + input + 20 + + + Description + description + input + 20 + + + + + + + + + + bind_sync(); + +
diff --git a/config/bind/bind_sync.xml b/config/bind/bind_sync.xml new file mode 100644 index 00000000..7fde2eb5 --- /dev/null +++ b/config/bind/bind_sync.xml @@ -0,0 +1,130 @@ + + + + + + + + Describe your package here + Describe your package requirements here + Currently there are no FAQ items provided. + bindsync + 1.0 + Bind: XMLRPC Sync + /usr/local/pkg/bind.inc + + + Settings + /pkg_edit.php?xml=bind.xml + + + ACLs + /pkg.php?xml=bind_acls.xml + + + Views + /pkg.php?xml=bind_views.xml + + + Zones + /pkg.php?xml=bind_zones.xml + + + Sync + /pkg.php?xml=bind_sync.xml + + + + + + XMLRPC Sync + listtopic + + + Automatically sync bind configuration changes + synconchanges + Select a sync method for bind. + select + + auto + + + + + + + + Sync timeout + synctimeout + Select sync max wait time + select + + 25 + + + + + + + + + + Remote Server + none + rowhelper + + + IP Address + ipaddress + IP Address of remote server + input + 20 + + + Password + password + Password for remote server. + password + 20 + + + + + + + + + diff --git a/config/bind/bind_views.xml b/config/bind/bind_views.xml new file mode 100644 index 00000000..2ff19c85 --- /dev/null +++ b/config/bind/bind_views.xml @@ -0,0 +1,168 @@ + + + + + + . + All rights reserved. + */ +/* ========================================================================== */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + ]]> + + Describe your package here + Describe your package requirements here + Currently there are no FAQ items provided. + bindviews + 0.1.0 + Bind: Views Settings + /usr/local/pkg/bind.inc + + + Bind Server + +
Services
+ bind.xml +
+ + + Settings + /pkg_edit.php?xml=bind.xml + + + ACLs + /pkg.php?xml=bind_acls.xml + + + Views + /pkg.php?xml=bind_views.xml + + + + Zones + /pkg.php?xml=bind_zones.xml + + + Sync + /pkg_edit.php?xml=bind_sync.xml + + + + ['installedpackages']['bindviews']['config'] + + + View + name + + + Description + description + + on + + + + + View Name + name + Enter the name of the View. + input + + + + Description + description + Enter a description of the View. + input + + + Recursion + recursion + A recursive query occurs when your DNS server is queried for a domain that it currently knows nothing about, in which case it will try to resolve the given host by performing further queries (eg by starting at the root servers and working out, or by simply passing the request to yet another DNS server). + select + + + + + + + Match-clients + match-clients + If either or both of match-clients are missing they default to any (all hosts match). The match-clients statement defines the address_match_list for the source IP address of the incoming messages. + select_source + + name + name + + 03 + + + Allow-recursion + allow-recursion + For example, if you have one DNS server serving your local network, you may want all of your local computers to use your DNS server. + select_source + + name + name + + 03 + + + listtopic + Custom Views + temp + + + Custom Options + bind_custom_options + You can put your own custom options here, separated by semi-colons (;). + textarea + 65 + 5 + + + + bind_views_before_form_dest(&$pkg,"bindacls","name","match-clients"); + bind_views_before_form_dest(&$pkg,"bindacls","name","allow-recursion"); + + + + + bind_sync(); + +
diff --git a/config/bind/bind_zones.xml b/config/bind/bind_zones.xml new file mode 100644 index 00000000..577b6cad --- /dev/null +++ b/config/bind/bind_zones.xml @@ -0,0 +1,382 @@ + + + + + + . + All rights reserved. + */ +/* ========================================================================== */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + ]]> + + Describe your package here + Describe your package requirements here + Currently there are no FAQ items provided. + bindzone + none + Bind: Zones Settings + /usr/local/pkg/bind.inc + + + Bind Server + +
Services
+ bind.xml +
+ + + Settings + /pkg_edit.php?xml=bind.xml + + + ACLs + /pkg.php?xml=bind_acls.xml + + + Views + /pkg.php?xml=bind_views.xml + + + Zones + /pkg.php?xml=bind_zones.xml&id=0 + + + + Sync + /pkg_edit.php?xml=bind_sync.xml + + + + ['installedpackages']['bindzone']['config'] + + + Zones Name + name + + + Zonas Type + type + + + View Name + view + + + Description + description + + on + + + + + listtopic + Domain Zone Configuration + temp01 + + + Zone Name: + name + Enter the name for zone (ex:exemple.com.br) + input + + + + Zonas Type + type + Select the type that zone to Master Primary DNS, Secondary DNS to select Slave. + select + + + + + on_type_zone_changed() + + + + View + view + + select_source + + name + name + + + Zone Reverse + reverso + Enable this if the zone is reverse. + checkbox + + + Custon Option + custon + You can put your own custom options here, separated by semi-colons (;). + textarea + 65 + 3 + + + Description + description + Enter the description for this zone. + textarea + 65 + 3 + + + listtopic + Slave Zone Configuration + temp04 + + + IP Master Zone + slaveip + In which case the zone is slave, enter the IP address of the master DNS zone. + input + + + listtopic + Master Zone Configuration + temp03 + + + TLL + tll + Default expiration time of all resource records without their own TTL value + input + + + Name Server + nameserver + Enter ns.example.com is a nameserver for example.com + input + + + IP Name Server + ipns + Enter address ip for nameserver + input + + + Mail Admin Zone + mail + Enter mail admin zone, is . not @ + input + + + Serial + serial + Parsed value for the slave to update the DNS Zone + input + + + Refresh + refresh + Slave refresh (1 day) + input + 1d + + + Retry + retry + Slave retry time in case of a problem (2 hours) + input + 2h + + + Expire + expire + Slave expiration time (4 weeks) + input + 4w + + + Minimum + minimum + Maximum caching time in case of failed lookups (1 hour) + input + 1h + + + Allow-update + allowupdate + + select_source + + name + name + + 03 + + + Allow-query + allowquery + Allow-query defines an match list of IP address(es) which are allowed to issue queries to the server. + select_source + + name + name + + 03 + + + Allow-transfer + allowtransfer + Allow-transfer defines a match list eg IP address(es) that are allowed to transfer (copy) the zone information from the server (master or slave for the zone). While on its face this may seem an excessively friendly default, DNS data is essentially public (that's why its there) and the bad guys can get all of it anyway. However if the thought of anyone being able to transfer your precious zone file is repugnant, or (and this is far more significant) you are concerned about possible DoS attack initiated by XFER requests, then use the following policy. + select_source + + name + name + + 03 + + + listtopic + Hosts Configuration Zone Domain + temp02 + + + Enter the desired host, "Host Name" is the name of the Host: www or pop, "Host Type" simple kind host, "Value" in case the MX priority, "CNAME or IP address" is the destination host. + none + rowhelper + + + Host Name + hostname + Enter the Host Name (ex: www) + input + 20 + + + Host Type + hosttype + Select Type Host + select + + + + + + + + + + + + + + + Value + hostvalue + MX 10 or 20 + input + 1 + + + Ip Address or CNAME destination + hostdst + Enter the IP address or CNAME destination for Domain (ex: 10.31.11.1 or mail.example.com) + input + 20 + + + + + + bind_print_javascript_type_zone2(); + + + bind_print_javascript_type_zone(); + + + bind_views_before_form_dest(&$pkg,"bindacls","name","allowtransfer"); + bind_views_before_form_dest(&$pkg,"bindacls","name","allowquery"); + bind_views_before_form_dest(&$pkg,"bindacls","name","allowupdate"); + bind_views_before_form_dest(&$pkg,"bindviews","name","view"); + bind_zona_before_form_dest(&$pkg,"bindzone","name","serial"); + + + $_POST['serial']=$_POST['serial']+1; + + + bind_sync(); + + + bind_sync(); + +
diff --git a/config/bind/pkg_bind.inc b/config/bind/pkg_bind.inc new file mode 100644 index 00000000..8c79c900 --- /dev/null +++ b/config/bind/pkg_bind.inc @@ -0,0 +1,11 @@ + -- cgit v1.2.3