Project

General

Profile

Download (16.7 KB) Statistics
| Branch: | Tag: | Revision:
1 5b237745 Scott Ullrich
<?php 
2 b46bfcf5 Bill Marquette
/* $Id$ */
3 5b237745 Scott Ullrich
/*
4
	services_snmp.php
5
	part of m0n0wall (http://m0n0.ch/wall)
6
	
7
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
8
	All rights reserved.
9
	
10
	Redistribution and use in source and binary forms, with or without
11
	modification, are permitted provided that the following conditions are met:
12
	
13
	1. Redistributions of source code must retain the above copyright notice,
14
	   this list of conditions and the following disclaimer.
15
	
16
	2. Redistributions in binary form must reproduce the above copyright
17
	   notice, this list of conditions and the following disclaimer in the
18
	   documentation and/or other materials provided with the distribution.
19
	
20
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
21
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
24
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
	POSSIBILITY OF SUCH DAMAGE.
30
*/
31 1d333258 Scott Ullrich
/*
32
	pfSense_MODULE:	snmp
33
*/
34 5b237745 Scott Ullrich
35 6b07c15a Matthew Grooms
##|+PRIV
36
##|*IDENT=page-services-snmp
37
##|*NAME=Services: SNMP page
38
##|*DESCR=Allow access to the 'Services: SNMP' page.
39
##|*MATCH=services_snmp.php*
40
##|-PRIV
41
42 5b237745 Scott Ullrich
require("guiconfig.inc");
43 4e865673 Carlos Eduardo Ramos
require_once("functions.inc");
44 5b237745 Scott Ullrich
45
if (!is_array($config['snmpd'])) {
46
	$config['snmpd'] = array();
47
	$config['snmpd']['rocommunity'] = "public";
48 3805bfdd John Fleming
	$config['snmpd']['pollport'] = "161";
49 5b237745 Scott Ullrich
}
50
51 3805bfdd John Fleming
if (!is_array($config['snmpd']['modules'])) {
52
	$config['snmpd']['modules'] = array();
53
	$config['snmpd']['modules']['mibii'] = true;
54
	$config['snmpd']['modules']['netgraph'] = true;
55
	$config['snmpd']['modules']['pf'] = true;
56 95fb49e8 Seth Mos
	$config['snmpd']['modules']['hostres'] = true;
57
	$config['snmpd']['modules']['bridge'] = true;
58 3805bfdd John Fleming
}
59 4f4d63d8 John Fleming
$pconfig['enable'] = isset($config['snmpd']['enable']);
60 3805bfdd John Fleming
$pconfig['pollport'] = $config['snmpd']['pollport'];
61 5b237745 Scott Ullrich
$pconfig['syslocation'] = $config['snmpd']['syslocation'];
62
$pconfig['syscontact'] = $config['snmpd']['syscontact'];
63
$pconfig['rocommunity'] = $config['snmpd']['rocommunity'];
64 4f4d63d8 John Fleming
/* disabled until some docs show up on what this does.
65
$pconfig['rwenable'] = isset($config['snmpd']['rwenable']);
66
$pconfig['rwcommunity'] = $config['snmpd']['rwcommunity'];
67
*/
68
$pconfig['trapenable'] = isset($config['snmpd']['trapenable']);
69
$pconfig['trapserver'] = $config['snmpd']['trapserver'];
70
$pconfig['trapserverport'] = $config['snmpd']['trapserverport'];
71 8c3c9dc2 John Fleming
$pconfig['trapstring'] = $config['snmpd']['trapstring'];
72 5b237745 Scott Ullrich
73 3805bfdd John Fleming
$pconfig['mibii'] = isset($config['snmpd']['modules']['mibii']);
74
$pconfig['netgraph'] = isset($config['snmpd']['modules']['netgraph']);
75
$pconfig['pf'] = isset($config['snmpd']['modules']['pf']);
76 95fb49e8 Seth Mos
$pconfig['hostres'] = isset($config['snmpd']['modules']['hostres']);
77
$pconfig['bridge'] = isset($config['snmpd']['modules']['bridge']);
78 7cbad422 Scott Ullrich
$pconfig['bindlan'] = isset($config['snmpd']['bindlan']);
79 3805bfdd John Fleming
80 5b237745 Scott Ullrich
if ($_POST) {
81
82
	unset($input_errors);
83
	$pconfig = $_POST;
84
85
	/* input validation */
86
	if ($_POST['enable']) {
87 00686fee pierrepomes
		if (strstr($_POST['syslocation'],"#")) $input_errors[] = gettext("Invalid character '#' in system location");
88
 		if (strstr($_POST['syscontact'],"#")) $input_errors[] = gettext("Invalid character '#' in system contact");
89
		if (strstr($_POST['rocommunity'],"#")) $input_errors[] = gettext("Invalid character '#' in read community string");
90
91 5b237745 Scott Ullrich
		$reqdfields = explode(" ", "rocommunity");
92 3d9bee96 Rafael Lucas
		$reqdfieldsn = array(gettext("Community"));
93 3805bfdd John Fleming
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
94
95
		$reqdfields = explode(" ", "pollport");
96 3d9bee96 Rafael Lucas
		$reqdfieldsn = array(gettext("Polling Port"));
97 5b237745 Scott Ullrich
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
98 a42bf8cd Scott Ullrich
		
99 72b5583c Scott Ullrich
	
100 5b237745 Scott Ullrich
	}
101
102 4f4d63d8 John Fleming
	if ($_POST['trapenable']) {
103 00686fee pierrepomes
		if (strstr($_POST['trapstring'],"#")) $input_errors[] = gettext("Invalid character '#' in SNMP trap string");
104
105 4f4d63d8 John Fleming
		$reqdfields = explode(" ", "trapserver");
106 3d9bee96 Rafael Lucas
		$reqdfieldsn = array(gettext("Trap server"));
107 4f4d63d8 John Fleming
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
108 3805bfdd John Fleming
109 4f4d63d8 John Fleming
		$reqdfields = explode(" ", "trapserverport");
110 3d9bee96 Rafael Lucas
		$reqdfieldsn = array(gettext("Trap server port"));
111 4f4d63d8 John Fleming
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
112 3805bfdd John Fleming
113 8c3c9dc2 John Fleming
		$reqdfields = explode(" ", "trapstring");
114 3d9bee96 Rafael Lucas
		$reqdfieldsn = array(gettext("Trap string"));
115 b7e236b9 jim-p
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
116 4f4d63d8 John Fleming
	}
117
118 8c3c9dc2 John Fleming
119 4f4d63d8 John Fleming
/* disabled until some docs show up on what this does.
120
	if ($_POST['rwenable']) {
121
               $reqdfields = explode(" ", "rwcommunity");
122
               $reqdfieldsn = explode(",", "Write community string");
123
               do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
124
	}
125
*/
126
127
	
128
129 5b237745 Scott Ullrich
	if (!$input_errors) {
130 4f4d63d8 John Fleming
		$config['snmpd']['enable'] = $_POST['enable'] ? true : false;
131 3805bfdd John Fleming
		$config['snmpd']['pollport'] = $_POST['pollport'];
132 3184f4e7 Scott Ullrich
		$config['snmpd']['syslocation'] = $_POST['syslocation'];	
133 5b237745 Scott Ullrich
		$config['snmpd']['syscontact'] = $_POST['syscontact'];
134
		$config['snmpd']['rocommunity'] = $_POST['rocommunity'];
135 4f4d63d8 John Fleming
		/* disabled until some docs show up on what this does.
136
		$config['snmpd']['rwenable'] = $_POST['rwenable'] ? true : false;
137
		$config['snmpd']['rwcommunity'] = $_POST['rwcommunity'];
138
		*/
139
		$config['snmpd']['trapenable'] = $_POST['trapenable'] ? true : false;
140
		$config['snmpd']['trapserver'] = $_POST['trapserver'];
141
		$config['snmpd']['trapserverport'] = $_POST['trapserverport'];
142 8c3c9dc2 John Fleming
		$config['snmpd']['trapstring'] = $_POST['trapstring'];
143 4f4d63d8 John Fleming
		
144 3805bfdd John Fleming
		$config['snmpd']['modules']['mibii'] = $_POST['mibii'] ? true : false;
145
		$config['snmpd']['modules']['netgraph'] = $_POST['netgraph'] ? true : false;
146
		$config['snmpd']['modules']['pf'] = $_POST['pf'] ? true : false;
147 95fb49e8 Seth Mos
		$config['snmpd']['modules']['hostres'] = $_POST['hostres'] ? true : false;
148
		$config['snmpd']['modules']['bridge'] = $_POST['bridge'] ? true : false;
149 7cbad422 Scott Ullrich
		$config['snmpd']['bindlan'] = $_POST['bindlan'] ? true : false;
150 5b237745 Scott Ullrich
			
151
		write_config();
152
		
153
		$retval = 0;
154 920b3bb0 Scott Ullrich
		$retval = services_snmpd_configure();
155 5b237745 Scott Ullrich
		$savemsg = get_std_save_message($retval);
156
	}
157
}
158 4df96eff Scott Ullrich
159 3d9bee96 Rafael Lucas
$pgtitle = array(gettext("Services"),gettext("SNMP"));
160 4df96eff Scott Ullrich
include("head.inc");
161
162 5b237745 Scott Ullrich
?>
163
<script language="JavaScript">
164
<!--
165 7bc5c543 jim-p
function check_deps() {
166
	if ($('hostres').checked == true) {
167
		$('mibii').checked = true;
168
	}
169
}
170
171 4f4d63d8 John Fleming
function enable_change(whichone) {
172
173
	if( whichone.name == "trapenable" )
174
        {
175
	    if( whichone.checked == true )
176
	    {
177
	        document.iform.trapserver.disabled = false;
178
	        document.iform.trapserverport.disabled = false;
179 8c3c9dc2 John Fleming
	        document.iform.trapstring.disabled = false;
180 4f4d63d8 John Fleming
	    }
181
	    else
182
	    {
183
                document.iform.trapserver.disabled = true;
184
                document.iform.trapserverport.disabled = true;
185 8c3c9dc2 John Fleming
                document.iform.trapstring.disabled = true;
186 4f4d63d8 John Fleming
	    }
187
	}
188
189
	/* disabled until some docs show up on what this does.
190
	if( whichone.name == "rwenable"  )
191
	{
192
	    if( whichone.checked == true )
193
	    {
194
		document.iform.rwcommunity.disabled = false;
195
	    }
196
	    else
197
	    {
198
		document.iform.rwcommunity.disabled = true;
199
	    }
200
	}
201
	*/
202
203
	if( document.iform.enable.checked == true )
204
	{
205 3805bfdd John Fleming
	    document.iform.pollport.disabled = false;
206 4f4d63d8 John Fleming
	    document.iform.syslocation.disabled = false;
207
	    document.iform.syscontact.disabled = false;
208
	    document.iform.rocommunity.disabled = false;
209
	    document.iform.trapenable.disabled = false;
210 0bbf8900 Ermal
	    //document.iform.bindlan.disabled = false;
211 4f4d63d8 John Fleming
	    /* disabled until some docs show up on what this does.
212
	    document.iform.rwenable.disabled = false;
213
	    if( document.iform.rwenable.checked == true )
214
	    {
215
	        document.iform.rwcommunity.disabled = false;
216
	    }
217
	    else
218
	    {
219
		document.iform.rwcommunity.disabled = true;
220
	    }
221
	    */
222
	    if( document.iform.trapenable.checked == true )
223
	    {
224
                document.iform.trapserver.disabled = false;
225
                document.iform.trapserverport.disabled = false;
226 8c3c9dc2 John Fleming
                document.iform.trapstring.disabled = false;
227 4f4d63d8 John Fleming
	    }
228
	    else
229
	    {
230
                document.iform.trapserver.disabled = true;
231 a21b1cad John Fleming
                document.iform.trapserverport.disabled = true;
232 8c3c9dc2 John Fleming
                document.iform.trapstring.disabled = true;
233 4f4d63d8 John Fleming
	    }
234 3805bfdd John Fleming
	    document.iform.mibii.disabled = false;
235
	    document.iform.netgraph.disabled = false;
236
	    document.iform.pf.disabled = false;
237 95fb49e8 Seth Mos
	    document.iform.hostres.disabled = false;
238 0bbf8900 Ermal
	    //document.iform.bridge.disabled = false;
239 4f4d63d8 John Fleming
	}
240
	else
241
	{
242 3805bfdd John Fleming
            document.iform.pollport.disabled = true;
243 4f4d63d8 John Fleming
            document.iform.syslocation.disabled = true;
244
            document.iform.syscontact.disabled = true;
245
            document.iform.rocommunity.disabled = true;
246
	    /* 
247
            document.iform.rwenable.disabled = true;
248
	    document.iform.rwcommunity.disabled = true;
249
	    */
250
            document.iform.trapenable.disabled = true;
251
            document.iform.trapserver.disabled = true;
252
            document.iform.trapserverport.disabled = true;
253 8c3c9dc2 John Fleming
            document.iform.trapstring.disabled = true;
254 3805bfdd John Fleming
255
            document.iform.mibii.disabled = true;
256
            document.iform.netgraph.disabled = true;
257
            document.iform.pf.disabled = true;
258 95fb49e8 Seth Mos
            document.iform.hostres.disabled = true;
259 0bbf8900 Ermal
            //document.iform.bridge.disabled = true;
260
	    //document.iform.bindlan.disabled = true;
261 4f4d63d8 John Fleming
	}
262 5b237745 Scott Ullrich
}
263
//-->
264
</script>
265
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
266
<?php include("fbegin.inc"); ?>
267
<?php if ($input_errors) print_input_errors($input_errors); ?>
268
<?php if ($savemsg) print_info_box($savemsg); ?>
269
            <form action="services_snmp.php" method="post" name="iform" id="iform">
270
              <table width="100%" border="0" cellpadding="6" cellspacing="0">
271 4f4d63d8 John Fleming
272 5b237745 Scott Ullrich
                <tr> 
273 4f4d63d8 John Fleming
  		  <td colspan="2" valign="top" class="optsect_t">
274
  			<table border="0" cellspacing="0" cellpadding="0" width="100%">
275 3d9bee96 Rafael Lucas
  			<tr><td class="optsect_s"><strong><?=gettext("SNMP Daemon");?></strong></td>
276 59d0d504 Carlos Eduardo Ramos
					<td align="right" class="optsect_s"><input name="enable" id="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(this)"> <strong><?=gettext("Enable");?></strong></td></tr>
277 4f4d63d8 John Fleming
  			</table></td>
278 5b237745 Scott Ullrich
                </tr>
279 3805bfdd John Fleming
280
                <tr>
281 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Polling Port ");?></td>
282 3805bfdd John Fleming
                  <td width="78%" class="vtable">
283 dd5bf424 Scott Ullrich
                    <input name="pollport" type="text" class="formfld unknown" id="pollport" size="40" value="<?=htmlspecialchars($pconfig['pollport']) ? htmlspecialchars($pconfig['pollport']) : htmlspecialchars(161);?>">
284 3d9bee96 Rafael Lucas
                    <br><?=gettext("Enter the port to accept polling events on (default 161)");?></br>
285 3805bfdd John Fleming
		  </td>
286
                </tr>
287
288 5b237745 Scott Ullrich
                <tr> 
289 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncell"><?=gettext("System location");?></td>
290 5b237745 Scott Ullrich
                  <td width="78%" class="vtable"> 
291 b5c78501 Seth Mos
                    <input name="syslocation" type="text" class="formfld unknown" id="syslocation" size="40" value="<?=htmlspecialchars($pconfig['syslocation']);?>"> 
292 5b237745 Scott Ullrich
                  </td>
293
                </tr>
294 3805bfdd John Fleming
295 5b237745 Scott Ullrich
                <tr> 
296 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncell"><?=gettext("System contact");?></td>
297 5b237745 Scott Ullrich
                  <td width="78%" class="vtable"> 
298 b5c78501 Seth Mos
                    <input name="syscontact" type="text" class="formfld unknown" id="syscontact" size="40" value="<?=htmlspecialchars($pconfig['syscontact']);?>"> 
299 5b237745 Scott Ullrich
                  </td>
300
                </tr>
301 3805bfdd John Fleming
302 5b237745 Scott Ullrich
                <tr> 
303 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Read Community String");?></td>
304 5b237745 Scott Ullrich
                  <td width="78%" class="vtable"> 
305 b5c78501 Seth Mos
                    <input name="rocommunity" type="text" class="formfld unknown" id="rocommunity" size="40" value="<?=htmlspecialchars($pconfig['rocommunity']);?>"> 
306 4daa45d8 Renato Botelho
		    <br><?=gettext("The community string is like a password, restricting access to querying SNMP to hosts knowing the community string. Use a strong value here to protect from unauthorized information disclosure.");?></br>
307 3805bfdd John Fleming
		  </td>
308 5b237745 Scott Ullrich
                </tr>
309 4f4d63d8 John Fleming
310
<?php 
311
			/* disabled until some docs show up on what this does.
312
                <tr>
313
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
314
                  <td width="78%" class="vtable">
315 0bbf8900 Ermal
	 	   <input name="rwenable" id="rwenable" type="checkbox" value="yes" <?php if ($pconfig['rwenable']) echo "checked"; ?> onClick="enable_change(this)">
316 3805bfdd John Fleming
                    <strong>Enable Write Community String</strong>
317
		  </td>
318 4f4d63d8 John Fleming
                </tr>
319
320
		<tr>
321
		  <td width="22%" valign="top" class="vncellreq">Write community string</td>
322
          <td width="78%" class="vtable">
323 b5c78501 Seth Mos
                    <input name="rwcommunity" type="text" class="formfld unknown" id="rwcommunity" size="40" value="<?=htmlspecialchars($pconfig['rwcommunity']);?>">
324 3805bfdd John Fleming
		    <br>Please use something other then &quot;private&quot; here</br>
325
		  </td>
326 4f4d63d8 John Fleming
                </tr>
327
		    	*/ 
328
?>
329
330 3184f4e7 Scott Ullrich
		<tr><td>&nbsp;</td></tr>
331
332
                <tr> 
333
  		  <td colspan="2" valign="top" class="optsect_t">
334
  			<table border="0" cellspacing="0" cellpadding="0" width="100%">
335 3d9bee96 Rafael Lucas
  			<tr><td class="optsect_s"><strong><?=gettext("SNMP Traps");?></strong></td>
336 59d0d504 Carlos Eduardo Ramos
			<td align="right" class="optsect_s"><input name="trapenable" id="trapenable" type="checkbox" value="yes" <?php if ($pconfig['trapenable']) echo "checked"; ?> onClick="enable_change(this)"> <strong><?=gettext("Enable");?></strong></td></tr>
337 3184f4e7 Scott Ullrich
  			</table></td>
338
                </tr>
339
340
341 4f4d63d8 John Fleming
                <tr>
342 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Trap server");?></td>
343 4f4d63d8 John Fleming
                  <td width="78%" class="vtable">
344 b5c78501 Seth Mos
                    <input name="trapserver" type="text" class="formfld unknown" id="trapserver" size="40" value="<?=htmlspecialchars($pconfig['trapserver']);?>">
345 3d9bee96 Rafael Lucas
                    <br><?=gettext("Enter trap server name");?></br>
346 3805bfdd John Fleming
		  </td>
347 4f4d63d8 John Fleming
                </tr>
348
349
                <tr>
350 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Trap server port ");?></td>
351 4f4d63d8 John Fleming
                  <td width="78%" class="vtable">
352 dd5bf424 Scott Ullrich
                    <input name="trapserverport" type="text" class="formfld unknown" id="trapserverport" size="40" value="<?=htmlspecialchars($pconfig['trapserverport']) ? htmlspecialchars($pconfig['trapserverport']) : htmlspecialchars(162);?>">
353 3d9bee96 Rafael Lucas
                    <br><?=gettext("Enter the port to send the traps to (default 162)");?></br>
354 3805bfdd John Fleming
		  </td>
355 4f4d63d8 John Fleming
                </tr>
356 3805bfdd John Fleming
357 8c3c9dc2 John Fleming
                <tr>
358 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Enter the SNMP trap string");?></td>
359 8c3c9dc2 John Fleming
                  <td width="78%" class="vtable">
360 b5c78501 Seth Mos
                    <input name="trapstring" type="text" class="formfld unknown" id="trapstring" size="40" value="<?=htmlspecialchars($pconfig['trapstring']);?>">
361 3d9bee96 Rafael Lucas
                    <br><?=gettext("Trap string");?></br>
362 3805bfdd John Fleming
		  </td>
363 8c3c9dc2 John Fleming
                </tr>
364
365 ba73e2a3 Scott Ullrich
		<tr><td>&nbsp;</td></tr>
366
367
                <tr> 
368
  		  <td colspan="2" valign="top" class="optsect_t">
369
  			<table border="0" cellspacing="0" cellpadding="0" width="100%">
370 3d9bee96 Rafael Lucas
  			<tr><td class="optsect_s"><strong><?=gettext("Modules");?></strong></td>
371 ba73e2a3 Scott Ullrich
			<td align="right" class="optsect_s">&nbsp;</td></tr>
372
  			</table></td>
373
                </tr>
374
375 3805bfdd John Fleming
		<tr>
376 3d9bee96 Rafael Lucas
		  <td width="22%" valign="top" class="vncellreq"><?=gettext("SNMP Modules");?></td>
377 3805bfdd John Fleming
		  <td width="78%" class="vtable">
378 7bc5c543 jim-p
		    <input name="mibii" type="checkbox" id="mibii" value="yes" onClick="check_deps()" <?php if ($pconfig['mibii']) echo "checked"; ?> ><?=gettext("MibII"); ?>
379 95fb49e8 Seth Mos
		    <br />
380 59d0d504 Carlos Eduardo Ramos
		    <input name="netgraph" type="checkbox" id="netgraph" value="yes" <?php if ($pconfig['netgraph']) echo "checked"; ?> ><?=gettext("Netgraph"); ?>
381 95fb49e8 Seth Mos
		    <br />
382 59d0d504 Carlos Eduardo Ramos
		    <input name="pf" type="checkbox" id="pf" value="yes" <?php if ($pconfig['pf']) echo "checked"; ?> ><?=gettext("PF"); ?>
383 95fb49e8 Seth Mos
		    <br />
384 7bc5c543 jim-p
		    <input name="hostres" type="checkbox" id="hostres" value="yes" onClick="check_deps()" <?php if ($pconfig['hostres']) echo "checked"; ?> ><?=gettext("Host Resources (Requires MibII)");?>
385 3805bfdd John Fleming
		  </td>
386
		</tr>
387 612bb4f3 Scott Ullrich
<?php if(!$config['interfaces']['lan']): ?>
388
		 <tr> 
389
		   <td width="22%" valign="top" class="vtable"></td>
390
		   <td width="78%" class="vtable"> 
391 59d0d504 Carlos Eduardo Ramos
		     <input name="bindlan" type="checkbox" value="yes" <?php if ($pconfig['bindlan']) echo "checked"; ?>> <strong><?=gettext("Bind to LAN interface only");?></strong>
392 612bb4f3 Scott Ullrich
		     <br>
393 3d9bee96 Rafael Lucas
		     <?=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 612bb4f3 Scott Ullrich
		 </tr>
396
<?php endif; ?>
397
		 <tr> 
398
		   <td width="22%" valign="top">&nbsp;</td>
399
		   <td width="78%"> 
400 3d9bee96 Rafael Lucas
		     <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onClick="enable_change(true)"> 
401 612bb4f3 Scott Ullrich
		   </td>
402
		 </tr>
403
		</table>
404 5b237745 Scott Ullrich
</form>
405
<script language="JavaScript">
406
<!--
407 4f4d63d8 John Fleming
enable_change(this);
408 5b237745 Scott Ullrich
//-->
409
</script>
410
<?php include("fend.inc"); ?>
411
</body>
412
</html>