Commit 85669dbd authored by Ad Schellevis's avatar Ad Schellevis

(legacy) refactor system_hasync.php

parent 86d50f87
<?php <?php
/* /*
Copyright (C) 2014-2015 Deciso B.V. Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2012 Darren Embry <dse@webonastick.com>. Copyright (C) 2012 Darren Embry <dse@webonastick.com>.
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, 1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer. this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright 2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution. documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 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 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
require_once("guiconfig.inc"); require_once("guiconfig.inc");
require_once("interfaces.inc"); require_once("interfaces.inc");
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/system_hasync.php');
if (!isset($config['hasync']) || !is_array($config['hasync'])) { if (!isset($config['hasync']) || !is_array($config['hasync'])) {
$config['hasync'] = array(); $config['hasync'] = array();
} }
$a_hasync = &$config['hasync']; $a_hasync = &$config['hasync'];
$checkbox_names = array( $checkbox_names = array('pfsyncenabled', 'synchronizeusers', 'synchronizeauthservers', 'synchronizecerts',
'pfsyncenabled', 'synchronizerules', 'synchronizeschedules', 'synchronizealiases', 'synchronizenat',
'synchronizeusers', 'synchronizeipsec', 'synchronizeopenvpn', 'synchronizedhcpd', 'synchronizewol',
'synchronizeauthservers', 'synchronizestaticroutes', 'synchronizelb', 'synchronizevirtualip',
'synchronizecerts', 'synchronizednsforwarder',
'synchronizerules',
'synchronizeschedules',
'synchronizealiases',
'synchronizenat',
'synchronizeipsec',
'synchronizeopenvpn',
'synchronizedhcpd',
'synchronizewol',
'synchronizestaticroutes',
'synchronizelb',
'synchronizevirtualip',
'synchronizednsforwarder',
); );
if ($_POST) {
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig = array();
foreach ($checkbox_names as $name) {
if (isset($a_hasync[$name])) {
$pconfig[$name] = $a_hasync[$name];
} else {
$pconfig[$name] = null;
}
}
foreach (array('pfsyncpeerip','pfsyncinterface','synchronizetoip','username','password') as $tag) {
if (isset($a_hasync[$tag])) {
$pconfig[$tag] = $a_hasync[$tag];
} else {
$pconfig[$tag] = null;
}
}
} elseif ($_SERVER['REQUEST_METHOD'] === 'POST') {
$pconfig = $_POST; $pconfig = $_POST;
foreach ($checkbox_names as $name) { foreach ($checkbox_names as $name) {
if (isset($pconfig[$name])) { if (isset($pconfig[$name])) {
$a_hasync[$name] = $pconfig[$name]; $a_hasync[$name] = $pconfig[$name];
} else { } else {
$a_hasync[$name] = false; $a_hasync[$name] = false;
} }
} }
$a_hasync['pfsyncpeerip'] = $pconfig['pfsyncpeerip']; $a_hasync['pfsyncpeerip'] = $pconfig['pfsyncpeerip'];
$a_hasync['pfsyncinterface'] = $pconfig['pfsyncinterface']; $a_hasync['pfsyncinterface'] = $pconfig['pfsyncinterface'];
...@@ -77,300 +81,268 @@ if ($_POST) { ...@@ -77,300 +81,268 @@ if ($_POST) {
exit(); exit();
} }
foreach ($checkbox_names as $name) { legacy_html_escape_form_data($pconfig);
if (isset($a_hasync[$name])) {
$pconfig[$name] = $a_hasync[$name];
} else {
$pconfig[$name] = null;
}
}
foreach (array('pfsyncpeerip','pfsyncinterface','synchronizetoip','username','password') as $tag) {
if (isset($a_hasync[$tag])) {
$pconfig[$tag] = $a_hasync[$tag];
} else {
$pconfig[$tag] = null;
}
}
$ifaces = get_configured_interface_with_descr();
$ifaces["lo0"] = "loopback";
include("head.inc"); include("head.inc");
?> ?>
<body> <body>
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<!-- row -->
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid"> <div class="container-fluid">
<div class="row">
<div class="row"> <section class="col-xs-12">
<div class="content-box">
<section class="col-xs-12"> <div class="table-responsive">
<div class="content-box"> <form action="system_hasync.php" method="post">
<table class="table table-striped">
<div class="table-responsive"> <tr>
<td width="22%"><strong><?=gettext('State Synchronization') ?></strong></td>
<form action="system_hasync.php" method="post" name="iform" id="iform"> <td width="78%" align="right">
<small><?=gettext("full help"); ?> </small>
<table class="table table-primary table-striped" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area"> <i class="fa fa-toggle-off text-danger" style="cursor: pointer;" id="show_all_help_page" type="button"></i></a>
<thead> </td>
<tr> </tr>
<th colspan="2" class="listtopic"><?=gettext('State Synchronization Settings (pfsync)') ?></th> <tr>
</tr> <td><a id="help_for_pfsyncenabled" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Synchronize States') ?></td>
</thead> <td>
<tbody> <input type="checkbox" name="pfsyncenabled" value="on" <?= !empty($pconfig['pfsyncenabled']) ? "checked=\"checked\"" : "";?> />
<tr valign="top"> <div class="hidden" for="help_for_pfsyncenabled">
<td width="22%" class="vncell"><?=gettext('Synchronize States') ?></td> <?= sprintf(gettext('pfsync transfers state insertion, update, and deletion messages between firewalls.%s' .
<td class="vtable"> 'Each firewall sends these messages out via multicast on a specified interface, using the PFSYNC protocol (%sIP Protocol 240%s).%s' .
<input id='pfsyncenabled' type='checkbox' name='pfsyncenabled' value='on' <?php if ($pconfig['pfsyncenabled'] === "on") { 'It also listens on that interface for similar messages from other firewalls, and imports them into the local state table.%s' .
echo "checked='checked'"; 'This setting should be enabled on all members of a failover group.'), '<br/>','<a href="http://www.openbsd.org/faq/pf/carp.html" target="_blank">','</a>','<br/>','<br/>') ?>
} ?> /> <div class="well well-sm" ><b><?=gettext('Clicking save will force a configuration sync if it is enabled! (see Configuration Synchronization Settings below)') ?></b></div>
<?= sprintf(gettext('pfsync transfers state insertion, update, and deletion messages between firewalls.%s' . </div>
'Each firewall sends these messages out via multicast on a specified interface, using the PFSYNC protocol (%sIP Protocol 240%s).%s' . </td>
'It also listens on that interface for similar messages from other firewalls, and imports them into the local state table.%s' . </tr>
'This setting should be enabled on all members of a failover group.'), '<br/>','<a href="http://www.openbsd.org/faq/pf/carp.html" target="_blank">','</a>','<br/>','<br/>') ?> <tr>
<div class="well well-sm" ><b><?=gettext('Clicking save will force a configuration sync if it is enabled! (see Configuration Synchronization Settings below)') ?></b></div> <td><a id="help_for_pfsyncinterface" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Synchronize Interface') ?></td>
</td> <td>
</tr> <select name="pfsyncinterface" class="selectpicker" data-style="btn-default" data-live-search="true" data-width="auto">
<tr valign="top"> <?php
<td width="22%" class="vncell"><?=gettext('Synchronize Interface') ?></td> $ifaces = get_configured_interface_with_descr();
<td class="vtable"> $ifaces["lo0"] = gettext("loopback");
<select id='pfsyncinterface' name="pfsyncinterface" class="selectpicker" data-style="btn-default" data-live-search="true" data-width="auto"> foreach ($ifaces as $ifname => $iface):
<?php foreach ($ifaces as $ifname => $iface) {
?> ?>
<?php $selected = ($pconfig['pfsyncinterface'] === $ifname) ? 'selected="selected"' : ''; ?> <option value="<?=htmlentities($ifname);?>" <?= ($pconfig['pfsyncinterface'] === $ifname) ? 'selected="selected"' : ''; ?>>
<option value="<?= htmlentities($ifname); <?= htmlentities($iface); ?>
?>" <?= $selected ?>><?= htmlentities($iface); ?></option> </option>
<?php <?php
} ?> endforeach; ?>
</select> </select>
<?=gettext('If Synchronize States is enabled, it will utilize this interface for communication.') ?><br/><br/> <div class="hidden" for="help_for_pfsyncinterface">
<div class="well"> <?=gettext('If Synchronize States is enabled, it will utilize this interface for communication.') ?><br/><br/>
<lu> <div class="well">
<li><?=gettext('We recommend setting this to a interface other than LAN! A dedicated interface works the best.') ?></li> <lu>
<li><?=gettext('You must define a IP on each machine participating in this failover group.') ?></li> <li><?=gettext('We recommend setting this to a interface other than LAN! A dedicated interface works the best.') ?></li>
<li><?=gettext('You must have an IP assigned to the interface on any participating sync nodes.') ?></li> <li><?=gettext('You must define a IP on each machine participating in this failover group.') ?></li>
</lu> <li><?=gettext('You must have an IP assigned to the interface on any participating sync nodes.') ?></li>
</div> </lu>
</td> </div>
</tr> </div>
<tr valign="top"> </td>
<td width="22%" class="vncell"><?=gettext('pfsync Synchronize Peer IP') ?></td> </tr>
<td class="vtable"> <tr>
<input id='pfsyncpeerip' name='pfsyncpeerip' type='text' class='formfld unknown' value='<?= htmlentities($pconfig['pfsyncpeerip']); ?>' /> <td><a id="help_for_pfsyncpeerip" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Synchronize Peer IP') ?></td>
<?=gettext('Setting this option will force pfsync to synchronize its state table to this IP address. The default is directed multicast.') ?> <td>
</td> <input name="pfsyncpeerip" type="text" value="<?=$pconfig['pfsyncpeerip']; ?>" />
</tr> <div class="hidden" for="help_for_pfsyncpeerip">
<tr> <?=gettext('Setting this option will force pfsync to synchronize its state table to this IP address. The default is directed multicast.') ?>
<td></td> </div>
<td>&nbsp;</td> </td>
</tr> </tr>
</tbody> <tr>
</table> <th colspan="2" class="listtopic"><?=gettext('Configuration Synchronization Settings (XMLRPC Sync)') ?></th>
</tr>
<table class="table table-primary table-striped" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area"> <tr>
<thead> <td><a id="help_for_synchronizetoip" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Synchronize Config to IP') ?></td>
<tr> <td>
<th colspan="2" class="listtopic"><?=gettext('Configuration Synchronization Settings (XMLRPC Sync)') ?></th> <input name="synchronizetoip" type="text" value="<?=$pconfig['synchronizetoip']; ?>" />
</tr> <div class="hidden" for="help_for_synchronizetoip">
</thead> <?=gettext('Enter the IP address of the firewall to which the selected configuration sections should be synchronized.') ?><br />
<tbody> <div class="well">
<tr valign="top"> <lu>
<td width="22%" class="vncell"><?=gettext('Synchronize Config to IP') ?></td> <li><?=gettext('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!') ?></li>
<td class="vtable"> <li><b><?=gettext('Do not use the Synchronize Config to IP and password option on backup cluster members!') ?></b></li>
<input id='synchronizetoip' name='synchronizetoip' type='text' class='formfld unknown' value='<?= htmlentities($pconfig['synchronizetoip']); ?>' /> </lu>
<?=gettext('Enter the IP address of the firewall to which the selected configuration sections should be synchronized.') ?><br /> </div>
<div class="well"> </div>
<lu> </td>
<li><?=gettext('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!') ?></li> </tr>
<li><b><?=gettext('Do not use the Synchronize Config to IP and password option on backup cluster members!') ?></b></li> <tr>
</lu> <td><a id="help_for_username" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Remote System Username') ?></td>
</div> <td>
</td> <input name="username" type="text" value="<?=$pconfig['username'];?>" />
</tr> <div class="hidden" for="help_for_username">
<tr valign="top"> <?=gettext('Enter the webConfigurator username of the system entered above for synchronizing your configuration.') ?><br />
<td width="22%" class="vncell"><?=gettext('Remote System Username') ?></td> <div class="well well-sm">
<td class="vtable"> <b><?=gettext('Do not use the Synchronize Config to IP and username option on backup cluster members!') ?></b>
<input id='username' name='username' type='text' class='formfld unknown' value='<?= htmlentities($pconfig['username']); ?>' /> </div>
<br /> </div>
<?=gettext('Enter the webConfigurator username of the system entered above for synchronizing your configuration.') ?><br /> </td>
<div class="well well-sm"> </tr>
<b><?=gettext('Do not use the Synchronize Config to IP and username option on backup cluster members!') ?></b> <tr>
</div> <td><a id="help_for_password" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Remote System Password') ?></td>
</td> <td>
</tr> <input type="password" name="password" value="<?=$pconfig['password']; ?>" />
<tr valign="top"> <div class="hidden" for="help_for_password">
<td width="22%" class="vncell"><?=gettext('Remote System Password') ?></td> <?=gettext('Enter the webConfigurator password of the system entered above for synchronizing your configuration.') ?><br />
<td class="vtable"> <div class="well well-sm">
<input id='password' type='password' name='password' class='formfld pwd' value='<?= htmlentities($pconfig['password']); ?>' /> <b><?=gettext('Do not use the Synchronize Config to IP and password option on backup cluster members!') ?></b>
<br /> </div>
<?=gettext('Enter the webConfigurator password of the system entered above for synchronizing your configuration.') ?><br /> </div>
<div class="well well-sm"> </td>
<b><?=gettext('Do not use the Synchronize Config to IP and password option on backup cluster members!') ?></b> </tr>
</div> <tr>
</td> <td><a id="help_for_synchronizeusers" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Users and Groups') ?></td>
</tr> <td>
<tr valign="top"> <input type="checkbox" name="synchronizeusers" value="on" <?=!empty($pconfig['synchronizeusers']) ? "checked=\"checked\"" : "";?> />
<td width="22%" class="vncell"><?=gettext('Synchronize Users and Groups') ?></td> <div class="hidden" for="help_for_synchronizeusers">
<td class="vtable"> <?=gettext('Automatically sync the users and groups over to the other HA host when changes are made.') ?>
<input id='synchronizeusers' type='checkbox' name='synchronizeusers' value='on' <?php if ($pconfig['synchronizeusers'] === "on") { </div>
echo "checked='checked'"; </td>
} ?> /> </tr>
<?=gettext('Automatically sync the users and groups over to the other HA host when changes are made.') ?> <tr>
</td> <td><a id="help_for_synchronizeauthservers" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Auth Servers') ?></td>
</tr> <td>
<tr valign="top"> <input type="checkbox" name='synchronizeauthservers' value="on" <?=!empty($pconfig['synchronizeauthservers']) ? "checked=\"checked\"" : "";?> />
<td width="22%" class="vncell"><?=gettext('Synchronize Auth Servers') ?></td> <div class="hidden" for="help_for_synchronizeauthservers">
<td class="vtable"> <?=gettext('Automatically sync the authentication servers (e.g. LDAP, RADIUS) over to the other HA host when changes are made.') ?>
<input id='synchronizeauthservers' type='checkbox' name='synchronizeauthservers' value='on' <?php if ($pconfig['synchronizeauthservers'] === "on") { </div>
echo "checked='checked'"; </td>
} ?> /> </tr>
<?=gettext('Automatically sync the authentication servers (e.g. LDAP, RADIUS) over to the other HA host when changes are made.') ?> <tr>
</td> <td><a id="help_for_synchronizecerts" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Certificates') ?></td>
</tr> <td>
<tr valign="top"> <input type="checkbox" name="synchronizecerts" value="on" <?=!empty($pconfig['synchronizecerts']) ? "checked=\"checked\"" : "";?> />
<td width="22%" class="vncell"><?=gettext('Synchronize Certificates') ?></td> <div class="hidden" for="help_for_synchronizecerts">
<td class="vtable"> <?=gettext('Automatically sync the Certificate Authorities, Certificates, and Certificate Revocation Lists over to the other HA host when changes are made.') ?>
<input id='synchronizecerts' type='checkbox' name='synchronizecerts' value='on' <?php if ($pconfig['synchronizecerts'] === "on") { </div>
echo "checked='checked'"; </td>
} ?> /> </tr>
<?=gettext('Automatically sync the Certificate Authorities, Certificates, and Certificate Revocation Lists over to the other HA host when changes are made.') ?> <tr>
</td> <td><a id="help_for_synchronizerules" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Firewall Rules') ?></td>
</tr> <td>
<tr valign="top"> <input type="checkbox" name="synchronizerules" value="on" <?=!empty($pconfig['synchronizerules']) ? "checked=\"checked\"" : "";?> />
<td width="22%" class="vncell"><?=gettext('Synchronize rules') ?></td> <div class="hidden" for="help_for_synchronizerules">
<td class="vtable"> <?=gettext('Automatically sync the firewall rules to the other HA host when changes are made.') ?>
<input id='synchronizerules' type='checkbox' name='synchronizerules' value='on' <?php if ($pconfig['synchronizerules'] === "on") { </div>
echo "checked='checked'"; </td>
} ?> /> </tr>
<?=gettext('Automatically sync the firewall rules to the other HA host when changes are made.') ?> <tr>
</td> <td><a id="help_for_synchronizeschedules" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Firewall Schedules') ?></td>
</tr> <td>
<tr valign="top"> <input type="checkbox" name="synchronizeschedules" value="on" <?=!empty($pconfig['synchronizeschedules']) ? "checked=\"checked\"" :"";?> />
<td width="22%" class="vncell"><?=gettext('Synchronize Firewall Schedules') ?></td> <div class="hidden" for="help_for_synchronizeschedules">
<td class="vtable"> <?=gettext('Automatically sync the firewall schedules to the other HA host when changes are made.') ?>
<input id='synchronizeschedules' type='checkbox' name='synchronizeschedules' value='on' <?php if ($pconfig['synchronizeschedules'] === "on") { </div>
echo "checked='checked'"; </td>
} ?> /> </tr>
<?=gettext('Automatically sync the firewall schedules to the other HA host when changes are made.') ?> <tr>
</td> <td><a id="help_for_synchronizealiases" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Aliases') ?></td>
</tr> <td>
<tr valign="top"> <input type="checkbox" name="synchronizealiases" value="on" <?=!empty($pconfig['synchronizealiases']) ? "checked=\"checked\"" : "";?>/>
<td width="22%" class="vncell"><?=gettext('Synchronize aliases') ?></td> <div class="hidden" for="help_for_synchronizealiases">
<td class="vtable"> <?=gettext('Automatically sync the aliases over to the other HA host when changes are made.') ?>
<input id='synchronizealiases' type='checkbox' name='synchronizealiases' value='on' <?php if ($pconfig['synchronizealiases'] === "on") { </div>
echo "checked='checked'"; </td>
} ?> /> </tr>
<?=gettext('Automatically sync the aliases over to the other HA host when changes are made.') ?> <tr>
</td> <td><a id="help_for_synchronizenat" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('NAT') ?></td>
</tr> <td>
<tr valign="top"> <input type="checkbox" name="synchronizenat" value="on" <?=!empty($pconfig['synchronizenat']) ? "checked=\"checked\"" :"";?> />
<td width="22%" class="vncell"><?=gettext('Synchronize NAT') ?></td> <div class="hidden" for="help_for_synchronizenat">
<td class="vtable"> <?=gettext('Automatically sync the NAT rules over to the other HA host when changes are made.') ?>
<input id='synchronizenat' type='checkbox' name='synchronizenat' value='on' <?php if ($pconfig['synchronizenat'] === "on") { </div>
echo "checked='checked'"; </td>
} ?> /> </tr>
<?=gettext('Automatically sync the NAT rules over to the other HA host when changes are made.') ?> <tr>
</td> <td><a id="help_for_synchronizeipsec" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('IPsec') ?></td>
</tr> <td>
<tr valign="top"> <input type="checkbox" name="synchronizeipsec" value="on" <?=!empty($pconfig['synchronizeipsec']) ? "checked=\"checked\"" : "";?> />
<td width="22%" class="vncell"><?=gettext('Synchronize IPsec') ?></td> <div class="hidden" for="help_for_synchronizeipsec">
<td class="vtable"> <?=gettext('Automatically sync the IPsec configuration to the other HA host when changes are made.') ?>
<input id='synchronizeipsec' type='checkbox' name='synchronizeipsec' value='on' <?php if ($pconfig['synchronizeipsec'] === "on") { </div>
echo "checked='checked'"; </td>
} ?> /> </tr>
<?=gettext('Automatically sync the IPsec configuration to the other HA host when changes are made.') ?> <tr>
</td> <td><a id="help_for_synchronizeopenvpn" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('OpenVPN') ?></td>
</tr> <td>
<tr valign="top"> <input type="checkbox" name="synchronizeopenvpn" value="on" <?=!empty($pconfig['synchronizeopenvpn']) ? "checked=\"checked\"" :"";?> />
<td width="22%" class="vncell"><?=gettext('Synchronize OpenVPN') ?></td> <div class="hidden" for="help_for_synchronizeopenvpn">
<td class="vtable"> <?=gettext('Automatically sync the OpenVPN configuration to the other HA host when changes are made.') ?>
<input id='synchronizeopenvpn' type='checkbox' name='synchronizeopenvpn' value='on' <?php if ($pconfig['synchronizeopenvpn'] === "on") { <div class="well well-sm"><b><?=gettext('Using this option implies "Synchronize Certificates" as they are required for OpenVPN.') ?></b></div>
echo "checked='checked'"; </div>
} ?> /> </td>
<?=gettext('Automatically sync the OpenVPN configuration to the other HA host when changes are made.') ?> </tr>
<div class="well well-sm"><b><?=gettext('Using this option implies "Synchronize Certificates" as they are required for OpenVPN.') ?></b></div> <tr>
</td> <td><a id="help_for_synchronizedhcpd" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('DHCPD') ?></td>
</tr> <td>
<tr valign="top"> <input type="checkbox" name="synchronizedhcpd" value="on" <?=!empty($pconfig['synchronizedhcpd']) ? "checked=\"checked\"" : "";?> />
<td width="22%" class="vncell"><?=gettext('Synchronize DHCPD') ?></td> <div class="hidden" for="help_for_synchronizedhcpd">
<td class="vtable"> <?=gettext('Automatically sync the DHCP Server settings over to the other HA host when changes are made. This only applies to DHCP for IPv4.') ?>
<input id='synchronizedhcpd' type='checkbox' name='synchronizedhcpd' value='on' <?php if ($pconfig['synchronizedhcpd'] === "on") { </div>
echo "checked='checked'"; </td>
} ?> /> </tr>
<?=gettext('Automatically sync the DHCP Server settings over to the other HA host when changes are made. This only applies to DHCP for IPv4.') ?> <tr>
</td> <td><a id="help_for_synchronizewol" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Wake on LAN') ?></td>
</tr> <td>
<tr valign="top"> <input type="checkbox" name="synchronizewol" value="on" <?=!empty($pconfig['synchronizewol']) ? "checked=\"checked\"" : "";?> />
<td width="22%" class="vncell"><?=gettext('Synchronize Wake on LAN') ?></td> <div class="hidden" for="help_for_synchronizewol">
<td class="vtable"> <?=gettext('Automatically sync the WoL configuration to the other HA host when changes are made.') ?>
<input id='synchronizewol' type='checkbox' name='synchronizewol' value='on' <?php if ($pconfig['synchronizewol'] === "on") { </div>
echo "checked='checked'"; </td>
} ?> /> </tr>
<?=gettext('Automatically sync the WoL configuration to the other HA host when changes are made.') ?> <tr>
</td> <td><a id="help_for_synchronizestaticroutes" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Static Routes') ?></td>
</tr> <td>
<tr valign="top"> <input type="checkbox" name="synchronizestaticroutes" value="on" <?=!empty($pconfig['synchronizestaticroutes']) ? "checked=\"checked\"" :"";?> />
<td width="22%" class="vncell"><?=gettext('Synchronize Static Routes') ?></td> <div class="hidden" for="help_for_synchronizestaticroutes">
<td class="vtable"> <?=gettext('Automatically sync the Static Route configuration to the other HA host when changes are made.') ?>
<input id='synchronizestaticroutes' type='checkbox' name='synchronizestaticroutes' value='on' <?php if ($pconfig['synchronizestaticroutes'] === "on") { </div>
echo "checked='checked'"; </td>
} ?> /> </tr>
<?=gettext('Automatically sync the Static Route configuration to the other HA host when changes are made.') ?> <tr>
</td> <td><a id="help_for_synchronizelb" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Load Balancer') ?></td>
</tr> <td>
<tr valign="top"> <input type="checkbox" name="synchronizelb" value="on" <?=!empty($pconfig['synchronizelb']) ? "checked=\"checked\"" :"";?> />
<td width="22%" class="vncell"><?=gettext('Synchronize Load Balancer') ?></td> <div class="hidden" for="help_for_synchronizelb">
<td class="vtable"> <?=gettext('Automatically sync the Load Balancer configuration to the other HA host when changes are made.') ?>
<input id='synchronizelb' type='checkbox' name='synchronizelb' value='on' <?php if ($pconfig['synchronizelb'] === "on") { </div>
echo "checked='checked'"; </td>
} ?> /> </tr>
<?=gettext('Automatically sync the Load Balancer configuration to the other HA host when changes are made.') ?> <tr>
</td> <td><a id="help_for_synchronizevirtualip" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Virtual IPs') ?></td>
</tr> <td>
<tr valign="top"> <input type="checkbox" name="synchronizevirtualip" value="on" <?=!empty($pconfig['synchronizevirtualip']) ? "checked=\"checked\"" : "";?> />
<td width="22%" class="vncell"><?=gettext('Synchronize Virtual IPs') ?></td> <div class="hidden" for="help_for_synchronizevirtualip">
<td class="vtable"> <?=gettext('Automatically sync the CARP Virtual IPs to the other HA host when changes are made.') ?>
<input id='synchronizevirtualip' type='checkbox' name='synchronizevirtualip' value='on' <?php if ($pconfig['synchronizevirtualip'] === "on") { </div>
echo "checked='checked'"; </td>
} ?> /> </tr>
<?=gettext('Automatically sync the CARP Virtual IPs to the other HA host when changes are made.') ?> <tr>
</td> <td><a id="help_for_synchronizednsforwarder" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('DNS Forwarder') ?></td>
</tr> <td>
<tr valign="top"> <input type="checkbox" name="synchronizednsforwarder" value="on" <?=!empty($pconfig['synchronizednsforwarder']) ? "checked=\"checked\"" :"";?> />
<td width="22%" class="vncell"><?=gettext('Synchronize DNS Forwarder') ?></td> <div class="hidden" for="help_for_synchronizednsforwarder">
<td class="vtable"> <?=gettext('Automatically sync the DNS Forwarder configuration to the other HA host when changes are made.') ?>
<input id='synchronizednsforwarder' type='checkbox' name='synchronizednsforwarder' value='on' <?php if ($pconfig['synchronizednsforwarder'] === "on") { </div>
echo "checked='checked'"; </td>
} ?> /> </tr>
<?=gettext('Automatically sync the DNS Forwarder configuration to the other HA host when changes are made.') ?> <tr>
</td> <td></td>
</tr> <td>
<tr> <input name="Submit" type="submit" class="btn btn-primary" value="Save" />
<td width="22%" valign="top">&nbsp;</td> <input type="button" class="btn btn-default" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/system_hasync.php');?>'" />
<td width="78%"> </td>
<input name="id" type="hidden" value="0" /> </tr>
<input name="Submit" type="submit" class="btn btn-primary" value="Save" /> </table>
<input type="button" class="btn btn-default" value="<?=gettext("Cancel"); </form>
?>" onclick="window.location.href='<?=$referer;?>'" /> </div>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
</section>
</div> </div>
</section>
</div> </div>
</div>
</section> </section>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment