. Copyright (C) 2013-2015 Electric Sheep Fencing, LP 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"); $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/system_hasync.php'); if (!is_array($config['hasync'])) { $config['hasync'] = array(); } $a_hasync = &$config['hasync']; $checkbox_names = array( 'pfsyncenabled', 'synchronizeusers', 'synchronizeauthservers', '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['passwordfld']; write_config("Updated High Availability Sync configuration"); interfaces_sync_setup(); 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['passwordfld'] = $a_hasync['password']; $ifaces = get_configured_interface_with_descr(); $ifaces["lo0"] = "loopback"; $pgtitle = array(gettext("System"), gettext("High Availability Sync")); $shortcut_section = "carp"; include("head.inc"); ?>
State Synchronization Settings (pfsync)
Synchronize States />
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.

This setting should be enabled on all members of a failover group.

NOTE: Clicking save will force a configuration sync if it is enabled! (see Configuration Synchronization Settings below)

Synchronize Interface
If Synchronize States is enabled, it will utilize this interface for communication.
NOTE: We recommend setting this to a interface other than LAN! A dedicated interface works the best.
NOTE: You must define a IP on each machine participating in this failover group.
NOTE: You must have an IP assigned to the interface on any participating sync nodes.
pfsync Synchronize Peer IP ' />
Setting this option will force pfsync to synchronize its state table to this IP address. The default is directed multicast.
 
Configuration Synchronization Settings (XMLRPC Sync)
Synchronize Config to IP ' />
Enter the IP address of the firewall to which the selected configuration sections should be synchronized.

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!

NOTE: Do not use the Synchronize Config to IP and password option on backup cluster members!
Remote System Username ' />
Enter the webConfigurator username of the system entered above for synchronizing your configuration.

NOTE: Do not use the Synchronize Config to IP and username option on backup cluster members!
Remote System Password ' />
Enter the webConfigurator password of the system entered above for synchronizing your configuration.

NOTE: Do not use the Synchronize Config to IP and password option on backup cluster members!
Synchronize Users and Groups />
When this option is enabled, this system will automatically sync the users and groups over to the other HA host when changes are made.
Synchronize Auth Servers />
When this option is enabled, this system will automatically sync the authentication servers (e.g. LDAP, RADIUS) over to the other HA host when changes are made.
Synchronize Certificates />
When this option is enabled, this system will automatically sync the Certificate Authorities, Certificates, and Certificate Revocation Lists over to the other HA host when changes are made.
Synchronize rules />
When this option is enabled, this system will automatically sync the firewall rules to the other HA host when changes are made.
Synchronize Firewall Schedules />
When this option is enabled, this system will automatically sync the firewall schedules to the other HA host when changes are made.
Synchronize aliases />
When this option is enabled, this system will automatically sync the aliases over to the other HA host when changes are made.
Synchronize NAT />
When this option is enabled, this system will automatically sync the NAT rules over to the other HA host when changes are made.
Synchronize IPsec />
When this option is enabled, this system will automatically sync the IPsec configuration to the other HA host when changes are made.
Synchronize OpenVPN />
When this option is enabled, this system will automatically sync the OpenVPN configuration to the other HA host when changes are made. Using this option implies "Synchronize Certificates" as they are required for OpenVPN.
Synchronize DHCPD />
When this option is enabled, this system will automatically sync the DHCP Server settings over to the other HA host when changes are made. This only applies to DHCP for IPv4.
Synchronize Wake on LAN />
When this option is enabled, this system will automatically sync the WoL configuration to the other HA host when changes are made.
Synchronize Static Routes />
When this option is enabled, this system will automatically sync the Static Route configuration to the other HA host when changes are made.
Synchronize Load Balancer />
When this option is enabled, this system will automatically sync the Load Balancer configuration to the other HA host when changes are made.
Synchronize Virtual IPs />
When this option is enabled, this system will automatically sync the CARP Virtual IPs to the other HA host when changes are made.
Synchronize traffic shaper(queues) />
When this option is enabled, this system will automatically sync the traffic shaper configuration for queues to the other HA host when changes are made.
Synchronize traffic shaper(limiter) />
When this option is enabled, this system will automatically sync the traffic shaper configuration for limiters to the other HA host when changes are made.
Synchronize traffic shaper(layer7) />
When this option is enabled, this system will automatically sync the traffic shaper configuration for layer7 to the other HA host when changes are made.
Synchronize DNS Forwarder / Resolver />
When this option is enabled, this system will automatically sync the DNS Forwarder and DNS Resolver configuration to the other HA host when changes are made.
Synchronize Captive Portal />
When this option is enabled, this system will automatically sync the Captive Portal configuration to the other HA host when changes are made.
 
  " onclick="window.location.href=''" />