summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-10-24 16:32:12 -0400
committerjim-p <jimp@pfsense.org>2013-10-24 16:34:38 -0400
commit53c5407e646028a003b2765a87dd3316b21a9497 (patch)
tree4ea3c400bf6ad68af3a6686765452b4828612063 /usr/local/www
parent785158c6c48e4e1842791d3b33d9b0395332991d (diff)
downloadpfsense-53c5407e646028a003b2765a87dd3316b21a9497.zip
pfsense-53c5407e646028a003b2765a87dd3316b21a9497.tar.gz
Add source address selection to syslog settings, so it can work more effectively over a VPN. Fixes #355
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/diag_logs_settings.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/usr/local/www/diag_logs_settings.php b/usr/local/www/diag_logs_settings.php
index 8e7513c..9c84f84 100755
--- a/usr/local/www/diag_logs_settings.php
+++ b/usr/local/www/diag_logs_settings.php
@@ -52,6 +52,8 @@ $pconfig['nentries'] = $config['syslog']['nentries'];
$pconfig['remoteserver'] = $config['syslog']['remoteserver'];
$pconfig['remoteserver2'] = $config['syslog']['remoteserver2'];
$pconfig['remoteserver3'] = $config['syslog']['remoteserver3'];
+$pconfig['sourceip'] = $config['syslog']['sourceip'];
+$pconfig['ipproto'] = $config['syslog']['ipproto'];
$pconfig['filter'] = isset($config['syslog']['filter']);
$pconfig['dhcp'] = isset($config['syslog']['dhcp']);
$pconfig['portalauth'] = isset($config['syslog']['portalauth']);
@@ -106,6 +108,8 @@ if ($_POST) {
$config['syslog']['remoteserver'] = $_POST['remoteserver'];
$config['syslog']['remoteserver2'] = $_POST['remoteserver2'];
$config['syslog']['remoteserver3'] = $_POST['remoteserver3'];
+ $config['syslog']['sourceip'] = $_POST['sourceip'];
+ $config['syslog']['ipproto'] = $_POST['ipproto'];
$config['syslog']['filter'] = $_POST['filter'] ? true : false;
$config['syslog']['dhcp'] = $_POST['dhcp'] ? true : false;
$config['syslog']['portalauth'] = $_POST['portalauth'] ? true : false;
@@ -325,6 +329,40 @@ function check_everything() {
<td colspan="2" valign="top" class="listtopic"><?=gettext("Remote Logging Options");?></td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Source Address"); ?></td>
+ <td width="78%" class="vtable">
+ <select name="sourceip" class="formselect">
+ <option value="">Default (any)</option>
+ <?php $sourceips = get_possible_traffic_source_addresses(false);
+ foreach ($sourceips as $sip):
+ $selected = "";
+ if (!link_interface_to_bridge($sip['value']) && ($sip['value'] == $pconfig['sourceip']))
+ $selected = 'selected="selected"';
+ ?>
+ <option value="<?=$sip['value'];?>" <?=$selected;?>>
+ <?=htmlspecialchars($sip['name']);?>
+ </option>
+ <?php endforeach; ?>
+ </select>
+ <br/>
+ <?= gettext("This option will allow the logging daemon to bind to a single IP address, rather than all IP addresses."); ?>
+ <?= gettext("If you pick a single IP, remote syslog severs must all be of that IP type. If you wish to mix IPv4 and IPv6 remote syslog servers, you must bind to all interfaces."); ?>
+ <br/><br/>
+ <?= gettext("NOTE: If an IP address cannot be located on the chosen interface, the daemon will bind to all addresses."); ?>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("IP Protocol"); ?></td>
+ <td width="78%" class="vtable">
+ <select name="ipproto" class="formselect">
+ <option value="ipv4" <?php if ($ipproto == "ipv4") echo 'selected="selected"' ?>>IPv4</option>
+ <option value="ipv6" <?php if ($ipproto == "ipv6") echo 'selected="selected"' ?>>IPv6</option>
+ </select>
+ <br/>
+ <?= gettext("This option is only used when a non-default address is chosen as the source above. This option only expresses a preference; If an IP address of the selected type is not found on the chosen interface, the other type will be tried."); ?>
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Enable Remote Logging");?></td>
<td width="78%" class="vtable"> <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(false)">
<strong><?=gettext("Send log messages to remote syslog server");?></strong></td>
OpenPOWER on IntegriCloud