diff options
author | Matthew Grooms <mgrooms@pfsense.org> | 2008-09-09 05:50:32 +0000 |
---|---|---|
committer | Matthew Grooms <mgrooms@pfsense.org> | 2008-09-09 05:50:32 +0000 |
commit | ab3c85535d2b84d117f0605e22c0f2ab6e799f29 (patch) | |
tree | 2a41aad4085b08a78ce02d077ebf672c4eaec9d3 /usr/local | |
parent | 486b4999528db013e00f5b8d6a4dddd055c422d4 (diff) | |
download | pfsense-ab3c85535d2b84d117f0605e22c0f2ab6e799f29.zip pfsense-ab3c85535d2b84d117f0605e22c0f2ab6e799f29.tar.gz |
Cleanup the tab format of the system advanced pages. The edges were square
instead of rounded like most pfSense pages.
Diffstat (limited to 'usr/local')
-rw-r--r-- | usr/local/www/system_advanced_admin.php | 356 | ||||
-rw-r--r-- | usr/local/www/system_advanced_firewall.php | 325 | ||||
-rw-r--r-- | usr/local/www/system_advanced_misc.php | 257 | ||||
-rw-r--r-- | usr/local/www/system_advanced_network.php | 175 | ||||
-rw-r--r-- | usr/local/www/system_advanced_sysctl.php | 172 |
5 files changed, 643 insertions, 642 deletions
diff --git a/usr/local/www/system_advanced_admin.php b/usr/local/www/system_advanced_admin.php index 179c573..9d9ba8c 100644 --- a/usr/local/www/system_advanced_admin.php +++ b/usr/local/www/system_advanced_admin.php @@ -187,188 +187,188 @@ function prot_change() { if ($savemsg) print_info_box($savemsg); ?> - <table width="100%" border="0" cellpadding="0" cellspacing="0"> - <tr> - <td> - <span class="vexpl"> - <span class="red"> - <strong>Note:</strong> + <form action="system_advanced_admin.php" method="post" name="iform" id="iform"> + <table width="100%" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td> + <span class="vexpl"> + <span class="red"> + <strong>Note:</strong> + </span> + the options on this page are intended for use by advanced users only. + <br/> </span> - the options on this page are intended for use by advanced users only. <br/> - </span> - <br/> - </td> - </tr> - <tr> - <td class="tabnavtbl"> - <ul id="tabnav"> - <?php - $tab_array = array(); - $tab_array[] = array("Admin Access", true, "system_advanced_admin.php"); - $tab_array[] = array("Firewall / NAT", false, "system_advanced_firewall.php"); - $tab_array[] = array("Networking", false, "system_advanced_network.php"); - $tab_array[] = array("Miscellaneous", false, "system_advanced_misc.php"); - $tab_array[] = array("System Tunables", false, "system_advanced_sysctl.php"); - display_top_tabs($tab_array); - ?> - </ul> - </td> - </tr> - <tr> - <td class="tabcont"> - <form action="system_advanced_admin.php" method="post" name="iform" id="iform"> - <table width="100%" border="0" cellpadding="6" cellspacing="0"> - <tr> - <td colspan="2" valign="top" class="listtopic">webConfigurator</td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Protocol</td> - <td width="78%" class="vtable"> - <?php - if ($pconfig['webguiproto'] == "http") - $http_chk = "checked"; - if ($pconfig['webguiproto'] == "https") - $https_chk = "checked"; - if (!$certs_available) - $https_disabled = "disabled"; - ?> - <input name="webguiproto" id="http_proto" type="radio" value="http" <?=$http_chk;?> onClick="prot_change()"> - HTTP - - <input name="webguiproto" id="https_proto" type="radio" value="https" <?=$https_chk;?> <?=$https_disabled;?> onClick="prot_change()"> - HTTPS - <?php if (!$certs_available): ?> - <br/> - No Certificates have been defined. You must - <a href="system_certmanager.php">Create or Import</a> - a Certificate before SSL can be enabled. - <?php endif; ?> - </td> - </tr> - <tr id="ssl_opts"> - <td width="22%" valign="top" class="vncell">SSL Certificate</td> - <td width="78%" class="vtable"> - <select name="ssl-certref" id="ssl-certref" class="formselect"> + </td> + </tr> + <tr> + <td> + <?php + $tab_array = array(); + $tab_array[] = array("Admin Access", true, "system_advanced_admin.php"); + $tab_array[] = array("Firewall / NAT", false, "system_advanced_firewall.php"); + $tab_array[] = array("Networking", false, "system_advanced_network.php"); + $tab_array[] = array("Miscellaneous", false, "system_advanced_misc.php"); + $tab_array[] = array("System Tunables", false, "system_advanced_sysctl.php"); + display_top_tabs($tab_array); + ?> + </td> + </tr> + <tr> + <td> + <div id="mainarea"> + <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0"> + <tr> + <td colspan="2" valign="top" class="listtopic">webConfigurator</td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Protocol</td> + <td width="78%" class="vtable"> <?php - foreach($a_cert as $cert): - $selected = ""; - if ($pconfig['ssl-certref'] == $cert['refid']) - $selected = "selected"; + if ($pconfig['webguiproto'] == "http") + $http_chk = "checked"; + if ($pconfig['webguiproto'] == "https") + $https_chk = "checked"; + if (!$certs_available) + $https_disabled = "disabled"; ?> - <option value="<?=$cert['refid'];?>"<?=$selected;?>><?=$cert['name'];?></option> - <?php endforeach; ?> - </select> - </td> - </tr> - <tr> - <td valign="top" class="vncell">TCP port</td> - <td class="vtable"> - <input name="webguiport" type="text" class="formfld unknown" id="webguiport" "size="5" value="<?=htmlspecialchars($config['system']['webgui']['port']);?>"> - <br> - <span class="vexpl"> - Enter a custom port number for the webConfigurator - above if you want to override the default (80 for HTTP, 443 - for HTTPS). Changes will take effect immediately after save. - </span> - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Anti-lockout</td> - <td width="78%" class="vtable"> - <?php - if($config['interfaces']['lan']) - $lockout_interface = "LAN"; - else - $lockout_interface = "WAN"; - ?> - <input name="noantilockout" type="checkbox" id="noantilockout" value="yes" <?php if ($pconfig['noantilockout']) echo "checked"; ?> /> - <strong>Disable webConfigurator anti-lockout rule</strong> - <br/> - By default, access to the webConfigurator on the <?=$lockout_interface;?> - interface is always permitted, regardless of the user-defined filter - rule set. Enable this feature to control webConfigurator access (make - sure to have a filter rule in place that allows you in, or you will - lock yourself out!). <em> Hint: the "set configure IP address" - option in the console menu resets this setting as well. </em> - </td> - </tr> - <tr> - <td colspan="2" class="list" height="12"> </td> - </tr> - <tr> - <td colspan="2" valign="top" class="listtopic">Secure Shell</td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Secure Shell Server</td> - <td width="78%" class="vtable"> - <input name="enablesshd" type="checkbox" id="enablesshd" value="yes" <?php if (isset($pconfig['enablesshd'])) echo "checked"; ?> /> - <strong>Enable Secure Shell</strong> - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Authentication Method</td> - <td width="78%" class="vtable"> - <input name="sshdkeyonly" type="checkbox" id="sshdkeyonly" value="yes" <?php if (isset($pconfig['sshdkeyonly'])) echo "checked"; ?> /> - <strong>Disable Password login for Secure Shell (rsa key only)</strong> - <br/> - When enabled, authorized keys need to be configured for each - <a href="system_usermanager.php">user</a> - that has been granted secure shell access. - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">SSH port</td> - <td width="78%" class="vtable"> - <input name="sshport" type="text" id="sshport" value="<?php echo $pconfig['sshport']; ?>" /> - <br/> - <span class="vexpl">Note: Leave this blank for the default of 22</span> - </td> - </tr> - <tr> - <td colspan="2" class="list" height="12"> </td> - </tr> - <?php if($g['platform'] == "pfSense" || $g['platform'] == "cdrom"): ?> - <tr> - <td colspan="2" valign="top" class="listtopic">Serial Communcations</td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Serial Terminal</td> - <td width="78%" class="vtable"> - <input name="enableserial" type="checkbox" id="enableserial" value="yes" <?php if (isset($pconfig['enableserial'])) echo "checked"; ?> /> - <strong>This will enable the first serial port with 9600/8/N/1</strong> - <br> - <span class="vexpl">Note: This will disable the internal video card/keyboard</span> - </td> - </tr> - <tr> - <td colspan="2" class="list" height="12"> </td> - </tr> - <?php endif; ?> - <tr> - <td colspan="2" valign="top" class="listtopic">Shell Options</td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Console menu</td> - <td width="78%" class="vtable"> - <input name="disableconsolemenu" type="checkbox" id="disableconsolemenu" value="yes" <?php if ($pconfig['disableconsolemenu']) echo "checked"; ?> /> - <strong>Password protect the console menu</strong> - <br/> - <span class="vexpl">Changes to this option will take effect after a reboot.</span> - </td> - </tr> - <tr> - <td width="22%" valign="top"> </td> - <td width="78%"><input name="Submit" type="submit" class="formbtn" value="Save" /></td> - </tr> - <tr> - <td colspan="2" class="list" height="12"> </td> - </tr> - </table> - </form> - </td> - </tr> - </table> + <input name="webguiproto" id="http_proto" type="radio" value="http" <?=$http_chk;?> onClick="prot_change()"> + HTTP + + <input name="webguiproto" id="https_proto" type="radio" value="https" <?=$https_chk;?> <?=$https_disabled;?> onClick="prot_change()"> + HTTPS + <?php if (!$certs_available): ?> + <br/> + No Certificates have been defined. You must + <a href="system_certmanager.php">Create or Import</a> + a Certificate before SSL can be enabled. + <?php endif; ?> + </td> + </tr> + <tr id="ssl_opts"> + <td width="22%" valign="top" class="vncell">SSL Certificate</td> + <td width="78%" class="vtable"> + <select name="ssl-certref" id="ssl-certref" class="formselect"> + <?php + foreach($a_cert as $cert): + $selected = ""; + if ($pconfig['ssl-certref'] == $cert['refid']) + $selected = "selected"; + ?> + <option value="<?=$cert['refid'];?>"<?=$selected;?>><?=$cert['name'];?></option> + <?php endforeach; ?> + </select> + </td> + </tr> + <tr> + <td valign="top" class="vncell">TCP port</td> + <td class="vtable"> + <input name="webguiport" type="text" class="formfld unknown" id="webguiport" "size="5" value="<?=htmlspecialchars($config['system']['webgui']['port']);?>"> + <br> + <span class="vexpl"> + Enter a custom port number for the webConfigurator + above if you want to override the default (80 for HTTP, 443 + for HTTPS). Changes will take effect immediately after save. + </span> + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Anti-lockout</td> + <td width="78%" class="vtable"> + <?php + if($config['interfaces']['lan']) + $lockout_interface = "LAN"; + else + $lockout_interface = "WAN"; + ?> + <input name="noantilockout" type="checkbox" id="noantilockout" value="yes" <?php if ($pconfig['noantilockout']) echo "checked"; ?> /> + <strong>Disable webConfigurator anti-lockout rule</strong> + <br/> + By default, access to the webConfigurator on the <?=$lockout_interface;?> + interface is always permitted, regardless of the user-defined filter + rule set. Enable this feature to control webConfigurator access (make + sure to have a filter rule in place that allows you in, or you will + lock yourself out!). <em> Hint: the "set configure IP address" + option in the console menu resets this setting as well. </em> + </td> + </tr> + <tr> + <td colspan="2" class="list" height="12"> </td> + </tr> + <tr> + <td colspan="2" valign="top" class="listtopic">Secure Shell</td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Secure Shell Server</td> + <td width="78%" class="vtable"> + <input name="enablesshd" type="checkbox" id="enablesshd" value="yes" <?php if (isset($pconfig['enablesshd'])) echo "checked"; ?> /> + <strong>Enable Secure Shell</strong> + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Authentication Method</td> + <td width="78%" class="vtable"> + <input name="sshdkeyonly" type="checkbox" id="sshdkeyonly" value="yes" <?php if (isset($pconfig['sshdkeyonly'])) echo "checked"; ?> /> + <strong>Disable Password login for Secure Shell (rsa key only)</strong> + <br/> + When enabled, authorized keys need to be configured for each + <a href="system_usermanager.php">user</a> + that has been granted secure shell access. + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">SSH port</td> + <td width="78%" class="vtable"> + <input name="sshport" type="text" id="sshport" value="<?php echo $pconfig['sshport']; ?>" /> + <br/> + <span class="vexpl">Note: Leave this blank for the default of 22</span> + </td> + </tr> + <tr> + <td colspan="2" class="list" height="12"> </td> + </tr> + <?php if($g['platform'] == "pfSense" || $g['platform'] == "cdrom"): ?> + <tr> + <td colspan="2" valign="top" class="listtopic">Serial Communcations</td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Serial Terminal</td> + <td width="78%" class="vtable"> + <input name="enableserial" type="checkbox" id="enableserial" value="yes" <?php if (isset($pconfig['enableserial'])) echo "checked"; ?> /> + <strong>This will enable the first serial port with 9600/8/N/1</strong> + <br> + <span class="vexpl">Note: This will disable the internal video card/keyboard</span> + </td> + </tr> + <tr> + <td colspan="2" class="list" height="12"> </td> + </tr> + <?php endif; ?> + <tr> + <td colspan="2" valign="top" class="listtopic">Shell Options</td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Console menu</td> + <td width="78%" class="vtable"> + <input name="disableconsolemenu" type="checkbox" id="disableconsolemenu" value="yes" <?php if ($pconfig['disableconsolemenu']) echo "checked"; ?> /> + <strong>Password protect the console menu</strong> + <br/> + <span class="vexpl">Changes to this option will take effect after a reboot.</span> + </td> + </tr> + <tr> + <td width="22%" valign="top"> </td> + <td width="78%"><input name="Submit" type="submit" class="formbtn" value="Save" /></td> + </tr> + <tr> + <td colspan="2" class="list" height="12"> </td> + </tr> + </table> + </div> + </td> + </tr> + </table> + </form> <script language="JavaScript" type="text/javascript"> <!-- prot_change(); diff --git a/usr/local/www/system_advanced_firewall.php b/usr/local/www/system_advanced_firewall.php index e48043c..f6fe868 100644 --- a/usr/local/www/system_advanced_firewall.php +++ b/usr/local/www/system_advanced_firewall.php @@ -153,175 +153,176 @@ function update_description(itemnum) { if ($savemsg) print_info_box($savemsg); ?> - <table width="100%" border="0" cellpadding="0" cellspacing="0"> - <tr> - <td> - <span class="vexpl"> - <span class="red"> - <strong>Note:</strong> + <form action="system_advanced_firewall.php" method="post" name="iform" id="iform"> + <table width="100%" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td> + <span class="vexpl"> + <span class="red"> + <strong>Note:</strong> + </span> + the options on this page are intended for use by advanced users only. + <br/> </span> - the options on this page are intended for use by advanced users only. <br/> - </span> - <br/> - </td> - </tr> - <tr> - <td class="tabnavtbl"> - <ul id="tabnav"> - <?php - $tab_array = array(); - $tab_array[] = array("Admin Access", false, "system_advanced_admin.php"); - $tab_array[] = array("Firewall / NAT", true, "system_advanced_firewall.php"); - $tab_array[] = array("Networking", false, "system_advanced_network.php"); - $tab_array[] = array("Miscellaneous", false, "system_advanced_misc.php"); - $tab_array[] = array("System Tunables", false, "system_advanced_sysctl.php"); - display_top_tabs($tab_array); - ?> + </td> + </tr> + <tr> + <td class="tabnavtbl"> + <?php + $tab_array = array(); + $tab_array[] = array("Admin Access", false, "system_advanced_admin.php"); + $tab_array[] = array("Firewall / NAT", true, "system_advanced_firewall.php"); + $tab_array[] = array("Networking", false, "system_advanced_network.php"); + $tab_array[] = array("Miscellaneous", false, "system_advanced_misc.php"); + $tab_array[] = array("System Tunables", false, "system_advanced_sysctl.php"); + display_top_tabs($tab_array); + ?> </ul> - </td> - </tr> - <tr> - <td class="tabcont"> - <form action="system_advanced_firewall.php" method="post" name="iform" id="iform"> - <table width="100%" border="0" cellpadding="6" cellspacing="0"> - <tr> - <td colspan="2" valign="top" class="listtopic">Firewall Advanced</td> - </tr> + </td> + </tr> + <tr> + <td> + <div id="mainarea"> + <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0"> + <tr> + <td colspan="2" valign="top" class="listtopic">Firewall Advanced</td> + </tr> <?php /* - <tr> - <td width="22%" valign="top" class="vncell">Traffic shaper type</td> - <td width="78%" class="vtable"> - <select name="shapertype" class="formselect"> - <option value="pfSense"<?php if($pconfig['shapertype'] == 'pfSense') echo " selected"; ?>><?= $g['product_name'] ?> (ALTQ)</option> - <option value="m0n0"<?php if($pconfig['shapertype'] == 'm0n0') echo " selected"; ?>>M0n0wall (dummynet)</option> - </select> - </td> - </tr> + <tr> + <td width="22%" valign="top" class="vncell">Traffic shaper type</td> + <td width="78%" class="vtable"> + <select name="shapertype" class="formselect"> + <option value="pfSense"<?php if($pconfig['shapertype'] == 'pfSense') echo " selected"; ?>><?= $g['product_name'] ?> (ALTQ)</option> + <option value="m0n0"<?php if($pconfig['shapertype'] == 'm0n0') echo " selected"; ?>>M0n0wall (dummynet)</option> + </select> + </td> + </tr> */ ?> - <tr> - <td width="22%" valign="top" class="vncell">FTP server compatibility</td> - <td width="78%" class="vtable"> - <input name="rfc959workaround" type="checkbox" id="rfc959workaround" value="yes" <?php if (isset($config['system']['rfc959workaround'])) echo "checked"; ?> /> - <strong>Allow data connections from the FTP command port</strong><br/> - This allows for communication with ftp servers that violate - RFC 959 by opening data connections from the command port (21). - Thes should be opened on the data port(20). This option should - not expose you to any extra risk as the firewall will still only - allow connections on a port that ftp-proxy listens on. - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">IP Do-Not-Fragment compatibility</td> - <td width="78%" class="vtable"> - <input name="scrubnodf" type="checkbox" id="scrubnodf" value="yes" <?php if (isset($config['system']['scrubnodf'])) echo "checked"; ?> /> - <strong>Clear invalid DF bits instead of dropping the packets</strong><br/> - This allows for communications with hosts that generate fragmented - packets with the don't fragment (DF) bit set. Linux NFS is known to - do this. This will cause the filter to not drop such packets but - instead clear the don't fragment bit. The filter will also randomize - the IP identification field of outgoing packets with this option on, - to compensate for operating systems that set the DF bit but set a - zero IP identification header field. - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Firewall Optimization Options</td> - <td width="78%" class="vtable"> - <select onChange="update_description(this.selectedIndex);" name="optimization" id="optimization"> - <option value="normal"<?php if($config['system']['optimization']=="normal") echo " selected"; ?>>normal</option> - <option value="high-latency"<?php if($config['system']['optimization']=="high-latency") echo " selected"; ?>>high-latency</option> - <option value="aggressive"<?php if($config['system']['optimization']=="aggressive") echo " selected"; ?>>aggressive</option> - <option value="conservative"<?php if($config['system']['optimization']=="conservative") echo " selected"; ?>>conservative</option> - </select> - <br/> - <textarea cols="60" rows="1" id="info" name="info"style="padding:5px; border:1px dashed #990000; background-color: #ffffff; color: #000000; font-size: 8pt;"></textarea> - <script language="javascript" type="text/javascript"> - update_description(document.forms[0].optimization.selectedIndex); - </script> - <br/> - Select which type of state table optimization your would like to use - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Disable Firewall</td> - <td width="78%" class="vtable"> - <input name="disablefilter" type="checkbox" id="disablefilter" value="yes" <?php if (isset($config['system']['disablefilter'])) echo "checked"; ?> /> - <strong>Disable all packet filtering.</strong> - <br/> - <span class="vexpl">Note: This converts <?= $g['product_name'] ?> into a routing only platform!<br> - Note: This will turn off NAT! - </span> - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Disable Firewall Scrub</td> - <td width="78%" class="vtable"> - <input name="disablescrub" type="checkbox" id="disablescrub" value="yes" <?php if (isset($config['system']['disablescrub'])) echo "checked"; ?> /> - <strong>Disables the PF scrubbing option which can sometimes interfere with NFS and PPTP traffic.</strong> - <br/> - Click <a href='http://www.openbsd.org/faq/pf/scrub.html' target='_new'>here</a> for more information. - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Firewall Maximum States</td> - <td width="78%" class="vtable"> - <input name="maximumstates" type="text" id="maximumstates" value="<?php echo $pconfig['maximumstates']; ?>" /> - <br/> - <strong>Maximum number of connections to hold in the firewall state table.</strong> - <br/> - <span class="vexpl">Note: Leave this blank for the default. On your system the default size is: <?= pfsense_default_state_size() ?></span> - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Static route filtering</td> - <td width="78%" class="vtable"> - <input name="bypassstaticroutes" type="checkbox" id="bypassstaticroutes" value="yes" <?php if ($pconfig['bypassstaticroutes']) echo "checked"; ?> /> - <strong>Bypass firewall rules for traffic on the same interface</strong> - <br/> - This option only applies if you have defined one or more static routes. If it is enabled, traffic that enters and - leaves through the same interface will not be checked by the firewall. This may be desirable in some situations where - multiple subnets are connected to the same interface. - <br/> - </td> - </tr> - <tr> - <td colspan="2" class="list" height="12"> </td> - </tr> - - <?php if($config['interfaces']['lan']): ?> - <tr> - <td colspan="2" valign="top" class="listtopic">Network Address Translation</td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Disable NAT Reflection</td> - <td width="78%" class="vtable"> - <input name="disablenatreflection" type="checkbox" id="disablenatreflection" value="yes" <?php if (isset($config['system']['disablenatreflection'])) echo "checked"; ?> /> - <strong>Disables the automatic creation of NAT redirect rules for access to your public IP addresses from within your internal networks. Note: Reflection only works on port forward type items and does not work for large ranges > 500 ports.</strong> - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Reflection Timeout</td> - <td width="78%" class="vtable"> - <input name="reflectiontimeout" id="reflectiontimeout" value="<?php echo $config['system']['reflectiontimeout']; ?>" /> - <strong>Enter value for Reflection timeout in seconds.</strong> - </td> - </tr> - <tr> - <td colspan="2" class="list" height="12"> </td> - </tr> - <?php endif; ?> - <tr> - <td width="22%" valign="top"> </td> - <td width="78%"><input name="Submit" type="submit" class="formbtn" value="Save" /></td> - </tr> - </table> - </form> - </td> - </tr> - </table> + <tr> + <td width="22%" valign="top" class="vncell">FTP server compatibility</td> + <td width="78%" class="vtable"> + <input name="rfc959workaround" type="checkbox" id="rfc959workaround" value="yes" <?php if (isset($config['system']['rfc959workaround'])) echo "checked"; ?> /> + <strong>Allow data connections from the FTP command port</strong><br/> + This allows for communication with ftp servers that violate + RFC 959 by opening data connections from the command port (21). + Thes should be opened on the data port(20). This option should + not expose you to any extra risk as the firewall will still only + allow connections on a port that ftp-proxy listens on. + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">IP Do-Not-Fragment compatibility</td> + <td width="78%" class="vtable"> + <input name="scrubnodf" type="checkbox" id="scrubnodf" value="yes" <?php if (isset($config['system']['scrubnodf'])) echo "checked"; ?> /> + <strong>Clear invalid DF bits instead of dropping the packets</strong><br/> + This allows for communications with hosts that generate fragmented + packets with the don't fragment (DF) bit set. Linux NFS is known to + do this. This will cause the filter to not drop such packets but + instead clear the don't fragment bit. The filter will also randomize + the IP identification field of outgoing packets with this option on, + to compensate for operating systems that set the DF bit but set a + zero IP identification header field. + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Firewall Optimization Options</td> + <td width="78%" class="vtable"> + <select onChange="update_description(this.selectedIndex);" name="optimization" id="optimization"> + <option value="normal"<?php if($config['system']['optimization']=="normal") echo " selected"; ?>>normal</option> + <option value="high-latency"<?php if($config['system']['optimization']=="high-latency") echo " selected"; ?>>high-latency</option> + <option value="aggressive"<?php if($config['system']['optimization']=="aggressive") echo " selected"; ?>>aggressive</option> + <option value="conservative"<?php if($config['system']['optimization']=="conservative") echo " selected"; ?>>conservative</option> + </select> + <br/> + <textarea cols="60" rows="1" id="info" name="info"style="padding:5px; border:1px dashed #990000; background-color: #ffffff; color: #000000; font-size: 8pt;"></textarea> + <script language="javascript" type="text/javascript"> + update_description(document.forms[0].optimization.selectedIndex); + </script> + <br/> + Select which type of state table optimization your would like to use + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Disable Firewall</td> + <td width="78%" class="vtable"> + <input name="disablefilter" type="checkbox" id="disablefilter" value="yes" <?php if (isset($config['system']['disablefilter'])) echo "checked"; ?> /> + <strong>Disable all packet filtering.</strong> + <br/> + <span class="vexpl">Note: This converts <?= $g['product_name'] ?> into a routing only platform!<br> + Note: This will turn off NAT! + </span> + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Disable Firewall Scrub</td> + <td width="78%" class="vtable"> + <input name="disablescrub" type="checkbox" id="disablescrub" value="yes" <?php if (isset($config['system']['disablescrub'])) echo "checked"; ?> /> + <strong>Disables the PF scrubbing option which can sometimes interfere with NFS and PPTP traffic.</strong> + <br/> + Click <a href='http://www.openbsd.org/faq/pf/scrub.html' target='_new'>here</a> for more information. + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Firewall Maximum States</td> + <td width="78%" class="vtable"> + <input name="maximumstates" type="text" id="maximumstates" value="<?php echo $pconfig['maximumstates']; ?>" /> + <br/> + <strong>Maximum number of connections to hold in the firewall state table.</strong> + <br/> + <span class="vexpl">Note: Leave this blank for the default. On your system the default size is: <?= pfsense_default_state_size() ?></span> + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Static route filtering</td> + <td width="78%" class="vtable"> + <input name="bypassstaticroutes" type="checkbox" id="bypassstaticroutes" value="yes" <?php if ($pconfig['bypassstaticroutes']) echo "checked"; ?> /> + <strong>Bypass firewall rules for traffic on the same interface</strong> + <br/> + This option only applies if you have defined one or more static routes. If it is enabled, traffic that enters and + leaves through the same interface will not be checked by the firewall. This may be desirable in some situations where + multiple subnets are connected to the same interface. + <br/> + </td> + </tr> + <tr> + <td colspan="2" class="list" height="12"> </td> + </tr> + + <?php if($config['interfaces']['lan']): ?> + <tr> + <td colspan="2" valign="top" class="listtopic">Network Address Translation</td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Disable NAT Reflection</td> + <td width="78%" class="vtable"> + <input name="disablenatreflection" type="checkbox" id="disablenatreflection" value="yes" <?php if (isset($config['system']['disablenatreflection'])) echo "checked"; ?> /> + <strong>Disables the automatic creation of NAT redirect rules for access to your public IP addresses from within your internal networks. Note: Reflection only works on port forward type items and does not work for large ranges > 500 ports.</strong> + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Reflection Timeout</td> + <td width="78%" class="vtable"> + <input name="reflectiontimeout" id="reflectiontimeout" value="<?php echo $config['system']['reflectiontimeout']; ?>" /> + <strong>Enter value for Reflection timeout in seconds.</strong> + </td> + </tr> + <tr> + <td colspan="2" class="list" height="12"> </td> + </tr> + <?php endif; ?> + <tr> + <td width="22%" valign="top"> </td> + <td width="78%"><input name="Submit" type="submit" class="formbtn" value="Save" /></td> + </tr> + </table> + </td> + </tr> + </div> + </table> + </form> <?php include("fend.inc"); ?> </body> diff --git a/usr/local/www/system_advanced_misc.php b/usr/local/www/system_advanced_misc.php index 4ce4d41..0dfd5aa 100644 --- a/usr/local/www/system_advanced_misc.php +++ b/usr/local/www/system_advanced_misc.php @@ -99,137 +99,136 @@ include("head.inc"); if ($savemsg) print_info_box($savemsg); ?> - <table width="100%" border="0" cellpadding="0" cellspacing="0"> - <tr> - <td> - <span class="vexpl"> - <span class="red"> - <strong>Note:</strong> + <form action="system_advanced_misc.php" method="post" name="iform" id="iform"> + <table width="100%" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td> + <span class="vexpl"> + <span class="red"> + <strong>Note:</strong> + </span> + the options on this page are intended for use by advanced users only. + <br/> </span> - the options on this page are intended for use by advanced users only. <br/> - </span> - <br/> - </td> - </tr> - <tr> - <td class="tabnavtbl"> - <ul id="tabnav"> - <?php - $tab_array = array(); - $tab_array[] = array("Admin Access", false, "system_advanced_admin.php"); - $tab_array[] = array("Firewall / NAT", false, "system_advanced_firewall.php"); - $tab_array[] = array("Networking", false, "system_advanced_network.php"); - $tab_array[] = array("Miscellaneous", true, "system_advanced_misc.php"); - $tab_array[] = array("System Tunables", false, "system_advanced_sysctl.php"); - display_top_tabs($tab_array); - ?> - </ul> - </td> - </tr> - <tr> - <td class="tabcont"> - <form action="system_advanced_misc.php" method="post" name="iform" id="iform"> - <table width="100%" border="0" cellpadding="6" cellspacing="0"> - - <tr> - <td colspan="2" valign="top" class="listtopic">Load Balancing</td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Load Balancing</td> - <td width="78%" class="vtable"> - <input name="lb_use_sticky" type="checkbox" id="lb_use_sticky" value="yes" <?php if ($pconfig['lb_use_sticky']) echo "checked=\"checked\""; ?> /> - <strong>Use sticky connections</strong><br/> - Successive connections will be redirected to the servers - in a round-robin manner with connections from the same - source being sent to the same web server. This "sticky - connection" will exist as long as there are states that - refer to this connection. Once the states expire, so will - the sticky connection. Further connections from that host - will be redirected to the next web server in the round - robin. - </td> - </tr> - <tr> - <td colspan="2" class="list" height="12"> </td> - </tr> - <?php - /* - <tr> - <td colspan="2" valign="top" class="listtopic">Traffic Shaper</td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Traffic shaper type</td> - <td width="78%" class="vtable"> - <select name="shapertype" class="formselect"> - <option value="pfSense"<?php if($pconfig['shapertype'] == 'pfSense') echo " selected"; ?>><?= $g['product_name'] ?> (ALTQ)</option> - <option value="m0n0"<?php if($pconfig['shapertype'] == 'm0n0') echo " selected"; ?>>M0n0wall (dummynet)</option> - </select> - </td> - </tr> - <tr> - <td colspan="2" class="list" height="12"> </td> - </tr> - */ - ?> - <tr> - <td colspan="2" valign="top" class="listtopic">IP Security</td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">IPsec SA preferral</td> - <td width="78%" class="vtable"> - <input name="preferoldsa_enable" type="checkbox" id="preferoldsa_enable" value="yes" <?php if ($pconfig['preferoldsa_enable']) echo "checked"; ?> /> - <strong>Prefer older IPsec SAs</strong> - <br /> - By default, if several SAs match, the newest one is - preferred if it's at least 30 seconds old. Select this - option to always prefer old SAs over new ones. - </td> - </tr> - <tr> - <td colspan="2" class="list" height="12"> </td> - </tr> - <?php if($g['platform'] == "pfSenseDISABLED"): ?> - <tr> - <td colspan="2" valign="top" class="listtopic">Hardware Settings</td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Hard disk standby time </td> - <td width="78%" class="vtable"> - <select name="harddiskstandby" class="formselect"> - <?php - ## Values from ATA-2 http://www.t13.org/project/d0948r3-ATA-2.pdf (Page 66) - $sbvals = explode(" ", "0.5,6 1,12 2,24 3,36 4,48 5,60 7.5,90 10,120 15,180 20,240 30,241 60,242"); - ?> - <option value="" <?php if(!$pconfig['harddiskstandby']) echo('selected');?>>Always on</option> - <?php - foreach ($sbvals as $sbval): - list($min,$val) = explode(",", $sbval); - ?> - <option value="<?=$val;?>" <?php if($pconfig['harddiskstandby'] == $val) echo('selected');?>><?=$min;?> minutes</option> - <?php endforeach; ?> - </select> - <br/> - Puts the hard disk into standby mode when the selected amount of time after the last - access has elapsed. <em>Do not set this for CF cards.</em> - </td> - </tr> - <tr> - <td colspan="2" class="list" height="12"> </td> - </tr> - <?php endif; ?> - - <tr> - <td width="22%" valign="top"> </td> - <td width="78%"> - <input name="Submit" type="submit" class="formbtn" value="Save" /> - </td> - </tr> - </table> - </form> - </td> - </tr> - </table> + </td> + </tr> + <tr> + <td> + <?php + $tab_array = array(); + $tab_array[] = array("Admin Access", false, "system_advanced_admin.php"); + $tab_array[] = array("Firewall / NAT", false, "system_advanced_firewall.php"); + $tab_array[] = array("Networking", false, "system_advanced_network.php"); + $tab_array[] = array("Miscellaneous", true, "system_advanced_misc.php"); + $tab_array[] = array("System Tunables", false, "system_advanced_sysctl.php"); + display_top_tabs($tab_array); + ?> + </td> + </tr> + <tr> + <td> + <div id="mainarea"> + <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0"> + <tr> + <td colspan="2" valign="top" class="listtopic">Load Balancing</td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Load Balancing</td> + <td width="78%" class="vtable"> + <input name="lb_use_sticky" type="checkbox" id="lb_use_sticky" value="yes" <?php if ($pconfig['lb_use_sticky']) echo "checked=\"checked\""; ?> /> + <strong>Use sticky connections</strong><br/> + Successive connections will be redirected to the servers + in a round-robin manner with connections from the same + source being sent to the same web server. This "sticky + connection" will exist as long as there are states that + refer to this connection. Once the states expire, so will + the sticky connection. Further connections from that host + will be redirected to the next web server in the round + robin. + </td> + </tr> + <tr> + <td colspan="2" class="list" height="12"> </td> + </tr> +<?php +/* + <tr> + <td colspan="2" valign="top" class="listtopic">Traffic Shaper</td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Traffic shaper type</td> + <td width="78%" class="vtable"> + <select name="shapertype" class="formselect"> + <option value="pfSense"<?php if($pconfig['shapertype'] == 'pfSense') echo " selected"; ?>><?= $g['product_name'] ?> (ALTQ)</option> + <option value="m0n0"<?php if($pconfig['shapertype'] == 'm0n0') echo " selected"; ?>>M0n0wall (dummynet)</option> + </select> + </td> + </tr> + <tr> + <td colspan="2" class="list" height="12"> </td> + </tr> +*/ +?> + <tr> + <td colspan="2" valign="top" class="listtopic">IP Security</td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">IPsec SA preferral</td> + <td width="78%" class="vtable"> + <input name="preferoldsa_enable" type="checkbox" id="preferoldsa_enable" value="yes" <?php if ($pconfig['preferoldsa_enable']) echo "checked"; ?> /> + <strong>Prefer older IPsec SAs</strong> + <br /> + By default, if several SAs match, the newest one is + preferred if it's at least 30 seconds old. Select this + option to always prefer old SAs over new ones. + </td> + </tr> + <tr> + <td colspan="2" class="list" height="12"> </td> + </tr> + <?php if($g['platform'] == "pfSenseDISABLED"): ?> + <tr> + <td colspan="2" valign="top" class="listtopic">Hardware Settings</td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Hard disk standby time </td> + <td width="78%" class="vtable"> + <select name="harddiskstandby" class="formselect"> + <?php + ## Values from ATA-2 http://www.t13.org/project/d0948r3-ATA-2.pdf (Page 66) + $sbvals = explode(" ", "0.5,6 1,12 2,24 3,36 4,48 5,60 7.5,90 10,120 15,180 20,240 30,241 60,242"); + ?> + <option value="" <?php if(!$pconfig['harddiskstandby']) echo('selected');?>>Always on</option> + <?php + foreach ($sbvals as $sbval): + list($min,$val) = explode(",", $sbval); + ?> + <option value="<?=$val;?>" <?php if($pconfig['harddiskstandby'] == $val) echo('selected');?>><?=$min;?> minutes</option> + <?php endforeach; ?> + </select> + <br/> + Puts the hard disk into standby mode when the selected amount of time after the last + access has elapsed. <em>Do not set this for CF cards.</em> + </td> + </tr> + <tr> + <td colspan="2" class="list" height="12"> </td> + </tr> + <?php endif; ?> + + <tr> + <td width="22%" valign="top"> </td> + <td width="78%"> + <input name="Submit" type="submit" class="formbtn" value="Save" /> + </td> + </tr> + </table> + </div> + </td> + </tr> + </table> + </form> <?php include("fend.inc"); ?> </body> diff --git a/usr/local/www/system_advanced_network.php b/usr/local/www/system_advanced_network.php index 321c37f..1f9d12d 100644 --- a/usr/local/www/system_advanced_network.php +++ b/usr/local/www/system_advanced_network.php @@ -135,96 +135,95 @@ function enable_change(enable_over) { if ($savemsg) print_info_box($savemsg); ?> - <table width="100%" border="0" cellpadding="0" cellspacing="0"> - <tr> - <td> - <span class="vexpl"> - <span class="red"> - <strong>Note:</strong> + <form action="system_advanced_network.php" method="post" name="iform" id="iform"> + <table width="100%" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td> + <span class="vexpl"> + <span class="red"> + <strong>Note:</strong> + </span> + the options on this page are intended for use by advanced users only. + <br/> </span> - the options on this page are intended for use by advanced users only. <br/> - </span> - <br/> - </td> - </tr> - <tr> - <td class="tabnavtbl"> - <ul id="tabnav"> - <?php - $tab_array = array(); - $tab_array[] = array("Admin Access", false, "system_advanced_admin.php"); - $tab_array[] = array("Firewall / NAT", false, "system_advanced_firewall.php"); - $tab_array[] = array("Networking", true, "system_advanced_network.php"); - $tab_array[] = array("Miscellaneous", false, "system_advanced_misc.php"); - $tab_array[] = array("System Tunables", false, "system_advanced_sysctl.php"); - display_top_tabs($tab_array); - ?> - </ul> - </td> - </tr> - <tr> - <td class="tabcont"> - <form action="system_advanced_network.php" method="post" name="iform" id="iform"> - <table width="100%" border="0" cellpadding="6" cellspacing="0"> - - <tr> - <td colspan="2" valign="top" class="listtopic">IPv6 Options</td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">IPv6 over IPv4 Tunneling</td> - <td width="78%" class="vtable"> - <input name="ipv6nat_enable" type="checkbox" id="ipv6nat_enable" value="yes" <?php if ($pconfig['ipv6nat_enable']) echo "checked"; ?> onclick="enable_change(false)" /> - <strong>Enable IPv4 NAT encapsulation of IPv6 packets</strong><br/> - This provides an RFC 2893 compatibility mechanism - that can be used to tunneling IPv6 packets over IPv4 - routing infrastructures. If enabled, don't forget to - add a firewall rule to permit IPv6 packets.<br/> - <br/> - IP address : - <input name="ipv6nat_ipaddr" type="text" class="formfld unknown" id="ipv6nat_ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipv6nat_ipaddr']);?>" /> - </td> - </tr> - <tr> - <td colspan="2" class="list" height="12"> </td> - </tr> - <tr> - <td colspan="2" valign="top" class="listtopic">Network Interfaces</td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Device polling</td> - <td width="78%" class="vtable"> - <input name="polling_enable" type="checkbox" id="polling_enable" value="yes" <?php if ($pconfig['polling_enable']) echo "checked"; ?>> - <strong>Enable device polling</strong><br> - Device polling is a technique that lets the system periodically poll network devices for new data instead of relying on interrupts. This prevents your webConfigurator, SSH, etc. from being inaccessible due to interrupt floods when under extreme load. Generally this is not recommended. - Not all NICs support polling; see the <?= $g['product_name'] ?> homepage for a list of supported cards. - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Hardware Checksum Offloading</td> - <td width="78%" class="vtable"> - <input name="disablechecksumoffloading" type="checkbox" id="disablechecksumoffloading" value="yes" <?php if (isset($config['system']['disablechecksumoffloading'])) echo "checked"; ?> /> - <strong>Disable hardware checksum offload.</strong><br> - This option will hardware assisted checksum offloading. FreeBSD sometimes has difficulties with certain drivers. - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncell">Arp Handling</td> - <td width="78%" class="vtable"> - <input name="sharednet" type="checkbox" id="sharednet" value="yes" <?php if (isset($pconfig['sharednet'])) echo "checked"; ?> /> - <strong>Suppress ARP messages</strong><br> - This option will suppress ARP messages when interfaces share the same physical network</strong> - </td> - </tr> - <tr> - <td width="22%" valign="top"> </td> - <td width="78%"><input name="Submit" type="submit" class="formbtn" value="Save" /></td> - </tr> - </table> - </form> - </td> - </tr> - </table> + </td> + </tr> + <tr> + <td> + <?php + $tab_array = array(); + $tab_array[] = array("Admin Access", false, "system_advanced_admin.php"); + $tab_array[] = array("Firewall / NAT", false, "system_advanced_firewall.php"); + $tab_array[] = array("Networking", true, "system_advanced_network.php"); + $tab_array[] = array("Miscellaneous", false, "system_advanced_misc.php"); + $tab_array[] = array("System Tunables", false, "system_advanced_sysctl.php"); + display_top_tabs($tab_array); + ?> + </td> + </tr> + <tr> + <td> + <div id="mainarea"> + <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0"> + <tr> + <td colspan="2" valign="top" class="listtopic">IPv6 Options</td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">IPv6 over IPv4 Tunneling</td> + <td width="78%" class="vtable"> + <input name="ipv6nat_enable" type="checkbox" id="ipv6nat_enable" value="yes" <?php if ($pconfig['ipv6nat_enable']) echo "checked"; ?> onclick="enable_change(false)" /> + <strong>Enable IPv4 NAT encapsulation of IPv6 packets</strong><br/> + This provides an RFC 2893 compatibility mechanism + that can be used to tunneling IPv6 packets over IPv4 + routing infrastructures. If enabled, don't forget to + add a firewall rule to permit IPv6 packets.<br/> + <br/> + IP address : + <input name="ipv6nat_ipaddr" type="text" class="formfld unknown" id="ipv6nat_ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipv6nat_ipaddr']);?>" /> + </td> + </tr> + <tr> + <td colspan="2" class="list" height="12"> </td> + </tr> + <tr> + <td colspan="2" valign="top" class="listtopic">Network Interfaces</td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Device polling</td> + <td width="78%" class="vtable"> + <input name="polling_enable" type="checkbox" id="polling_enable" value="yes" <?php if ($pconfig['polling_enable']) echo "checked"; ?>> + <strong>Enable device polling</strong><br> + Device polling is a technique that lets the system periodically poll network devices for new data instead of relying on interrupts. This prevents your webConfigurator, SSH, etc. from being inaccessible due to interrupt floods when under extreme load. Generally this is not recommended. + Not all NICs support polling; see the <?= $g['product_name'] ?> homepage for a list of supported cards. + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Hardware Checksum Offloading</td> + <td width="78%" class="vtable"> + <input name="disablechecksumoffloading" type="checkbox" id="disablechecksumoffloading" value="yes" <?php if (isset($config['system']['disablechecksumoffloading'])) echo "checked"; ?> /> + <strong>Disable hardware checksum offload.</strong><br> + This option will hardware assisted checksum offloading. FreeBSD sometimes has difficulties with certain drivers. + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncell">Arp Handling</td> + <td width="78%" class="vtable"> + <input name="sharednet" type="checkbox" id="sharednet" value="yes" <?php if (isset($pconfig['sharednet'])) echo "checked"; ?> /> + <strong>Suppress ARP messages</strong><br> + This option will suppress ARP messages when interfaces share the same physical network</strong> + </td> + </tr> + <tr> + <td width="22%" valign="top"> </td> + <td width="78%"><input name="Submit" type="submit" class="formbtn" value="Save" /></td> + </tr> + </table> + </div> + </td> + </tr> + </table> + </form> <script language="JavaScript" type="text/javascript"> <!-- enable_change(false); diff --git a/usr/local/www/system_advanced_sysctl.php b/usr/local/www/system_advanced_sysctl.php index 5e2fd79..a81494e 100644 --- a/usr/local/www/system_advanced_sysctl.php +++ b/usr/local/www/system_advanced_sysctl.php @@ -134,7 +134,7 @@ include("head.inc"); print_input_errors($input_errors); if ($savemsg) print_info_box($savemsg); - if (file_exists($d_sysctldirty_path)) + if (file_exists($d_sysctldirty_path) && ($act != "edit" )) print_info_box_np("The firewall tunables have changed. You must apply the configuration to take affect."); ?> </form> @@ -152,8 +152,7 @@ include("head.inc"); </td> </tr> <tr> - <td class="tabnavtbl"> - <ul id="tabnav"> + <td> <?php $tab_array = array(); $tab_array[] = array("Admin Access", false, "system_advanced_admin.php"); @@ -163,103 +162,106 @@ include("head.inc"); $tab_array[] = array("System Tunables", true, "system_advanced_sysctl.php"); display_top_tabs($tab_array); ?> - </ul> </td> </tr> <?php if ($act != "edit" ): ?> <tr> - <td class="tabcont"> - <table width="100%" border="0" cellpadding="6" cellspacing="0"> - <tr> - <td width="20%" class="listhdrr">Tunable Name</td> - <td width="60%" class="listhdrr">Description</td> - <td width="20%" class="listhdrr">Value</td> - </tr> - <?php $i = 0; foreach ($config['sysctl']['item'] as $tunable): ?> - <tr> - <td class="listlr" ondblclick="document.location='firewall_system_tunables_edit.php?id=<?=$i;?>';"> - <?php echo $tunable['tunable']; ?> - </td> - <td class="listr" align="left" ondblclick="document.location='firewall_system_tunables_edit.php?id=<?=$i;?>';"> - <?php echo $tunable['desc']; ?> - </td> - <td class="listr" align="left" ondblclick="document.location='firewall_system_tunables_edit.php?id=<?=$i;?>';"> - <?php echo $tunable['value']; ?> - </td> - <td class="list" nowrap> - <table border="0" cellspacing="0" cellpadding="1"> - <tr> - <td valign="middle"> - <a href="system_advanced_sysctl.php?act=edit&id=<?=$i;?>"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" alt="" /> - </a> - </td> - <td valign="middle"> - <a href="system_advanced_sysctl.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this entry?')"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="" /> - </a> - </td> - </tr> - </table> - </td> - </tr> - <?php $i++; endforeach; ?> - <tr> - <td class="list" colspan="3"> - </td> - <td class="list"> - <table border="0" cellspacing="0" cellpadding="1"> - <tr> - <td valign="middle"> - <a href="firewall_system_tunables_edit.php"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="" /> - </a> - </td> - </tr> - </table> - </td> - </tr> - </table> - </td> - </tr> - <? else: ?> - <tr> - <td class="tabcont"> - <form action="system_advanced_sysctl.php" method="post" name="iform" id="iform"> - <table width="100%" border="0" cellpadding="6" cellspacing="0"> + <td> + <div id="mainarea"> + <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0"> <tr> - <td colspan="2" valign="top" class="listtopic">Edit system tunable</td> + <td width="20%" class="listhdrr">Tunable Name</td> + <td width="60%" class="listhdrr">Description</td> + <td width="20%" class="listhdrr">Value</td> </tr> + <?php $i = 0; foreach ($config['sysctl']['item'] as $tunable): ?> <tr> - <td width="22%" valign="top" class="vncellreq">Tunable</td> - <td width="78%" class="vtable"> - <input size="65" name="tunable" value="<?php echo $pconfig['tunable']; ?>"> + <td class="listlr" ondblclick="document.location='firewall_system_tunables_edit.php?id=<?=$i;?>';"> + <?php echo $tunable['tunable']; ?> </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncellreq">Description</td> - <td width="78%"> - <textarea rows="7" cols="50" name="desc"><?php echo $pconfig['desc']; ?></textarea> + <td class="listr" align="left" ondblclick="document.location='firewall_system_tunables_edit.php?id=<?=$i;?>';"> + <?php echo $tunable['desc']; ?> </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncellreq">Value</td> - <td width="78%"> - <input size="65" name="value" value="<?php echo $pconfig['value']; ?>"> + <td class="listr" align="left" ondblclick="document.location='firewall_system_tunables_edit.php?id=<?=$i;?>';"> + <?php echo $tunable['value']; ?> + </td> + <td class="list" nowrap> + <table border="0" cellspacing="0" cellpadding="1"> + <tr> + <td valign="middle"> + <a href="system_advanced_sysctl.php?act=edit&id=<?=$i;?>"> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" alt="" /> + </a> + </td> + <td valign="middle"> + <a href="system_advanced_sysctl.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this entry?')"> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="" /> + </a> + </td> + </tr> + </table> </td> </tr> + <?php $i++; endforeach; ?> <tr> - <td width="22%" valign="top"> </td> - <td width="78%"> - <input id="submit" name="Submit" type="submit" class="formbtn" value="Save" /> - <input id="cancelbutton" name="cancelbutton" type="button" class="formbtn" value="Cancel" onclick="history.back()" /> - <?php if (isset($id) && $a_tunable[$id]): ?> - <input name="id" type="hidden" value="<?=$id;?>" /> - <?php endif; ?> + <td class="list" colspan="3"> + </td> + <td class="list"> + <table border="0" cellspacing="0" cellpadding="1"> + <tr> + <td valign="middle"> + <a href="firewall_system_tunables_edit.php"> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="" /> + </a> + </td> + </tr> + </table> </td> </tr> </table> - </form> + </div> + </td> + </tr> + <? else: ?> + <tr> + <td> + <div id="mainarea"> + <form action="system_advanced_sysctl.php" method="post" name="iform" id="iform"> + <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0"> + <tr> + <td colspan="2" valign="top" class="listtopic">Edit system tunable</td> + </tr> + <tr> + <td width="22%" valign="top" class="vncellreq">Tunable</td> + <td width="78%" class="vtable"> + <input size="65" name="tunable" value="<?php echo $pconfig['tunable']; ?>"> + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncellreq">Description</td> + <td width="78%" class="vtable"> + <textarea rows="7" cols="50" name="desc"><?php echo $pconfig['desc']; ?></textarea> + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncellreq">Value</td> + <td width="78%" class="vtable"> + <input size="65" name="value" value="<?php echo $pconfig['value']; ?>"> + </td> + </tr> + <tr> + <td width="22%" valign="top"> </td> + <td width="78%"> + <input id="submit" name="Submit" type="submit" class="formbtn" value="Save" /> + <input id="cancelbutton" name="cancelbutton" type="button" class="formbtn" value="Cancel" onclick="history.back()" /> + <?php if (isset($id) && $a_tunable[$id]): ?> + <input name="id" type="hidden" value="<?=$id;?>" /> + <?php endif; ?> + </td> + </tr> + </table> + </form> + </div> </td> </tr> <? endif; ?> |