aboutsummaryrefslogtreecommitdiffstats
path: root/config/tinydns/new_zone_wizard.xml
diff options
context:
space:
mode:
authorBill Marquette <bill.marquette@gmail.com>2009-02-06 19:18:00 -0600
committerBill Marquette <bill.marquette@gmail.com>2009-02-06 19:18:00 -0600
commit55eddd7accf2c5f9b0f52b22a010c4c4b7c130d1 (patch)
treeba4783bab1dd65f1ceef2dfac9fdbd515531d18b /config/tinydns/new_zone_wizard.xml
parent67780cc9d469288742aea5bc378c29a54edd5ec5 (diff)
downloadpfsense-packages-55eddd7accf2c5f9b0f52b22a010c4c4b7c130d1.tar.gz
pfsense-packages-55eddd7accf2c5f9b0f52b22a010c4c4b7c130d1.tar.bz2
pfsense-packages-55eddd7accf2c5f9b0f52b22a010c4c4b7c130d1.zip
mv packages to config dir to match web layout
Diffstat (limited to 'config/tinydns/new_zone_wizard.xml')
-rw-r--r--config/tinydns/new_zone_wizard.xml226
1 files changed, 226 insertions, 0 deletions
diff --git a/config/tinydns/new_zone_wizard.xml b/config/tinydns/new_zone_wizard.xml
new file mode 100644
index 00000000..82d8d62b
--- /dev/null
+++ b/config/tinydns/new_zone_wizard.xml
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<pfsensewizard>
+<copyright>
+/* $Id$ */
+/*
+ new_zone_wizard.xml
+ part of pfSense (http://www.pfsense.org/)
+ Copyright (C) 2008 Scott Ullrich
+ 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.
+*/
+</copyright>
+<totalsteps>2</totalsteps>
+<step>
+ <id>1</id>
+ <title>pfSense New Zone Wizard</title>
+ <disableheader>true</disableheader>
+ <description>This wizard will guide you through the adding a new domain name service zone to TinyDNS.</description>
+ <fields>
+ <field>
+ <name>Next</name>
+ <type>submit</type>
+ </field>
+ </fields>
+ <stepbeforeformdisplay>
+ </stepbeforeformdisplay>
+</step>
+<step>
+ <id>2</id>
+ <title>Domain Name</title>
+ <description>On this screen you will define various options for your new DNS Zone</description>
+ <fields>
+ <field>
+ <name>Domain Name</name>
+ <type>input</type>
+ <unsetfield>yes</unsetfield>
+ <arraynum>0</arraynum>
+ <description>Enter the domain name for this zone (example: pfsense.org)</description>
+ </field>
+ <field>
+ <name>Primary Nameserver</name>
+ <type>listtopic</type>
+ </field>
+ <field>
+ <name>Primary Nameserver</name>
+ <type>input</type>
+ <unsetfield>yes</unsetfield>
+ <arraynum>0</arraynum>
+ <description>Enter the primary nameserver for this domain (example: ns.pfsense.org)</description>
+ </field>
+ <field>
+ <name>Secondary Nameserver</name>
+ <type>listtopic</type>
+ </field>
+ <field>
+ <name>Secondary Nameserver</name>
+ <type>input</type>
+ <arraynum>1</arraynum>
+ <description>Enter the secondary nameserver for this domain (example: ns2.pfsense.org)</description>
+ </field>
+ <field>
+ <name>Mail Exchanger (optional)</name>
+ <type>listtopic</type>
+ </field>
+ <field>
+ <name>Mail exchanger record hostname</name>
+ <type>input</type>
+ <arraynum>1</arraynum>
+ <description>Enter the hostname of your Mail exchanger (MX) - (example: exchange.pfsense.org)</description>
+ </field>
+ <field>
+ <name>Mail exchanger record IP address</name>
+ <type>input</type>
+ <arraynum>1</arraynum>
+ <description>Enter the IP address of your Mail exchanger (MX) - (example: 9.10.11.12)</description>
+ </field>
+ <field>
+ <name>First A record (optional)</name>
+ <type>listtopic</type>
+ </field>
+ <field>
+ <name>First A record hostname</name>
+ <type>input</type>
+ <arraynum>1</arraynum>
+ <description>Enter the first A records hostname (example: www.pfsense.org)</description>
+ </field>
+ <field>
+ <name>First A record IP address</name>
+ <type>input</type>
+ <arraynum>1</arraynum>
+ <description>Enter the first A records IP address (example: 1.2.3.4)</description>
+ </field>
+ <field>
+ <name>Secondary A record (optional)</name>
+ <type>listtopic</type>
+ </field>
+ <field>
+ <name>Second A record IP hostname</name>
+ <type>input</type>
+ <arraynum>1</arraynum>
+ <description>Enter the second A records hostname (example: pfsense.org)</description>
+ </field>
+ <field>
+ <name>Second A record IP address</name>
+ <type>input</type>
+ <arraynum>1</arraynum>
+ <description>Enter the second A records IP address (example: 5.6.7.8)</description>
+ </field>
+ <field>
+ <name>Third A record (optional)</name>
+ <type>listtopic</type>
+ </field>
+ <field>
+ <name>Third A record IP hostname</name>
+ <type>input</type>
+ <arraynum>1</arraynum>
+ <description>Enter the third A records hostname (example: www2.pfsense.org)</description>
+ </field>
+ <field>
+ <name>Third A record IP address</name>
+ <type>input</type>
+ <arraynum>1</arraynum>
+ <description>Enter the third A records IP address (example: 9.10.11.12)</description>
+ </field>
+ <field>
+ <name>Next</name>
+ <type>submit</type>
+ </field>
+ </fields>
+ <stepsubmitbeforesave>
+ <![CDATA[
+
+ $changed = false;
+
+ if($_POST['domainname'] and $_POST['primarynameserver']) {
+ $tmp = array();
+ $tmp['hostname'] = $_POST['domainname'];
+ $tmp['recordtype'] = "SOA";
+ $tmp['ipaddress'] = $_POST['primarynameserver'];
+ $config['installedpackages']['tinydnsdomains']['config'][] = $tmp;
+ unset($tmp);
+ $changed = true;
+ }
+
+ if($_POST['domainname'] and $_POST['secondarynameserver']) {
+ $tmp = array();
+ $tmp['hostname'] = $_POST['domainname'];
+ $tmp['recordtype'] = "SOA";
+ $tmp['ipaddress'] = $_POST['secondarynameserver'];
+ $config['installedpackages']['tinydnsdomains']['config'][] = $tmp;
+ unset($tmp);
+ $changed = true;
+ }
+
+ if($_POST['firstarecordhostname'] and $_POST['firstarecordipaddress']) {
+ $tmp = array();
+ $tmp['hostname'] = $_POST['firstarecordhostname'];
+ $tmp['recordtype'] = "A";
+ $tmp['ipaddress'] = $_POST['firstarecordipaddress'];
+ $config['installedpackages']['tinydnsdomains']['config'][] = $tmp;
+ unset($tmp);
+ $changed = true;
+ }
+
+ if($_POST['secondarecordiphostname'] and $_POST['secondarecordipaddress']) {
+ $tmp = array();
+ $tmp['hostname'] = $_POST['secondarecordiphostname'];
+ $tmp['recordtype'] = "A";
+ $tmp['ipaddress'] = $_POST['secondarecordipaddress'];
+ $config['installedpackages']['tinydnsdomains']['config'][] = $tmp;
+ unset($tmp);
+ $changed = true;
+ }
+
+ if($_POST['thirdarecordiphostname'] and $_POST['thirdarecordipaddress']) {
+ $tmp = array();
+ $tmp['hostname'] = $_POST['thirdarecordiphostname'];
+ $tmp['recordtype'] = "A";
+ $tmp['ipaddress'] = $_POST['thirdarecordipaddress'];
+ $config['installedpackages']['tinydnsdomains']['config'][] = $tmp;
+ unset($tmp);
+ $changed = true;
+ }
+
+ if($_POST['mailexchangerrecordipaddress'] and $_POST['mailexchangerrecordhostname']) {
+ $tmp = array();
+ $tmp['hostname'] = $_POST['mailexchangerrecordhostname'];
+ $tmp['recordtype'] = "MX";
+ $tmp['ipaddress'] = $_POST['secondarecordipaddress'];
+ unset($tmp);
+ $changed = true;
+ }
+
+ if($changed) {
+ write_config("new_zone_wizard.xml is creating a new zone {$_POST['domainname']}");
+ require_once("/usr/local/pkg/tinydns.inc");
+ tinydns_create_zone_file();
+ tinydns_setup_ping_items();
+ tinydns_sync_on_changes();
+ }
+
+ Header("Location: /tinydns_status.php");
+ ]]>
+ </stepsubmitbeforesave>
+</step>
+</pfsensewizard>