75 |
75 |
$pconfig['pf'] = isset($config['snmpd']['modules']['pf']);
|
76 |
76 |
$pconfig['hostres'] = isset($config['snmpd']['modules']['hostres']);
|
77 |
77 |
$pconfig['bridge'] = isset($config['snmpd']['modules']['bridge']);
|
78 |
|
$pconfig['bindlan'] = isset($config['snmpd']['bindlan']);
|
|
78 |
$pconfig['bindip'] = isset($config['snmpd']['bindip']);
|
79 |
79 |
|
80 |
80 |
if ($_POST) {
|
81 |
81 |
|
... | ... | |
146 |
146 |
$config['snmpd']['modules']['pf'] = $_POST['pf'] ? true : false;
|
147 |
147 |
$config['snmpd']['modules']['hostres'] = $_POST['hostres'] ? true : false;
|
148 |
148 |
$config['snmpd']['modules']['bridge'] = $_POST['bridge'] ? true : false;
|
149 |
|
$config['snmpd']['bindlan'] = $_POST['bindlan'] ? true : false;
|
|
149 |
$config['snmpd']['bindip'] = $_POST['bindip'];
|
150 |
150 |
|
151 |
151 |
write_config();
|
152 |
152 |
|
... | ... | |
207 |
207 |
document.iform.syscontact.disabled = false;
|
208 |
208 |
document.iform.rocommunity.disabled = false;
|
209 |
209 |
document.iform.trapenable.disabled = false;
|
210 |
|
//document.iform.bindlan.disabled = false;
|
211 |
210 |
/* disabled until some docs show up on what this does.
|
212 |
211 |
document.iform.rwenable.disabled = false;
|
213 |
212 |
if( document.iform.rwenable.checked == true )
|
... | ... | |
257 |
256 |
document.iform.pf.disabled = true;
|
258 |
257 |
document.iform.hostres.disabled = true;
|
259 |
258 |
//document.iform.bridge.disabled = true;
|
260 |
|
//document.iform.bindlan.disabled = true;
|
261 |
259 |
}
|
262 |
260 |
}
|
263 |
261 |
//-->
|
... | ... | |
384 |
382 |
<input name="hostres" type="checkbox" id="hostres" value="yes" onClick="check_deps()" <?php if ($pconfig['hostres']) echo "checked"; ?> ><?=gettext("Host Resources (Requires MibII)");?>
|
385 |
383 |
</td>
|
386 |
384 |
</tr>
|
387 |
|
<?php if($config['interfaces']['lan']): ?>
|
388 |
|
<tr>
|
389 |
|
<td width="22%" valign="top" class="vtable"></td>
|
390 |
|
<td width="78%" class="vtable">
|
391 |
|
<input name="bindlan" type="checkbox" value="yes" <?php if ($pconfig['bindlan']) echo "checked"; ?>> <strong><?=gettext("Bind to LAN interface only");?></strong>
|
392 |
|
<br>
|
393 |
|
<?=gettext("This option can be useful when trying to access the SNMP agent".
|
394 |
|
" by the LAN interface's IP address through a VPN tunnel terminated on the WAN interface.");?></td>
|
395 |
|
</tr>
|
396 |
|
<?php endif; ?>
|
|
385 |
|
|
386 |
<tr><td> </td></tr>
|
|
387 |
|
|
388 |
<tr>
|
|
389 |
<td colspan="2" valign="top" class="optsect_t">
|
|
390 |
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
|
391 |
<tr><td class="optsect_s"><strong><?=gettext("Interface Binding");?></strong></td>
|
|
392 |
<td align="right" class="optsect_s"> </td></tr>
|
|
393 |
</table></td>
|
|
394 |
</tr>
|
|
395 |
<tr>
|
|
396 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Bind Interface"); ?></td>
|
|
397 |
<td width="78%" class="vtable">
|
|
398 |
<select name="bindip" class="formselect">
|
|
399 |
<option value="">All</option>
|
|
400 |
<?php $listenips = get_possible_listen_ips();
|
|
401 |
foreach ($listenips as $lip):
|
|
402 |
$selected = "";
|
|
403 |
if ($lip['value'] == $pconfig['bindip'])
|
|
404 |
$selected = "selected";
|
|
405 |
?>
|
|
406 |
<option value="<?=$lip['value'];?>" <?=$selected;?>>
|
|
407 |
<?=htmlspecialchars($lip['name']);?>
|
|
408 |
</option>
|
|
409 |
<?php endforeach; ?>
|
|
410 |
</tr>
|
397 |
411 |
<tr>
|
398 |
412 |
<td width="22%" valign="top"> </td>
|
399 |
413 |
<td width="78%">
|
Change SNMP binding option to work on any eligible interface/VIP. Fixes #2158