summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorDarren Embry <dse@webonastick.com>2012-03-22 21:25:58 -0400
committerDarren Embry <dse@webonastick.com>2012-03-22 21:25:58 -0400
commitf97a5b0419d0350cc85b91d180238975c308ac07 (patch)
tree914f9207874cedb51200c1911df2c948186c299b /usr/local
parent95e174f18ce4604e1c69aebe0530dad06322dba8 (diff)
downloadpfsense-f97a5b0419d0350cc85b91d180238975c308ac07.zip
pfsense-f97a5b0419d0350cc85b91d180238975c308ac07.tar.gz
Move CARP settings from pkg XML to a real PHP page
https://redmine.pfsense.org/issues/647
Diffstat (limited to 'usr/local')
-rw-r--r--usr/local/pkg/carp_settings.xml234
-rwxr-xr-xusr/local/www/carp_status.php2
-rwxr-xr-xusr/local/www/fbegin.inc1
-rwxr-xr-xusr/local/www/firewall_virtual_ip.php2
-rw-r--r--usr/local/www/help.php2
-rw-r--r--usr/local/www/status_filter_reload.php2
-rwxr-xr-xusr/local/www/system_hasync.php348
-rw-r--r--usr/local/www/widgets/widgets/carp_status.widget.php2
-rwxr-xr-xusr/local/www/xmlrpc.php8
9 files changed, 356 insertions, 245 deletions
diff --git a/usr/local/pkg/carp_settings.xml b/usr/local/pkg/carp_settings.xml
deleted file mode 100644
index 32a9b8c..0000000
--- a/usr/local/pkg/carp_settings.xml
+++ /dev/null
@@ -1,234 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<packagegui>
- <name>carpsettings</name>
- <version>0.1.0</version>
- <title>Services: CARP Settings</title>
- <configpath>['installedpackages']['carpsettings']['config']</configpath>
- <aftersaveredirect>pkg_edit.php?xml=carp_settings.xml&amp;id=0</aftersaveredirect>
- <menu>
- <name>CARP (failover)</name>
- <tooltiptext>CARP is a tool to help achieve system redundancy, by having multiple computers creating a single, virtual network interface between them, so that if any machine fails, another can respond instead. CARP is an improvement over the Virtual Router Redundancy Protocol (VRRP) standard. It was developed after VRRP was deemed to be not free enough because of a possibly-overlapping Cisco patent.</tooltiptext>
- <section>Firewall</section>
- <configfile>carp_settings.xml</configfile>
- </menu>
- <tabs>
- <tab>
- <text>Virtual IPs</text>
- <url>firewall_virtual_ip.php</url>
- </tab>
- <tab>
- <text>CARP Settings</text>
- <url>pkg_edit.php?xml=carp_settings.xml&amp;id=0</url>
- <active/>
- </tab>
- </tabs>
- <adddeleteeditpagefields>
- <columnitem>
- <fielddescr>PFSync Enabled</fielddescr>
- <fieldname>pfsyncenabled</fieldname>
- </columnitem>
- <columnitem>
- <fielddescr>PFSync IP</fielddescr>
- <fieldname>pfsyncip</fieldname>
- </columnitem>
- <columnitem>
- <fielddescr>PFSync Interface</fielddescr>
- <fieldname>pfsyncinterface</fieldname>
- </columnitem>
- </adddeleteeditpagefields>
- <fields>
- <field>
- <name>State Synchronization Settings (pfsync)</name>
- <type>listtopic</type>
- </field>
- <field>
- <fielddescr>Synchronize States</fielddescr>
- <fieldname>pfsyncenabled</fieldname>
- <description>
- pfsync transfers state insertion, update, and deletion messages between firewalls. Each firewall sends these messages out via multicast on a specified interface, using the PFSYNC protocol (IP Protocol 240). It also listens on that interface for similar messages from other firewalls, and imports them into the local state table.
- &lt;p&gt;
- This setting should be enabled on all members of a failover group.
- &lt;p&gt;
- NOTE: Clicking save will force a configuration sync if it is enabled! (see Configuration Synchronization Settings below)
- </description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Synchronize Interface</fielddescr>
- <fieldname>pfsyncinterface</fieldname>
- <type>interfaces_selection</type>
- <description>
- If Synchronize States is enabled, it will utilize this interface for communication.
- &lt;br&gt;&lt;b&gt;NOTE:&lt;/b&gt; We recommend setting this to a interface other than LAN! A dedicated interface works the best.
- &lt;br&gt;&lt;b&gt;NOTE:&lt;/b&gt; You must define a IP on each machine participating in this failover group.
- &lt;br&gt;&lt;b&gt;NOTE:&lt;/b&gt; You must have an IP assigned to the interface on any participating sync nodes.
- </description>
- </field>
- <field>
- <fielddescr>pfsync Synchronize Peer IP</fielddescr>
- <fieldname>pfsyncpeerip</fieldname>
- <type>input</type>
- <description>
- Setting this option will force pfsync to synchronize its state table to this IP address. The default is directed multicast.
- </description>
- </field>
- <field>
- <name>Configuration Synchronization Settings (XMLRPC Sync)</name>
- <type>listtopic</type>
- </field>
- <field>
- <fielddescr>Synchronize Config to IP</fielddescr>
- <fieldname>synchronizetoip</fieldname>
- <description>Enter the IP address of the firewall to which the selected configuration sections should be synchronized.
- &lt;br&gt;&lt;br&gt;NOTE: XMLRPC sync is currently only supported over connections using the same protocol and port as this system - make sure the remote system's port and protocol are set accordingly!
- &lt;br&gt;&lt;br&gt;NOTE: &lt;b&gt;Do not use the Synchronize Config to IP and password option on backup cluster members!&lt;/b&gt;
- </description>
- <type>input</type>
- </field>
- <field>
- <fielddescr>Remote System Username</fielddescr>
- <fieldname>username</fieldname>
- <default_value>admin</default_value>
- <description>Enter the webConfigurator username of the system entered above for synchronizing your configuration.
- &lt;br&gt;&lt;br&gt;NOTE: &lt;b&gt;Do not use the Synchronize Config to IP and username option on backup cluster members!&lt;/b&gt;</description>
- <type>input</type>
- </field>
- <field>
- <fielddescr>Remote System Password</fielddescr>
- <fieldname>password</fieldname>
- <description>Enter the webConfigurator password of the system entered above for synchronizing your configuration.
- &lt;br&gt;&lt;br&gt;NOTE: &lt;b&gt;Do not use the Synchronize Config to IP and password option on backup cluster members!&lt;/b&gt;</description>
- <type>password</type>
- </field>
- <field>
- <fielddescr>Synchronize Users and Groups</fielddescr>
- <fieldname>synchronizeusers</fieldname>
- <description>When this option is enabled, this system will automatically sync the users and groups over to the other CARP host when changes are made.</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Synchronize Certificates</fielddescr>
- <fieldname>synchronizecerts</fieldname>
- <description>When this option is enabled, this system will automatically sync the Certificate Authorities, Certificates, and Certificate Revocation Lists over to the other CARP host when changes are made.</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Synchronize rules</fielddescr>
- <fieldname>synchronizerules</fieldname>
- <description>When this option is enabled, this system will automatically sync the firewall rules to the other CARP host when changes are made..</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Synchronize Firewall Schedules</fielddescr>
- <fieldname>synchronizeschedules</fieldname>
- <description>When this option is enabled, this system will automatically sync the firewall schedules to the other CARP host when changes are made.</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Synchronize aliases</fielddescr>
- <fieldname>synchronizealiases</fieldname>
- <description>When this option is enabled, this system will automatically sync the aliases over to the other CARP host when changes are made.</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Synchronize NAT</fielddescr>
- <fieldname>synchronizenat</fieldname>
- <description>When this option is enabled, this system will automatically sync the NAT rules over to the other CARP host when changes are made.</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Synchronize IPsec</fielddescr>
- <fieldname>synchronizeipsec</fieldname>
- <description>When this option is enabled, this system will automatically sync the IPsec configuration to the other CARP host when changes are made.</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Synchronize OpenVPN</fielddescr>
- <fieldname>synchronizeopenvpn</fieldname>
- <description>When this option is enabled, this system will automatically sync the OpenVPN configuration to the other CARP host when changes are made. Using this option implies "Synchronize Certificates" as they are required for OpenVPN.</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Synchronize DHCPD</fielddescr>
- <fieldname>synchronizedhcpd</fieldname>
- <description>When this option is enabled, this system will automatically sync the DHCP Server settings over to the other carp host when changes are made.</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Synchronize Wake on LAN</fielddescr>
- <fieldname>synchronizewol</fieldname>
- <description>When this option is enabled, this system will automatically sync the WoL configuration to the other CARP host when changes are made.</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Synchronize Static Routes</fielddescr>
- <fieldname>synchronizestaticroutes</fieldname>
- <description>When this option is enabled, this system will automatically sync the Static Route configuration to the other CARP host when changes are made.</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Synchronize Load Balancer</fielddescr>
- <fieldname>synchronizelb</fieldname>
- <description>When this option is enabled, this system will automatically sync the Load Balancer configuration to the other CARP host when changes are made.</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Synchronize Virtual IPs</fielddescr>
- <fieldname>synchronizevirtualip</fieldname>
- <description>When this option is enabled, this system will automatically sync the CARP Virtual IPs to the other CARP host when changes are made.</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Synchronize traffic shaper(queues)</fielddescr>
- <fieldname>synchronizetrafficshaper</fieldname>
- <description>When this option is enabled, this system will automatically sync the traffic shaper configuration for queues to the other CARP host when changes are made.</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Synchronize traffic shaper(limiter)</fielddescr>
- <fieldname>synchronizetrafficshaperlimiter</fieldname>
- <description>When this option is enabled, this system will automatically sync the traffic shaper configuration for limiters to the other CARP host when changes are made.</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Synchronize traffic shaper(layer7)</fielddescr>
- <fieldname>synchronizetrafficshaperlayer7</fieldname>
- <description>When this option is enabled, this system will automatically sync the traffic shaper configuration for layer7 to the other CARP host when changes are made.</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Synchronize DNS Forwarder</fielddescr>
- <fieldname>synchronizednsforwarder</fieldname>
- <description>When this option is enabled, this system will automatically sync the DNS Forwarder configuration to the other CARP host when changes are made.</description>
- <type>checkbox</type>
- </field>
- <field>
- <fielddescr>Synchronize Captive Portal</fielddescr>
- <fieldname>synchronizecaptiveportal</fieldname>
- <description>When this option is enabled, this system will automatically sync the Captive Portal configuration to the other CARP host when changes are made.</description>
- <type>checkbox</type>
- </field>
- </fields>
- <custom_php_validation_command>
- if($_POST["synchronizetoip"]) {
- if(!is_ipaddr($_POST["synchronizetoip"]))
- $input_errors[] = "You must specify a valid IP address.";
- $ifdescrs = get_configured_interface_list();
- foreach($ifdescrs as $descr)
- if(get_interface_ip($descr) == $_POST["synchronizetoip"])
- $input_errors[] = "CARP sync IP must be the backup firewall IP! You cannot specify this firewalls IP in this location.";
- if($config['virtualip']['vip']) {
- foreach($config['virtualip']['vip'] as $vip) {
- if($vip['subnet'] == $_POST["synchronizetoip"])
- $input_errors[] = "CARP sync IP must be the backup firewall IP! You cannot specify this firewalls IP in this location.";
- }
- }
- }
- </custom_php_validation_command>
- <custom_add_php_command_late>
- /* setup carp interfaces */
- interfaces_carp_setup();
- /* force a filter configure for syncing */
- filter_configure();
- </custom_add_php_command_late>
-</packagegui>
diff --git a/usr/local/www/carp_status.php b/usr/local/www/carp_status.php
index e893dad..9058c38 100755
--- a/usr/local/www/carp_status.php
+++ b/usr/local/www/carp_status.php
@@ -193,7 +193,7 @@ include("head.inc");
<span class="vexpl">
<span class="red"><strong><?=gettext("Note"); ?>:</strong></span>
<br />
-<?=gettext("You can configure CARP settings"); ?> <a href="pkg_edit.php?xml=carp_settings.xml&id=0"><?=gettext("here"); ?></a>.
+<?=gettext("You can configure high availability sync settings"); ?> <a href="system_hasync.php"><?=gettext("here"); ?></a>.
</span>
<p/>
diff --git a/usr/local/www/fbegin.inc b/usr/local/www/fbegin.inc
index 9f13cc5..f24fc7d 100755
--- a/usr/local/www/fbegin.inc
+++ b/usr/local/www/fbegin.inc
@@ -83,6 +83,7 @@ $system_menu = array();
$system_menu[] = array(gettext("Advanced"), "/system_advanced_admin.php");
$system_menu[] = array(gettext("Firmware"), "/system_firmware.php");
$system_menu[] = array(gettext("General Setup"), "/system.php");
+$system_menu[] = array(gettext("High Avail. Sync"), "/system_hasync.php");
$system_menu[] = array(gettext("Logout"), "/index.php?logout");
if ($g['platform'] == "pfSense" or $g['platform'] == "nanobsd")
$system_menu[] = array(gettext("Packages"), "/pkg_mgr_installed.php");
diff --git a/usr/local/www/firewall_virtual_ip.php b/usr/local/www/firewall_virtual_ip.php
index ae3a1f7..620c249 100755
--- a/usr/local/www/firewall_virtual_ip.php
+++ b/usr/local/www/firewall_virtual_ip.php
@@ -170,7 +170,7 @@ include("head.inc");
/* active tabs */
$tab_array = array();
$tab_array[] = array(gettext("Virtual IPs"), true, "firewall_virtual_ip.php");
- $tab_array[] = array(gettext("CARP Settings"), false, "pkg_edit.php?xml=carp_settings.xml&id=0");
+ $tab_array[] = array(gettext("CARP Settings"), false, "system_hasync.php");
display_top_tabs($tab_array);
?>
</td></tr>
diff --git a/usr/local/www/help.php b/usr/local/www/help.php
index c64330d..59c96bc 100644
--- a/usr/local/www/help.php
+++ b/usr/local/www/help.php
@@ -227,7 +227,7 @@ $helppages = array(
/* Below here are pages that may need some cleanup or have not been fully looked at yet */
'carp_status.php' => 'http://doc.pfsense.org/index.php/Category:CARP',
- 'carp_settings.xml' => 'http://doc.pfsense.org/index.php/Category:CARP',
+ 'system_hasync.php' => 'http://doc.pfsense.org/index.php/Category:CARP', /* FIXME? */
'load_balancer_monitor.php' => 'http://doc.pfsense.org/index.php/Category:Load_balancing',
'load_balancer_monitor_edit.php' => 'http://doc.pfsense.org/index.php/Category:Load_balancing',
diff --git a/usr/local/www/status_filter_reload.php b/usr/local/www/status_filter_reload.php
index 22974d9..ff05c41 100644
--- a/usr/local/www/status_filter_reload.php
+++ b/usr/local/www/status_filter_reload.php
@@ -70,7 +70,7 @@ include("head.inc");
<br/>
<form action="status_filter_reload.php" method="POST" name="filter">
<input type="submit" value="Reload Filter" name="reloadfilter" id="reloadfilter">
-<?php if (is_array($config["installedpackages"]["carpsettings"]) && is_array($config["installedpackages"]["carpsettings"]["config"][0]) && $config["installedpackages"]["carpsettings"]["config"][0]["synchronizetoip"] != ""): ?>
+<?php if ($config['hasync'] && $config['hasync']["synchronizetoip"] != ""): ?>
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="submit" value="Force Config Sync" name="syncfilter" id="syncfilter">
<? endif; ?>
diff --git a/usr/local/www/system_hasync.php b/usr/local/www/system_hasync.php
new file mode 100755
index 0000000..517f1f5
--- /dev/null
+++ b/usr/local/www/system_hasync.php
@@ -0,0 +1,348 @@
+<?php
+/* $Id$ */
+/*
+ system_hasync.php
+ part of m0n0wall (http://m0n0.ch/wall)
+
+ Copyright (C) 2012 Darren Embry <dse@webonastick.com>.
+ 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.
+*/
+/*
+ pfSense_MODULE: system
+*/
+
+##|+PRIV
+##|*IDENT=page-system-hasync
+##|*NAME=System: High Availability Sync
+##|*DESCR=Allow access to the 'System: High Availability Sync' page.
+##|*MATCH=system_hasync.php*
+##|-PRIV
+
+require("guiconfig.inc");
+
+if (!is_array($config['hasync']))
+ $config['hasync'] = array();
+
+$a_hasync = &$config['hasync'];
+
+$checkbox_names = array('pfsyncenabled',
+ 'synchronizeusers',
+ 'synchronizecerts',
+ 'synchronizerules',
+ 'synchronizeschedules',
+ 'synchronizealiases',
+ 'synchronizenat',
+ 'synchronizeipsec',
+ 'synchronizeopenvpn',
+ 'synchronizedhcpd',
+ 'synchronizewol',
+ 'synchronizestaticroutes',
+ 'synchronizelb',
+ 'synchronizevirtualip',
+ 'synchronizetrafficshaper',
+ 'synchronizetrafficshaperlimiter',
+ 'synchronizetrafficshaperlayer7',
+ 'synchronizednsforwarder',
+ 'synchronizecaptiveportal');
+
+if ($_POST) {
+ $pconfig = $_POST;
+ foreach ($checkbox_names as $name) {
+ $a_hasync[$name] = $pconfig[$name] ? $pconfig[$name] : false;
+ }
+ $a_hasync['pfsyncpeerip'] = $pconfig['pfsyncpeerip'];
+ $a_hasync['pfsyncinterface'] = $pconfig['pfsyncinterface'];
+ $a_hasync['synchronizetoip'] = $pconfig['synchronizetoip'];
+ $a_hasync['username'] = $pconfig['username'];
+ $a_hasync['password'] = $pconfig['password'];
+ write_config("Updated High Availability Sync configuration");
+ header("Location: system_hasync.php");
+ exit();
+}
+
+foreach ($checkbox_names as $name) {
+ $pconfig[$name] = $a_hasync[$name];
+}
+$pconfig['pfsyncpeerip'] = $a_hasync['pfsyncpeerip'];
+$pconfig['pfsyncinterface'] = $a_hasync['pfsyncinterface'];
+$pconfig['synchronizetoip'] = $a_hasync['synchronizetoip'];
+$pconfig['username'] = $a_hasync['username'];
+$pconfig['password'] = $a_hasync['password'];
+
+$ifaces = get_configured_interface_with_descr();
+$ifaces["lo0"] = "loopback";
+
+$pgtitle = array(gettext("System"),gettext("High Availability Sync"));
+include("head.inc");
+?>
+<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
+<?php include("fbegin.inc"); ?>
+
+<form action="system_hasync.php" method="post" name="iform" id="iform">
+<table width="100%" border="0" cellspacing="0" cellpadding="0">
+<tr>
+<td id="mainarea">
+<div class="tabcont">
+
+ <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
+ <tr>
+ <td colspan="2" class="listtopic">State Synchronization Settings (pfsync)</td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize States</td>
+ <td class="vtable">
+ <input id='pfsyncenabled' type='checkbox' name='pfsyncenabled' value='on' <?php if ($pconfig['pfsyncenabled'] === "on") echo "checked='checked'"; ?> />
+ <br />
+ pfsync transfers state insertion, update, and deletion messages between firewalls. Each firewall sends these messages out via multicast on a specified interface, using the PFSYNC protocol (IP Protocol 240). It also listens on that interface for similar messages from other firewalls, and imports them into the local state table.<p>This setting should be enabled on all members of a failover group.<p>NOTE: Clicking save will force a configuration sync if it is enabled! (see Configuration Synchronization Settings below)
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize Interface</td>
+ <td class="vtable">
+ <select id='pfsyncinterface' name="pfsyncinterface">
+ <?php foreach ($ifaces as $ifname => $iface) { ?>
+ <?php $selected = ($pconfig['pfsyncinterface'] === $ifname) ? 'selected="selected"' : ''; ?>
+ <option value="<?= htmlentities($ifname); ?>" <?= $selected ?>><?= htmlentities($iface); ?></option>
+ <?php } ?>
+ </select>
+ <br />
+ If Synchronize States is enabled, it will utilize this interface for communication.<br />
+ <b>NOTE:</b> We recommend setting this to a interface other than LAN! A dedicated interface works the best.<br />
+ <b>NOTE:</b> You must define a IP on each machine participating in this failover group.<br />
+ <b>NOTE:</b> You must have an IP assigned to the interface on any participating sync nodes.
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">pfsync Synchronize Peer IP</td>
+ <td class="vtable">
+ <input id='pfsyncpeerip' name='pfsyncpeerip' class='formfld unknown' value='<?= htmlentities($pconfig['pfsyncpeerip']); ?>' />
+ <br />
+ Setting this option will force pfsync to synchronize its state table to this IP address. The default is directed multicast.
+ </td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td colspan="2" class="listtopic">Configuration Synchronization Settings (XMLRPC Sync)</td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize Config to IP</td>
+ <td class="vtable">
+ <input id='synchronizetoip' name='synchronizetoip' class='formfld unknown' value='<?= htmlentities($pconfig['synchronizetoip']); ?>' />
+ <br />
+ Enter the IP address of the firewall to which the selected configuration sections should be synchronized.<br />
+ <br />
+ NOTE: XMLRPC sync is currently only supported over connections using the same protocol and port as this system - make sure the remote system's port and protocol are set accordingly!<br />
+ <br />
+ NOTE: <b>Do not use the Synchronize Config to IP and password option on backup cluster members!</b>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Remote System Username</td>
+ <td class="vtable">
+ <input id='username' name='username' class='formfld unknown' value='<?= htmlentities($pconfig['username']); ?>' />
+ <br />
+ Enter the webConfigurator username of the system entered above for synchronizing your configuration.<br />
+ <br />
+ NOTE: <b>Do not use the Synchronize Config to IP and username option on backup cluster members!</b>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Remote System Password</td>
+ <td class="vtable">
+ <input id='password' type='password' name='password' class='formfld pwd' value='<?= htmlentities($pconfig['password']); ?>' />
+ <br />
+ Enter the webConfigurator password of the system entered above for synchronizing your configuration.<br />
+ <br />
+ NOTE: <b>Do not use the Synchronize Config to IP and password option on backup cluster members!</b>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize Users and Groups</td>
+ <td class="vtable">
+ <input id='synchronizeusers' type='checkbox' name='synchronizeusers' value='on' <?php if ($pconfig['synchronizeusers'] === "on") echo "checked='checked'"; ?> />
+ <br />
+ When this option is enabled, this system will automatically sync the users and groups over to the other CARP host when changes are made.
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize Certificates</td>
+ <td class="vtable">
+ <input id='synchronizecerts' type='checkbox' name='synchronizecerts' value='on' <?php if ($pconfig['synchronizecerts'] === "on") echo "checked='checked'"; ?> />
+ <br />
+ When this option is enabled, this system will automatically sync the Certificate Authorities, Certificates, and Certificate Revocation Lists over to the other CARP host when changes are made.
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize rules</td>
+ <td class="vtable">
+ <input id='synchronizerules' type='checkbox' name='synchronizerules' value='on' <?php if ($pconfig['synchronizerules'] === "on") echo "checked='checked'"; ?> />
+ <br />
+ When this option is enabled, this system will automatically sync the firewall rules to the other CARP host when changes are made..
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize Firewall Schedules</td>
+ <td class="vtable">
+ <input id='synchronizeschedules' type='checkbox' name='synchronizeschedules' value='on' <?php if ($pconfig['synchronizeschedules'] === "on") echo "checked='checked'"; ?> />
+ <br />
+ When this option is enabled, this system will automatically sync the firewall schedules to the other CARP host when changes are made.
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize aliases</td>
+ <td class="vtable">
+ <input id='synchronizealiases' type='checkbox' name='synchronizealiases' value='on' <?php if ($pconfig['synchronizealiases'] === "on") echo "checked='checked'"; ?> />
+ <br />
+ When this option is enabled, this system will automatically sync the aliases over to the other CARP host when changes are made.
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize NAT</td>
+ <td class="vtable">
+ <input id='synchronizenat' type='checkbox' name='synchronizenat' value='on' <?php if ($pconfig['synchronizenat'] === "on") echo "checked='checked'"; ?> />
+ <br />
+ When this option is enabled, this system will automatically sync the NAT rules over to the other CARP host when changes are made.
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize IPsec</td>
+ <td class="vtable">
+ <input id='synchronizeipsec' type='checkbox' name='synchronizeipsec' value='on' <?php if ($pconfig['synchronizeipsec'] === "on") echo "checked='checked'"; ?> />
+ <br />
+ When this option is enabled, this system will automatically sync the IPsec configuration to the other CARP host when changes are made.
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize OpenVPN</td>
+ <td class="vtable">
+ <input id='synchronizeopenvpn' type='checkbox' name='synchronizeopenvpn' value='on' <?php if ($pconfig['synchronizeopenvpn'] === "on") echo "checked='checked'"; ?> />
+ <br />
+ When this option is enabled, this system will automatically sync the OpenVPN configuration to the other CARP host when changes are made. Using this option implies "Synchronize Certificates" as they are required for OpenVPN.
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize DHCPD</td>
+ <td class="vtable">
+ <input id='synchronizedhcpd' type='checkbox' name='synchronizedhcpd' value='on' <?php if ($pconfig['synchronizedhcpd'] === "on") echo "checked='checked'"; ?> />
+ <br />
+ When this option is enabled, this system will automatically sync the DHCP Server settings over to the other carp host when changes are made.
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize Wake on LAN</td>
+ <td class="vtable">
+ <input id='synchronizewol' type='checkbox' name='synchronizewol' value='on' <?php if ($pconfig['synchronizewol'] === "on") echo "checked='checked'"; ?> />
+ <br />
+ When this option is enabled, this system will automatically sync the WoL configuration to the other CARP host when changes are made.
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize Static Routes</td>
+ <td class="vtable">
+ <input id='synchronizestaticroutes' type='checkbox' name='synchronizestaticroutes' value='on' <?php if ($pconfig['synchronizestaticroutes'] === "on") echo "checked='checked'"; ?> />
+ <br />
+ When this option is enabled, this system will automatically sync the Static Route configuration to the other CARP host when changes are made.
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize Load Balancer</td>
+ <td class="vtable">
+ <input id='synchronizelb' type='checkbox' name='synchronizelb' value='on' <?php if ($pconfig['synchronizelb'] === "on") echo "checked='checked'"; ?> />
+ <br />
+ When this option is enabled, this system will automatically sync the Load Balancer configuration to the other CARP host when changes are made.
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize Virtual IPs</td>
+ <td class="vtable">
+ <input id='synchronizevirtualip' type='checkbox' name='synchronizevirtualip' value='on' <?php if ($pconfig['synchronizevirtualip'] === "on") echo "checked='checked'"; ?> />
+ <br />
+ When this option is enabled, this system will automatically sync the CARP Virtual IPs to the other CARP host when changes are made.
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize traffic shaper(queues)</td>
+ <td class="vtable">
+ <input id='synchronizetrafficshaper' type='checkbox' name='synchronizetrafficshaper' value='on' <?php if ($pconfig['synchronizetrafficshaper'] === "on") echo "checked='checked'"; ?> />
+ <br />
+ When this option is enabled, this system will automatically sync the traffic shaper configuration for queues to the other CARP host when changes are made.
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize traffic shaper(limiter)</td>
+ <td class="vtable">
+ <input id='synchronizetrafficshaperlimiter' type='checkbox' name='synchronizetrafficshaperlimiter' value='on' <?php if ($pconfig['synchronizetrafficshaperlimiter'] === "on") echo "checked='checked'"; ?> />
+ <br />
+ When this option is enabled, this system will automatically sync the traffic shaper configuration for limiters to the other CARP host when changes are made.
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize traffic shaper(layer7)</td>
+ <td class="vtable">
+ <input id='synchronizetrafficshaperlayer7' type='checkbox' name='synchronizetrafficshaperlayer7' value='on' <?php if ($pconfig['synchronizetrafficshaperlayer7'] === "on") echo "checked='checked'"; ?> />
+ <br />
+ When this option is enabled, this system will automatically sync the traffic shaper configuration for layer7 to the other CARP host when changes are made.
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize DNS Forwarder</td>
+ <td class="vtable">
+ <input id='synchronizednsforwarder' type='checkbox' name='synchronizednsforwarder' value='on' <?php if ($pconfig['synchronizednsforwarder'] === "on") echo "checked='checked'"; ?> />
+ <br />
+ When this option is enabled, this system will automatically sync the DNS Forwarder configuration to the other CARP host when changes are made.
+ </td>
+ </tr>
+ <tr valign="top">
+ <td width="22%" class="vncell">Synchronize Captive Portal</td>
+ <td class="vtable">
+ <input id='synchronizecaptiveportal' type='checkbox' name='synchronizecaptiveportal' value='on' <?php if ($pconfig['synchronizecaptiveportal'] === "on") echo "checked='checked'"; ?> />
+ <br />
+ When this option is enabled, this system will automatically sync the Captive Portal configuration to the other CARP host when changes are made.
+ </td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top">&nbsp;</td>
+ <td width="78%">
+ <input name="id" type="hidden" value="0" />
+ <input name="Submit" type="submit" class="formbtn" value="Save" />
+ <input class="formbtn" type="button" value="Cancel" onclick="history.back()" />
+ </td>
+ </tr>
+ </table>
+
+</div>
+</td>
+</tr>
+</table>
+</form>
+
+
+<?php include("fend.inc"); ?>
+</body>
+</html>
diff --git a/usr/local/www/widgets/widgets/carp_status.widget.php b/usr/local/www/widgets/widgets/carp_status.widget.php
index 8fbb9b1..849a924 100644
--- a/usr/local/www/widgets/widgets/carp_status.widget.php
+++ b/usr/local/www/widgets/widgets/carp_status.widget.php
@@ -55,7 +55,7 @@ $carp_enabled = get_carp_status();
<tr>
<td class="vncellt" width="30%">
<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_cablenic.gif"/> &nbsp;
- <strong><a href="/pkg_edit.php?xml=carp_settings.xml&id=0">
+ <strong><a href="/system_hasync.php">
<span style="color:#000000"><?=htmlspecialchars($carp_int);?></span></a></strong>
</td>
<td width="70%" class="listr">
diff --git a/usr/local/www/xmlrpc.php b/usr/local/www/xmlrpc.php
index 49c05a3..1554e70 100755
--- a/usr/local/www/xmlrpc.php
+++ b/usr/local/www/xmlrpc.php
@@ -45,12 +45,8 @@ require("xmlrpc.inc");
require("array_intersect_key.inc");
/* grab sync to ip if enabled */
-if($config['installedpackages']['carpsettings']) {
- if ($config['installedpackages']['carpsettings']['config']) {
- foreach ($config['installedpackages']['carpsettings']['config'] as $carp) {
- $synchronizetoip = $carp['synchronizetoip'];
- }
- }
+if ($config['hasync']) {
+ $synchronizetoip = $hasync['synchronizetoip'];
}
if($synchronizetoip) {
OpenPOWER on IntegriCloud