Project

General

Profile

Download (21.3 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/* $Id$ */
3
/*
4
	firewall_nat_edit.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
/*
32
	pfSense_MODULE:	nat
33
*/
34

    
35
##|+PRIV
36
##|*IDENT=page-firewall-nat-portforward-edit
37
##|*NAME=Firewall: NAT: Port Forward: Edit page
38
##|*DESCR=Allow access to the 'Firewall: NAT: Port Forward: Edit' page.
39
##|*MATCH=firewall_nat_edit.php*
40
##|-PRIV
41

    
42
require("guiconfig.inc");
43
require_once("itemid.inc");
44
require("filter.inc");
45
require("shaper.inc");
46

    
47
if (!is_array($config['nat']['rule'])) {
48
	$config['nat']['rule'] = array();
49
}
50
$a_nat = &$config['nat']['rule'];
51

    
52
$id = $_GET['id'];
53
if (isset($_POST['id']))
54
	$id = $_POST['id'];
55

    
56
if (isset($_GET['dup'])) {
57
        $id = $_GET['dup'];
58
        $after = $_GET['dup'];
59
}
60

    
61
if (isset($id) && $a_nat[$id]) {
62
	$pconfig['extaddr'] = $a_nat[$id]['external-address'];
63
	$pconfig['proto'] = $a_nat[$id]['protocol'];
64
	list($pconfig['beginport'],$pconfig['endport']) = explode("-", $a_nat[$id]['external-port']);
65
	$pconfig['localip'] = $a_nat[$id]['target'];
66
	$pconfig['localbeginport'] = $a_nat[$id]['local-port'];
67
	$pconfig['descr'] = $a_nat[$id]['descr'];
68
	$pconfig['interface'] = $a_nat[$id]['interface'];
69
	$pconfig['associated-filter-rule-id'] = $a_nat[$id]['associated-filter-rule-id'];
70
	$pconfig['nosync'] = isset($a_nat[$id]['nosync']);
71
	if (!$pconfig['interface'])
72
		$pconfig['interface'] = "wan";
73
} else {
74
	$pconfig['interface'] = "wan";
75
}
76

    
77
if (isset($_GET['dup']))
78
	unset($id);
79

    
80
/*  run through $_POST items encoding HTML entties so that the user
81
 *  cannot think he is slick and perform a XSS attack on the unwilling 
82
 */
83
foreach ($_POST as $key => $value) {
84
	$temp = $value;
85
	$newpost = htmlentities($temp);
86
	if($newpost <> $temp) 
87
		$input_errors[] = "Invalid characters detected ($temp).  Please remove invalid characters and save again.";		
88
}
89

    
90
if ($_POST) {
91

    
92
	if ($_POST['beginport_cust'] && !$_POST['beginport'])
93
		$_POST['beginport'] = $_POST['beginport_cust'];
94
	if ($_POST['endport_cust'] && !$_POST['endport'])
95
		$_POST['endport'] = $_POST['endport_cust'];
96
	if ($_POST['localbeginport_cust'] && !$_POST['localbeginport'])
97
		$_POST['localbeginport'] = $_POST['localbeginport_cust'];
98

    
99
	if (!$_POST['endport'])
100
		$_POST['endport'] = $_POST['beginport'];
101
        /* Make beginning port end port if not defined and endport is */
102
        if (!$_POST['beginport'] && $_POST['endport'])
103
                $_POST['beginport'] = $_POST['endport'];
104

    
105
	unset($input_errors);
106
	$pconfig = $_POST;
107

    
108
	/* input validation */
109
	if(strtoupper($_POST['proto']) == "TCP" or strtoupper($_POST['proto']) == "UDP" or strtoupper($_POST['proto']) == "TCP/UDP") {
110
		$reqdfields = explode(" ", "interface proto beginport endport localip localbeginport");
111
		$reqdfieldsn = explode(",", "Interface,Protocol,External port from,External port to,NAT IP,Local port");
112
	} else {
113
		$reqdfields = explode(" ", "interface proto localip");
114
		$reqdfieldsn = explode(",", "Interface,Protocol,NAT IP");
115
	}
116

    
117
	do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
118

    
119
	if (($_POST['localip'] && !is_ipaddroralias($_POST['localip']))) {
120
		$input_errors[] = "\"{$_POST['localip']}\" is not valid NAT IP address or host alias.";
121
	}
122

    
123
	/* only validate the ports if the protocol is TCP, UDP or TCP/UDP */
124
	if(strtoupper($_POST['proto']) == "TCP" or strtoupper($_POST['proto']) == "UDP" or strtoupper($_POST['proto']) == "TCP/UDP") {
125

    
126
		if (($_POST['beginport'] && !is_ipaddroralias($_POST['beginport']) && !is_port($_POST['beginport']))) {
127
			$input_errors[] = "The start port must be an integer between 1 and 65535.";
128
		}
129

    
130
		if (($_POST['endport'] && !is_ipaddroralias($_POST['endport']) && !is_port($_POST['endport']))) {
131
			$input_errors[] = "The end port must be an integer between 1 and 65535.";
132
		}
133

    
134
		if (($_POST['localbeginport'] && !is_ipaddroralias($_POST['localbeginport']) && !is_port($_POST['localbeginport']))) {
135
			$input_errors[] = "The local port must be an integer between 1 and 65535.";
136
		}
137

    
138
		if ($_POST['beginport'] > $_POST['endport']) {
139
			/* swap */
140
			$tmp = $_POST['endport'];
141
			$_POST['endport'] = $_POST['beginport'];
142
			$_POST['beginport'] = $tmp;
143
		}
144

    
145
		if (!$input_errors) {
146
			if (($_POST['endport'] - $_POST['beginport'] + $_POST['localbeginport']) > 65535)
147
				$input_errors[] = "The target port range must be an integer between 1 and 65535.";
148
		}
149

    
150
	}
151

    
152
	/* check for overlaps */
153
	foreach ($a_nat as $natent) {
154
		if (isset($id) && ($a_nat[$id]) && ($a_nat[$id] === $natent))
155
			continue;
156
		if ($natent['interface'] != $_POST['interface'])
157
			continue;
158
		if ($natent['external-address'] != $_POST['extaddr'])
159
			continue;
160
		if (($natent['proto'] != $_POST['proto']) && ($natent['proto'] != "tcp/udp") && ($_POST['proto'] != "tcp/udp"))
161
			continue;
162

    
163
		list($begp,$endp) = explode("-", $natent['external-port']);
164
		if (!$endp)
165
			$endp = $begp;
166

    
167
		if (!(   (($_POST['beginport'] < $begp) && ($_POST['endport'] < $begp))
168
		      || (($_POST['beginport'] > $endp) && ($_POST['endport'] > $endp)))) {
169

    
170
			$input_errors[] = "The external port range overlaps with an existing entry.";
171
			break;
172
		}
173
	}
174

    
175
	if (!$input_errors) {
176
		$natent = array();
177
		if ($_POST['extaddr'])
178
			$natent['external-address'] = $_POST['extaddr'];
179
		$natent['protocol'] = $_POST['proto'];
180

    
181
		if ($_POST['beginport'] == $_POST['endport'])
182
			$natent['external-port'] = $_POST['beginport'];
183
		else
184
			$natent['external-port'] = $_POST['beginport'] . "-" . $_POST['endport'];
185

    
186
		$natent['target'] = $_POST['localip'];
187
		$natent['local-port'] = $_POST['localbeginport'];
188
		$natent['interface'] = $_POST['interface'];
189
		$natent['descr'] = $_POST['descr'];
190
		$natent['associated-filter-rule-id'] = $_POST['associated-filter-rule-id'];
191
		
192
		if($_POST['filter-rule-association'] == "pass")
193
			$natent['associated-filter-rule-id'] = "pass";
194

    
195
		if($_POST['nosync'] == "yes")
196
			$natent['nosync'] = true;
197
		else
198
			unset($natent['nosync']);
199

    
200
		$need_filter_rule = false;
201
		// Updating a rule with a filter rule associated
202
		if( $natent['associated-filter-rule-id']>0 )
203
			$need_filter_rule = true;
204
		// If creating a new rule, where we want to add the filter rule, associated or not
205
		else if( isset($_POST['filter-rule-association']) && 
206
			($_POST['filter-rule-association']=='add-associated' || 
207
			$_POST['filter-rule-association']=='add-unassociated') )
208
			$need_filter_rule = true;
209

    
210
		if ($need_filter_rule) {
211

    
212
			// If we had a previous rule associated with this NAT rule, delete that
213
			if( $natent['associated-filter-rule-id'] > 0 )
214
				delete_id($natent['associated-filter-rule-id'], $config['filter']['rule']);
215

    
216
			/* auto-generate a matching firewall rule */
217
			$filterent = array();
218
			$filterent['interface'] = $_POST['interface'];
219
			$filterent['protocol'] = $_POST['proto'];
220
			$filterent['source']['any'] = "";
221
			$filterent['destination']['address'] = $_POST['localip'];
222

    
223
			$dstpfrom = $_POST['localbeginport'];
224
			$dstpto = $dstpfrom + $_POST['endport'] - $_POST['beginport'];
225

    
226
			if ($dstpfrom == $dstpto)
227
				$filterent['destination']['port'] = $dstpfrom;
228
			else
229
				$filterent['destination']['port'] = $dstpfrom . "-" . $dstpto;
230

    
231
			$filterent['descr'] = "NAT " . $_POST['descr'];
232
			/*
233
			 * Our firewall filter description may be no longer than
234
			 * 63 characters, so don't let it be.
235
			 */
236
			$filterent['descr'] = substr("NAT " . $_POST['descr'], 0, 59);
237

    
238
			// If we had a previous rule association, update this rule with that ID so we don't lose association
239
			if ($natent['associated-filter-rule-id'] > 0)
240
				$filterent['id'] = $natent['associated-filter-rule-id']; 
241
			// If we wanted this rule to be associated, make sure the NAT entry is updated with the same ID
242
			else if($_POST['filter-rule-association']=='add-associated')
243
				$natent['associated-filter-rule-id'] = $filterent['id'] = get_next_id($config['filter']['rule']);
244

    
245
			$config['filter']['rule'][] = $filterent;
246

    
247
			mark_subsystem_dirty('filter');
248
		}
249

    
250
		// Update NAT entry after creating/updating the firewall rule, so we have it's rule ID if one was created
251
		if (isset($id) && $a_nat[$id])
252
			$a_nat[$id] = $natent;
253
		else {
254
			if (is_numeric($after))
255
				array_splice($a_nat, $after+1, 0, array($natent));
256
			else
257
				$a_nat[] = $natent;
258
		}
259

    
260
		mark_subsystem_dirty('natconf');
261

    
262
		write_config();
263

    
264
		header("Location: firewall_nat.php");
265
		exit;
266
	}
267
}
268

    
269
$pgtitle = array("Firewall","NAT","Port Forward: Edit");
270
include("head.inc");
271

    
272
?>
273

    
274
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
275
<?php
276
include("fbegin.inc"); ?>
277
<?php if ($input_errors) print_input_errors($input_errors); ?>
278
            <form action="firewall_nat_edit.php" method="post" name="iform" id="iform">
279
              <table width="100%" border="0" cellpadding="6" cellspacing="0">
280
				<tr>
281
					<td colspan="2" valign="top" class="listtopic">Edit NAT entry</td>
282
				</tr>	
283
				<tr>
284
                  <td width="22%" valign="top" class="vncellreq">Interface</td>
285
                  <td width="78%" class="vtable">
286
					<select name="interface" class="formselect">
287
						<?php
288
						
289
						$iflist = get_configured_interface_with_descr(false, true);
290
						foreach ($iflist as $if => $ifdesc) 
291
							if(have_ruleint_access($if)) 
292
								$interfaces[$if] = $ifdesc;
293
						
294
						if ($config['pptpd']['mode'] == "server")
295
							if(have_ruleint_access("pptp")) 
296
								$interfaces['pptp'] = "PPTP VPN";
297
						
298
						if ($config['pppoe']['mode'] == "server")
299
							if(have_ruleint_access("pppoe")) 
300
								$interfaces['pppoe'] = "PPPoE VPN";
301
						
302
						/* add ipsec interfaces */
303
						if (isset($config['ipsec']['enable']) || isset($config['ipsec']['mobileclients']['enable']))
304
							if(have_ruleint_access("enc0")) 
305
								$interfaces["enc0"] = "IPsec";						
306

    
307
						foreach ($interfaces as $iface => $ifacename): ?>
308
						<option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo "selected"; ?>>
309
						<?=htmlspecialchars($ifacename);?>
310
						</option>
311
						<?php endforeach; ?>
312
					</select><br>
313
                     <span class="vexpl">Choose which interface this rule applies to.<br>
314
                     Hint: in most cases, you'll want to use WAN here.</span></td>
315
                </tr>
316
			    <tr>
317
                  <td width="22%" valign="top" class="vncellreq">External address</td>
318
                  <td width="78%" class="vtable">
319
					<select name="extaddr" class="formselect">
320
						<option value="" <?php if (!$pconfig['extaddr']) echo "selected"; ?>>Interface address</option>
321
<?php					if (is_array($config['virtualip']['vip'])):
322
						foreach ($config['virtualip']['vip'] as $sn): ?>
323
						<option value="<?=$sn['subnet'];?>" <?php if ($sn['subnet'] == $pconfig['extaddr']) echo "selected"; ?>><?=htmlspecialchars("{$sn['subnet']} ({$sn['descr']})");?></option>
324
<?php					endforeach;
325
						endif; ?>
326
						<option value="any" <?php if($pconfig['extaddr'] == "any") echo "selected"; ?>>any</option>
327
					</select>
328
					<br />
329
                    <span class="vexpl">
330
					If you want this rule to apply to another IP address than the IP address of the interface chosen above,
331
					select it here (you need to define <a href="firewall_virtual_ip.php">Virtual IP</a> addresses on the first).  Also note that if you are trying to redirect connections on the LAN select the "any" option.</span></td>
332
                </tr>
333
                <tr>
334
                  <td width="22%" valign="top" class="vncellreq">Protocol</td>
335
                  <td width="78%" class="vtable">
336
                    <select name="proto" class="formselect" onChange="proto_change(); check_for_aliases();">
337
                      <?php $protocols = explode(" ", "TCP UDP TCP/UDP GRE ESP"); foreach ($protocols as $proto): ?>
338
                      <option value="<?=strtolower($proto);?>" <?php if (strtolower($proto) == $pconfig['proto']) echo "selected"; ?>><?=htmlspecialchars($proto);?></option>
339
                      <?php endforeach; ?>
340
                    </select> <br> <span class="vexpl">Choose which IP protocol
341
                    this rule should match.<br>
342
                    Hint: in most cases, you should specify <em>TCP</em> &nbsp;here.</span></td>
343
                </tr>
344
                <tr>
345
                  <td width="22%" valign="top" class="vncellreq">External port
346
                    range </td>
347
                  <td width="78%" class="vtable">
348
                    <table border="0" cellspacing="0" cellpadding="0">
349
                      <tr>
350
                        <td>from:&nbsp;&nbsp;</td>
351
                        <td><select name="beginport" class="formselect" onChange="ext_rep_change(); ext_change(); check_for_aliases();">
352
                            <option value="">(other)</option>
353
                            <?php $bfound = 0; foreach ($wkports as $wkport => $wkportdesc): ?>
354
                            <option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['beginport']) {
355
								echo "selected";
356
								$bfound = 1;
357
							}?>>
358
							<?=htmlspecialchars($wkportdesc);?>
359
							</option>
360
                            <?php endforeach; ?>
361
                          </select> <input onChange="check_for_aliases();" autocomplete='off' class="formfldalias" name="beginport_cust" id="beginport_cust" type="text" size="5" value="<?php if (!$bfound) echo $pconfig['beginport']; ?>"></td>
362
                      </tr>
363
                      <tr>
364
                        <td>to:</td>
365
                        <td><select name="endport" class="formselect" onChange="ext_change(); check_for_aliases();">
366
                            <option value="">(other)</option>
367
                            <?php $bfound = 0; foreach ($wkports as $wkport => $wkportdesc): ?>
368
                            <option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['endport']) {
369
								echo "selected";
370
								$bfound = 1;
371
							}?>>
372
							<?=htmlspecialchars($wkportdesc);?>
373
							</option>
374
							<?php endforeach; ?>
375
                          </select> <input onChange="check_for_aliases();" class="formfldalias" autocomplete='off' name="endport_cust" id="endport_cust" type="text" size="5" value="<?php if (!$bfound) echo $pconfig['endport']; ?>"></td>
376
                      </tr>
377
                    </table>
378
                    <br> <span class="vexpl">Specify the port or port range on
379
                    the firewall's external address for this mapping.<br>
380
                    Hint: you can leave the <em>'to'</em> field empty if you only
381
                    want to map a single port</span></td>
382
                </tr>
383
                <tr>
384
                  <td width="22%" valign="top" class="vncellreq">NAT IP</td>
385
                  <td width="78%" class="vtable">
386
                    <input autocomplete='off' name="localip" type="text" class="formfldalias" id="localip" size="20" value="<?=htmlspecialchars($pconfig['localip']);?>">
387
                    <br> <span class="vexpl">Enter the internal IP address of
388
                    the server on which you want to map the ports.<br>
389
                    e.g. <em>192.168.1.12</em></span></td>
390
                </tr>
391
                <tr>
392
                  <td width="22%" valign="top" class="vncellreq">Local port</td>
393
                  <td width="78%" class="vtable">
394
                    <select name="localbeginport" class="formselect" onChange="ext_change();check_for_aliases();">
395
                      <option value="">(other)</option>
396
                      <?php $bfound = 0; foreach ($wkports as $wkport => $wkportdesc): ?>
397
                      <option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['localbeginport']) {
398
							echo "selected";
399
							$bfound = 1;
400
						}?>>
401
					  <?=htmlspecialchars($wkportdesc);?>
402
					  </option>
403
                      <?php endforeach; ?>
404
                    </select> <input onChange="check_for_aliases();" autocomplete='off' class="formfldalias" name="localbeginport_cust" id="localbeginport_cust" type="text" size="5" value="<?php if (!$bfound) echo $pconfig['localbeginport']; ?>">
405
                    <br>
406
                    <span class="vexpl">Specify the port on the machine with the
407
                    IP address entered above. In case of a port range, specify
408
                    the beginning port of the range (the end port will be calculated
409
                    automatically).<br>
410
                    Hint: this is usually identical to the 'from' port above</span></td>
411
                </tr>
412
                <tr>
413
                  <td width="22%" valign="top" class="vncell">Description</td>
414
                  <td width="78%" class="vtable">
415
                    <input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
416
                    <br> <span class="vexpl">You may enter a description here
417
                    for your reference (not parsed).</span></td>
418
                </tr>
419
				<tr>
420
					<td width="22%" valign="top" class="vncell">No XMLRPC Sync</td>
421
					<td width="78%" class="vtable">
422
						<input type="checkbox" value="yes" name="nosync"<?php if($pconfig['nosync']) echo " CHECKED"; ?>><br>
423
						HINT: This prevents the rule from automatically syncing to other CARP members.
424
					</td>
425
				</tr>
426
				<?php if (isset($id) && $a_nat[$id] && !isset($_GET['dup'])): ?>
427
				<tr>
428
					<td width="22%" valign="top" class="vncell">Filter rule association</td>
429
					<td width="78%" class="vtable">
430
						<select name="associated-filter-rule-id">
431
							<option value="">None</option>
432
							<option value="pass" <?php if($pconfig['associated-filter-rule-id'] == "pass") echo " SELECTED"; ?>>Pass</option>
433
							<?php foreach ($config['filter']['rule'] as $filter_rule): ?>
434
								<?php if (isset($filter_rule['id']) && $filter_rule['id']>0): ?>
435
									<option value="<?php echo $filter_rule['id']; ?>"<?php if($filter_rule['id']==$pconfig['associated-filter-rule-id']) echo " SELECTED"; ?>>
436
									<?php echo htmlspecialchars('Rule ' . $filter_rule['id'] . ' - ' . $filter_rule['descr']); ?>
437
									</option>
438
								<?php endif; ?>
439
							<?php endforeach; ?>
440
						</select>
441
					</td>
442
				</tr>
443
				<?php endif; ?>
444
                <?php if ((!(isset($id) && $a_nat[$id])) || (isset($_GET['dup']))): ?>
445
                <tr>
446
                  <td width="22%" valign="top" class="vncell">Filter rule association</td>
447
                  <td width="78%">
448
                    <select name="filter-rule-association" id="filter-rule-association">
449
						<option value="">None</option>
450
						<option value="add-associated" selected="selected">Add associated filter rule</option>
451
						<option value="add-unassociated">Add unassociated filter rule</option>
452
						<option value="pass">Pass</option>
453
					</select>
454
				  </td>
455
                </tr><?php endif; ?>
456
				<tr>
457
                  <td width="22%" valign="top">&nbsp;</td>
458
                  <td width="78%">&nbsp;</td>
459
				</tr>
460
                <tr>
461
                  <td width="22%" valign="top">&nbsp;</td>
462
                  <td width="78%">
463
                    <input name="Submit" type="submit" class="formbtn" value="Save"> <input type="button" class="formbtn" value="Cancel" onclick="history.back()">
464
                    <?php if (isset($id) && $a_nat[$id]): ?>
465
                    <input name="id" type="hidden" value="<?=$id;?>">
466
                    <?php endif; ?>
467
                  </td>
468
                </tr>
469
              </table>
470
</form>
471
<script language="JavaScript">
472
<!--
473
	ext_change();
474
//-->
475
</script>
476
<?php
477
$isfirst = 0;
478
$aliases = "";
479
$addrisfirst = 0;
480
$aliasesaddr = "";
481
if($config['aliases']['alias'] <> "")
482
	foreach($config['aliases']['alias'] as $alias_name) {
483
		if(!stristr($alias_name['address'], ".")) {
484
			if($isfirst == 1) $aliases .= ",";
485
			$aliases .= "'" . $alias_name['name'] . "'";
486
			$isfirst = 1;
487
		} else {
488
			if($addrisfirst == 1) $aliasesaddr .= ",";
489
			$aliasesaddr .= "'" . $alias_name['name'] . "'";
490
			$addrisfirst = 1;
491
		}
492
	}
493
?>
494
<script language="JavaScript">
495
<!--
496
	var addressarray=new Array(<?php echo $aliasesaddr; ?>);
497
	var customarray=new Array(<?php echo $aliases; ?>);
498

    
499
	var oTextbox1 = new AutoSuggestControl(document.getElementById("localip"), new StateSuggestions(addressarray));
500
        var oTextbox2 = new AutoSuggestControl(document.getElementById("beginport_cust"), new StateSuggestions(customarray));
501
        var oTextbox3 = new AutoSuggestControl(document.getElementById("endport_cust"), new StateSuggestions(customarray));
502
        var oTextbox4 = new AutoSuggestControl(document.getElementById("localbeginport_cust"), new StateSuggestions(customarray));
503
//-->
504
</script>
505
<?php include("fend.inc"); ?>
506
</body>
507
</html>
(52-52/214)