#!/usr/local/bin/php . 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. */ require("guiconfig.inc"); $pconfig['filteringbridge_enable'] = isset($config['bridge']['filteringbridge']); $pconfig['ipv6nat_enable'] = isset($config['diag']['ipv6nat']['enable']); $pconfig['ipv6nat_ipaddr'] = $config['diag']['ipv6nat']['ipaddr']; $pconfig['cert'] = base64_decode($config['system']['webgui']['certificate']); $pconfig['key'] = base64_decode($config['system']['webgui']['private-key']); $pconfig['disableconsolemenu'] = isset($config['system']['disableconsolemenu']); if ($_POST) { unset($input_errors); $pconfig = $_POST; /* input validation */ if ($_POST['ipv6nat_enable'] && !is_ipaddr($_POST['ipv6nat_ipaddr'])) { $input_errors[] = "You must specify an IP address to NAT IPv6 packets."; } if (($_POST['cert'] && !$_POST['key']) || ($_POST['key'] && !$_POST['cert'])) { $input_errors[] = "Certificate and key must always be specified together."; } else if ($_POST['cert'] && $_POST['key']) { if (!strstr($_POST['cert'], "BEGIN CERTIFICATE") || !strstr($_POST['cert'], "END CERTIFICATE")) $input_errors[] = "This certificate does not appear to be valid."; if (!strstr($_POST['key'], "BEGIN RSA PRIVATE KEY") || !strstr($_POST['key'], "END RSA PRIVATE KEY")) $input_errors[] = "This key does not appear to be valid."; } if (!$input_errors) { $config['bridge']['filteringbridge'] = $_POST['filteringbridge_enable'] ? true : false; $config['diag']['ipv6nat']['enable'] = $_POST['ipv6nat_enable'] ? true : false; $config['diag']['ipv6nat']['ipaddr'] = $_POST['ipv6nat_ipaddr']; $oldcert = $config['system']['webgui']['certificate']; $oldkey = $config['system']['webgui']['private-key']; $config['system']['webgui']['certificate'] = base64_encode($_POST['cert']); $config['system']['webgui']['private-key'] = base64_encode($_POST['key']); $config['system']['disableconsolemenu'] = $_POST['disableconsolemenu'] ? true : false; write_config(); if (($config['system']['webgui']['certificate'] != $oldcert) || ($config['system']['webgui']['private-key'] != $oldkey)) { touch($d_sysrebootreqd_path); } $retval = 0; if (!file_exists($d_sysrebootreqd_path)) { config_lock(); $retval = filter_configure(); $retval = interfaces_optional_configure(); config_unlock(); } $savemsg = get_std_save_message($retval); } } ?> m0n0wall webGUI - System: Advanced functions

System: Advanced functions

Note: the options on this page are intended for use by advanced users only, and there's NO support for them.

IPv6 tunneling
  onclick="enable_change(false)"> NAT encapsulated IPv6 packets (IP protocol 41/RFC2893) to:

 (IP address)
Don't forget to add a firewall rule to permit IPv6 packets!
 
Filtering bridge
  > Enable filtering bridge
This will cause bridged packets to pass through the packet filter in the same way as routed packets do (by default bridged packets are always passed). If you enable this option, you'll have to add filter rules to selectively permit traffic from bridged interfaces.
 
webGUI SSL certificate/key
Certificate
Paste a signed certificate in X.509 PEM format here.
Key
Paste an RSA private key in PEM format here.
 
Miscellaneous
  > Disable console menu
Changes to this option will take effect after a reboot.