1
|
<?
|
2
|
/* $Id$ */
|
3
|
/*
|
4
|
interfaces_wlan.inc
|
5
|
part of m0n0wall (http://m0n0.ch/wall)
|
6
|
|
7
|
Copyright (C) 2003-2005 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
|
$wlchannels = array(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,34,36,38,40,42,44,46,48,50,52,56,58,60,64,100,104,108,112,116,120,124,128,132,136,140,149,152,153,157,160,161,165);
|
33
|
|
34
|
function wireless_config_init() {
|
35
|
global $optcfg, $pconfig;
|
36
|
|
37
|
$pconfig['standard'] = $optcfg['wireless']['standard'];
|
38
|
$pconfig['mode'] = $optcfg['wireless']['mode'];
|
39
|
$pconfig['ssid'] = $optcfg['wireless']['ssid'];
|
40
|
$pconfig['stationname'] = $optcfg['wireless']['stationname'];
|
41
|
$pconfig['channel'] = $optcfg['wireless']['channel'];
|
42
|
$pconfig['txpower'] = $optcfg['wireless']['txpower'];
|
43
|
$pconfig['wme_enable'] = isset($optcfg['wireless']['wme']['enable']);
|
44
|
$pconfig['pureg_enable'] = isset($optcfg['wireless']['pureg']['enable']);
|
45
|
$pconfig['apbridge_enable'] = isset($optcfg['wireless']['apbridge']['enable']);
|
46
|
$pconfig['turbo_enable'] = isset($optcfg['wireless']['turbo']['enable']);
|
47
|
$pconfig['authmode'] = $optcfg['wireless']['authmode'];
|
48
|
$pconfig['hidessid_enable'] = isset($optcfg['wireless']['hidessid']['enable']);
|
49
|
$pconfig['debug_mode'] = $optcfg['wireless']['wpa']['debug_mode'];
|
50
|
$pconfig['macaddr_acl'] = $optcfg['wireless']['wpa']['macaddr_acl'];
|
51
|
$pconfig['auth_algs'] = $optcfg['wireless']['wpa']['auth_algs'];
|
52
|
$pconfig['wpa_mode'] = $optcfg['wireless']['wpa']['wpa_mode'];
|
53
|
$pconfig['wpa_key_mgmt'] = $optcfg['wireless']['wpa']['wpa_key_mgmt'];
|
54
|
$pconfig['wpa_pairwise'] = $optcfg['wireless']['wpa']['wpa_pairwise'];
|
55
|
$pconfig['wpa_group_rekey'] = $optcfg['wireless']['wpa']['wpa_group_rekey'];
|
56
|
$pconfig['wpa_gmk_rekey'] = $optcfg['wireless']['wpa']['wpa_gmk_rekey'];
|
57
|
$pconfig['wpa_strict_rekey'] = $optcfg['wireless']['wpa']['wpa_strict_rekey'];
|
58
|
$pconfig['passphrase'] = $optcfg['wireless']['wpa']['passphrase'];
|
59
|
$pconfig['ieee8021x_enable'] = isset($optcfg['wireless']['wpa']['ieee8021x']['enable']);
|
60
|
$pconfig['ext_wpa_sw'] = $optcfg['wireless']['wpa']['ext_wpa_sw'];
|
61
|
$pconfig['wpa_enable'] = isset($optcfg['wireless']['wpa']['enable']);
|
62
|
$pconfig['wep_enable'] = isset($optcfg['wireless']['wep']['enable']);
|
63
|
$pconfig['mac_acl'] = $optcfg['wireless']['mac_acl'];
|
64
|
|
65
|
if (is_array($optcfg['wireless']['wep']['key'])) {
|
66
|
$i = 1;
|
67
|
foreach ($optcfg['wireless']['wep']['key'] as $wepkey) {
|
68
|
$pconfig['key' . $i] = $wepkey['value'];
|
69
|
if (isset($wepkey['txkey']))
|
70
|
$pconfig['txkey'] = $i;
|
71
|
$i++;
|
72
|
}
|
73
|
if (!isset($wepkey['txkey']))
|
74
|
$pconfig['txkey'] = 1;
|
75
|
}
|
76
|
}
|
77
|
|
78
|
function wireless_config_post() {
|
79
|
global $optcfg, $pconfig;
|
80
|
|
81
|
unset($input_errors);
|
82
|
|
83
|
/* input validation */
|
84
|
if ($_POST['enable']) {
|
85
|
$reqdfields = explode(" ", "mode ssid");
|
86
|
$reqdfieldsn = explode(",", "Mode,SSID");
|
87
|
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
|
88
|
|
89
|
if (!$input_errors) {
|
90
|
/* bridge check (hostap only!) */
|
91
|
if ($pconfig['bridge'] && ($pconfig['mode'] != "hostap"))
|
92
|
$input_errors[] = "Bridging a wireless interface is only possible in hostap mode.";
|
93
|
}
|
94
|
}
|
95
|
|
96
|
/* loop through keys and enforce size */
|
97
|
for ($i = 1; $i <= 4; $i++) {
|
98
|
if ($_POST['key' . $i]) {
|
99
|
/* 64 bit */
|
100
|
if(strlen($_POST['key' . $i]) == 5)
|
101
|
continue;
|
102
|
if(strlen($_POST['key' . $i]) == 10) {
|
103
|
/* hex key */
|
104
|
if(stristr($_POST['key' . $i], "0x") == false) {
|
105
|
$_POST['key' . $i] = "0x" . $_POST['key' . $i];
|
106
|
}
|
107
|
continue;
|
108
|
}
|
109
|
if(strlen($_POST['key' . $i]) == 12) {
|
110
|
/* hex key */
|
111
|
if(stristr($_POST['key' . $i], "0x") == false) {
|
112
|
$_POST['key' . $i] = "0x" . $_POST['key' . $i];
|
113
|
}
|
114
|
continue;
|
115
|
}
|
116
|
/* 128 bit */
|
117
|
if(strlen($_POST['key' . $i]) == 13)
|
118
|
continue;
|
119
|
if(strlen($_POST['key' . $i]) == 26) {
|
120
|
/* hex key */
|
121
|
if(stristr($_POST['key' . $i], "0x") == false) {
|
122
|
$_POST['key' . $i] = "0x" . $_POST['key' . $i];
|
123
|
}
|
124
|
continue;
|
125
|
}
|
126
|
if(strlen($_POST['key' . $i]) == 28)
|
127
|
continue;
|
128
|
$input_errors[] = "Invalid wep key size. Sizes should be 40 (64) bit keys or 104 (128) bit.";
|
129
|
break;
|
130
|
}
|
131
|
}
|
132
|
|
133
|
if (!$input_errors) {
|
134
|
|
135
|
$optcfg['wireless']['standard'] = $_POST['standard'];
|
136
|
$optcfg['wireless']['mode'] = $_POST['mode'];
|
137
|
$optcfg['wireless']['ssid'] = $_POST['ssid'];
|
138
|
$optcfg['wireless']['stationname'] = $_POST['stationname'];
|
139
|
$optcfg['wireless']['channel'] = $_POST['channel'];
|
140
|
$optcfg['wireless']['wme']['enable'] = $_POST['wme_enable'] ? true : false;
|
141
|
$optcfg['wireless']['pureg']['enable'] = $_POST['pureg_enable'] ? true : false;
|
142
|
$optcfg['wireless']['apbridge']['enable'] = $_POST['apbridge_enable'] ? true : false;
|
143
|
$optcfg['wireless']['turbo']['enable'] = $_POST['turbo_enable'] ? true : false;
|
144
|
$optcfg['wireless']['authmode'] = $_POST['authmode'];
|
145
|
$optcfg['wireless']['hidessid']['enable'] = $_POST['hidessid_enable'] ? true : false;
|
146
|
$optcfg['wireless']['txpower'] = $_POST['txpower'];
|
147
|
$optcfg['wireless']['wpa']['debug_mode'] = $_POST['debug_mode'] ? 1 : 0;
|
148
|
$optcfg['wireless']['wpa']['macaddr_acl'] = $_POST['macaddr_acl'];
|
149
|
$optcfg['wireless']['wpa']['auth_algs'] = $_POST['auth_algs'];
|
150
|
$optcfg['wireless']['wpa']['wpa_mode'] = $_POST['wpa_mode'];
|
151
|
$optcfg['wireless']['wpa']['wpa_key_mgmt'] = $_POST['wpa_key_mgmt'];
|
152
|
$optcfg['wireless']['wpa']['wpa_pairwise'] = $_POST['wpa_pairwise'];
|
153
|
$optcfg['wireless']['wpa']['wpa_group_rekey'] = $_POST['wpa_group_rekey'];
|
154
|
$optcfg['wireless']['wpa']['wpa_gmk_rekey'] = $_POST['wpa_gmk_rekey'];
|
155
|
$optcfg['wireless']['wpa']['wpa_strict_rekey'] = $_POST['wpa_strict_rekey'] ? 1 : 0;
|
156
|
$optcfg['wireless']['wpa']['passphrase'] = $_POST['passphrase'];
|
157
|
$optcfg['wireless']['wpa']['ieee8021x']['enable'] = $_POST['ieee8021x_enable'] ? 1 : 0;
|
158
|
$optcfg['wireless']['wpa']['ext_wpa_sw'] = $_POST['ext_wpa_sw'];
|
159
|
$optcfg['wireless']['wpa']['enable'] = $_POST['wpa_enable'] ? true : false;
|
160
|
$optcfg['wireless']['wep']['enable'] = $_POST['wep_enable'] ? true : false;
|
161
|
$optcfg['wireless']['wep']['key'] = array();
|
162
|
|
163
|
for ($i = 1; $i <= 4; $i++) {
|
164
|
if ($_POST['key' . $i]) {
|
165
|
$newkey = array();
|
166
|
$newkey['value'] = $_POST['key' . $i];
|
167
|
if ($_POST['txkey'] == $i)
|
168
|
$newkey['txkey'] = true;
|
169
|
$optcfg['wireless']['wep']['key'][] = $newkey;
|
170
|
}
|
171
|
}
|
172
|
}
|
173
|
|
174
|
return $input_errors;
|
175
|
}
|
176
|
|
177
|
function wireless_config_print() {
|
178
|
global $optcfg, $pconfig, $wlchannels, $g;
|
179
|
?>
|
180
|
|
181
|
<script language="JavaScript">
|
182
|
function openwindow(url) {
|
183
|
var oWin = window.open(url,"pfSensePop","width=620,height=400,top=150,left=150");
|
184
|
if (oWin==null || typeof(oWin)=="undefined") {
|
185
|
return false;
|
186
|
} else {
|
187
|
return true;
|
188
|
}
|
189
|
}
|
190
|
</script>
|
191
|
<tr>
|
192
|
<td colspan="2" valign="top" height="16"></td>
|
193
|
</tr>
|
194
|
|
195
|
<tr>
|
196
|
<td colspan="2" valign="top" class="listtopic">Wireless configuration</td>
|
197
|
</tr>
|
198
|
<tr>
|
199
|
<td valign="top" class="vncellreq">Standard</td>
|
200
|
<td class="vtable">
|
201
|
<select name="standard" class="formfld" id="standard">
|
202
|
<option <? if ($pconfig['standard'] == '11b') echo "selected";?> value="11b">802.11b</option>
|
203
|
<option <? if ($pconfig['standard'] == '11g') echo "selected";?> value="11g">802.11g</option>
|
204
|
<option <? if ($pconfig['standard'] == '11a') echo "selected";?> value="11a">802.11a</option>
|
205
|
</select>
|
206
|
</td>
|
207
|
</tr>
|
208
|
<tr>
|
209
|
<td valign="top" class="vncellreq">Mode</td>
|
210
|
<td class="vtable">
|
211
|
<select name="mode" class="formfld" id="mode">
|
212
|
<option <? if ($pconfig['mode'] == 'bss') echo "selected";?> value="bss">Infrastructure (BSS)</option>
|
213
|
<option <? if ($pconfig['mode'] == 'adhoc') echo "selected";?> value="adhoc">Ad-hoc (IBSS)</option>
|
214
|
<option <? if ($pconfig['mode'] == 'hostap') echo "selected";?> value="hostap">Access Point</option>
|
215
|
</select>
|
216
|
</td>
|
217
|
</tr>
|
218
|
<tr>
|
219
|
<td valign="top" class="vncellreq">SSID</td>
|
220
|
<td class="vtable"><?=$mandfldhtml;?><input name="ssid" type="text" class="formfld" id="ssid" size="20" value="<?=htmlspecialchars($pconfig['ssid']);?>">
|
221
|
</td>
|
222
|
</tr>
|
223
|
<tr>
|
224
|
<td valign="top" class="vncell">802.11g only</td>
|
225
|
<td class="vtable"><input name="pureg_enable" type="checkbox" class="formfld" id="pureg_enable" value="yes" <? if ($pconfig['pureg_enable']) echo "checked";?>>
|
226
|
<br/>When operating as an access point in 802.11g mode allow only 11g-capable stations to associate (11b-only stations are not permitted to associate).
|
227
|
</td>
|
228
|
</tr>
|
229
|
<tr>
|
230
|
<td valign="top" class="vncell">Allow intra-BSS communication</td>
|
231
|
<td class="vtable"><input name="apbridge_enable" type="checkbox" class="formfld" id="apbridge_enable" value="yes" <? if ($pconfig['apbridge_enable']) echo "checked";?>>
|
232
|
<br/>
|
233
|
When operating as an access point, enable this if you want to pass packets between wireless clients directly.
|
234
|
<br/>
|
235
|
Disabling the internal bridging is useful when traffic is to be processed with packet filtering.
|
236
|
</td>
|
237
|
</tr>
|
238
|
<tr>
|
239
|
<td valign="top" class="vncell">Enable turbo mode</td>
|
240
|
<td class="vtable"><input name="turbo_enable" type="checkbox" class="formfld" id="turbo_enable" value="yes" <? if ($pconfig['turbo_enable']) echo "checked";?>>
|
241
|
<br/>Setting this option will force the card to use turbo mode.
|
242
|
<br/>use "ifconfig interface list channel" to list turbo capable channels.
|
243
|
</td>
|
244
|
</tr>
|
245
|
<tr>
|
246
|
<td valign="top" class="vncell">Enable WME</td>
|
247
|
<td class="vtable"><input name="wme_enable" type="checkbox" class="formfld" id="wme_enable" value="yes" <? if ($pconfig['wme_enable']) echo "checked";?>>
|
248
|
<br/>Setting this option will force the card to use WME (wireless QoS).
|
249
|
</td>
|
250
|
</tr>
|
251
|
<tr>
|
252
|
<td valign="top" class="vncell">Enable Hide SSID</td>
|
253
|
<td class="vtable"><input name="hidessid_enable" type="checkbox" class="formfld" id="hidessid_enable" value="yes" <? if ($pconfig['hidessid_enable']) echo "checked";?>>
|
254
|
<br/>
|
255
|
Setting this option will force the card to NOT broadcast it's SSID
|
256
|
<br/>
|
257
|
(this might create problems for some clients). </td>
|
258
|
</tr>
|
259
|
<tr>
|
260
|
<td valign="top" class="vncellreq">Transmit power</td>
|
261
|
<td class="vtable">
|
262
|
<select name="txpower">
|
263
|
<?
|
264
|
for($x = 99; $x > 0; $x--) {
|
265
|
if($pconfig["txpower"] == $x)
|
266
|
$SELECTED = " SELECTED";
|
267
|
else
|
268
|
$SELECTED = "";
|
269
|
echo "<option {$SELECTED}>{$x}</option>\n";
|
270
|
}
|
271
|
?>
|
272
|
</select><br/>
|
273
|
Note: Typically only a few discreet power settings are available and the driver will use the setting closest to the specified value. Not all adaptors support changing the transmit power setting.
|
274
|
</td>
|
275
|
</tr>
|
276
|
<tr>
|
277
|
<td valign="top" class="vncellreq">Channel</td>
|
278
|
<td class="vtable"><select name="channel" class="formfld" id="channel">
|
279
|
<option <? if ($pconfig['channel'] == 0) echo "selected";?> value="0">Auto</option>
|
280
|
<?
|
281
|
foreach ($wlchannels as $channel): ?>
|
282
|
<option <? if ($channel == $pconfig['channel']) echo "selected";?> value="<?=$channel;?>">
|
283
|
<?=$channel;?>
|
284
|
</option>
|
285
|
<? endforeach; ?>
|
286
|
</select>
|
287
|
<br/>
|
288
|
Note: Not all channels may be supported by your card
|
289
|
<br/>
|
290
|
use "ifconfig interface list channel" to list channels.</td>
|
291
|
</tr>
|
292
|
<tr>
|
293
|
<td valign="top" class="vncell">Station name</td>
|
294
|
<td class="vtable"><input name="stationname" type="text" class="formfld" id="stationname" size="20" value="<?=htmlspecialchars($pconfig['stationname']);?>">
|
295
|
<br/>
|
296
|
Hint: this field can usually be left blank</td>
|
297
|
</tr>
|
298
|
<tr>
|
299
|
<td valign="top" class="vncell">WEP</td>
|
300
|
<td class="vtable"> <input name="wep_enable" type="checkbox" id="wep_enable" value="yes" <? if ($pconfig['wep_enable']) echo "checked"; ?>>
|
301
|
<strong>Enable WEP</strong>
|
302
|
<table border="0" cellspacing="0" cellpadding="0">
|
303
|
<tr>
|
304
|
<td> </td>
|
305
|
<td> </td>
|
306
|
<td> TX key </td>
|
307
|
</tr>
|
308
|
<tr>
|
309
|
<td>Key 1: </td>
|
310
|
<td> <input name="key1" type="text" class="formfld" id="key1" size="30" value="<?=htmlspecialchars($pconfig['key1']);?>"></td>
|
311
|
<td align="center"> <input name="txkey" type="radio" value="1" <? if ($pconfig['txkey'] == 1) echo "checked";?>></td>
|
312
|
</tr>
|
313
|
<tr>
|
314
|
<td>Key 2: </td>
|
315
|
<td> <input name="key2" type="text" class="formfld" id="key2" size="30" value="<?=htmlspecialchars($pconfig['key2']);?>"></td>
|
316
|
<td align="center"> <input name="txkey" type="radio" value="2" <? if ($pconfig['txkey'] == 2) echo "checked";?>></td>
|
317
|
</tr>
|
318
|
<tr>
|
319
|
<td>Key 3: </td>
|
320
|
<td> <input name="key3" type="text" class="formfld" id="key3" size="30" value="<?=htmlspecialchars($pconfig['key3']);?>"></td>
|
321
|
<td align="center"> <input name="txkey" type="radio" value="3" <? if ($pconfig['txkey'] == 3) echo "checked";?>></td>
|
322
|
</tr>
|
323
|
<tr>
|
324
|
<td>Key 4: </td>
|
325
|
<td> <input name="key4" type="text" class="formfld" id="key4" size="30" value="<?=htmlspecialchars($pconfig['key4']);?>"></td>
|
326
|
<td align="center"> <input name="txkey" type="radio" value="4" <? if ($pconfig['txkey'] == 4) echo "checked";?>></td>
|
327
|
</tr>
|
328
|
</table>
|
329
|
<br/>
|
330
|
40 (64) bit keys may be entered as 5 ASCII characters or 10 hex digits preceded by '0x'.<br/>
|
331
|
104 (128) bit keys may be entered as 13 ASCII characters or 26 hex digits preceded by '0x'.
|
332
|
<p>For assistance with creating keys, please see
|
333
|
<a href="javascript:if(openwindow('/wlan_strong_key_generator/generator.php') == false) alert('Popup blocker detected. Action aborted.');">WLAN Strong Key Generator</a>.
|
334
|
</td>
|
335
|
</tr>
|
336
|
<tr>
|
337
|
<td valign="top" class="vncell"><strong>WPA</strong></td>
|
338
|
<td class="vtable"><input name="wpa_enable" type="checkbox" class="formfld" id="wpa_enable" value="yes" <? if ($pconfig['wpa_enable']) echo "checked"; ?>>
|
339
|
<strong>Enable WPA</strong>
|
340
|
<br/><br/>
|
341
|
<table border="0" cellspacing="0" cellpadding="0">
|
342
|
<tr>
|
343
|
<td> </td>
|
344
|
<td> WPA Pre Shared Key </td>
|
345
|
</tr>
|
346
|
<tr>
|
347
|
<td>PSK: </td>
|
348
|
<td>
|
349
|
<input name="passphrase" type="text" class="formfld" id="passphrase" size="66" value="<?=htmlspecialchars($pconfig['passphrase']);?>">
|
350
|
</td>
|
351
|
</tr>
|
352
|
</table>
|
353
|
<br/>Passphrase must be from 8 to 63 chars.
|
354
|
</td>
|
355
|
</tr>
|
356
|
<tr>
|
357
|
<td valign="top" class="vncell">WPA Mode</td>
|
358
|
<td class="vtable"><select name="wpa_mode" class="formfld" id="wpa_mode">
|
359
|
<option <? if ($pconfig['wpa_mode'] == '1') echo "selected";?> value="1">WPA</option>
|
360
|
<option <? if ($pconfig['wpa_mode'] == '2') echo "selected";?> value="2">WPA2</option>
|
361
|
<option <? if ($pconfig['wpa_mode'] == '3') echo "selected";?> value="3">Both</option>
|
362
|
</select>
|
363
|
</td>
|
364
|
</tr>
|
365
|
<tr>
|
366
|
<td valign="top" class="vncell">WPA Key Management Mode</td>
|
367
|
<td class="vtable"><select name="wpa_key_mgmt" class="formfld" id="wpa_key_mgmt">
|
368
|
<option <? if ($pconfig['wpa_key_mgmt'] == 'WPA-PSK') echo "selected";?> value="WPA-PSK">Pre Shared Key</option>
|
369
|
<option <? if ($pconfig['wpa_key_mgmt'] == 'WPA-EAP') echo "selected";?> value="WPA-EAP">Extensible Authentication Protocol</option>
|
370
|
<option <? if ($pconfig['wpa_key_mgmt'] == 'WPA-PSK WPA-EAP') echo "selected";?> value="WPA-PSK WPA-EAP">Both</option>
|
371
|
</select>
|
372
|
</td>
|
373
|
</tr>
|
374
|
<tr>
|
375
|
<td valign="top" class="vncell">Enable MAC Filtering</td>
|
376
|
<td class="vtable"><input name="macaddr_acl_enable" type="checkbox" class="formfld" id="macaddr_acl_enable" value="yes"<? if ($pconfig['macaddr_acl_enable']) echo "checked"; ?>>
|
377
|
Setting this option will enable the use of a mac filterlist to allow deny association based on mac address
|
378
|
<br/><br/>
|
379
|
<select name="mac_acl" class="formfld" id="macaddr_acl">
|
380
|
<option <? if ($pconfig['macaddr_acl'] == '0') echo "selected";?> value="0">Allow</option>
|
381
|
<option <? if ($pconfig['macaddr_acl'] == '1') echo "selected";?> value="1">Deny</option>
|
382
|
<option <? if ($pconfig['macaddr_acl'] == '2') echo "selected";?> value="2">Radius</option>
|
383
|
</select>
|
384
|
<br/><br/>
|
385
|
Setting this to "Allow" will allow all clients in not in deny list, while "Deny" will deny all clients not in allow list. Radius will cause allow and deny list to be searched and then query radius.</br>
|
386
|
</td>
|
387
|
</tr>
|
388
|
<tr>
|
389
|
<td valign="top" class="vncell">Authentication</td>
|
390
|
<td class="vtable"><select name="auth_algs" class="formfld" id="auth_algs">
|
391
|
<option <? if ($pconfig['auth_algs'] == '1') echo "selected";?> value="1">Open System Authentication</option>
|
392
|
<option <? if ($pconfig['auth_algs'] == '2') echo "selected";?> value="2">Shared Key Authentication</option>
|
393
|
<option <? if ($pconfig['auth_algs'] == 'both') echo "selected";?> value="3">Both</option>
|
394
|
</select>
|
395
|
<br/>Note: Shared Key Authentication requires WEP.</br>
|
396
|
</td>
|
397
|
</tr>
|
398
|
<tr>
|
399
|
<td valign="top" class="vncell">WPA Pairwise</td>
|
400
|
<td class="vtable"><select name="wpa_pairwise" class="formfld" id="wpa_pairwise">
|
401
|
<option <? if ($pconfig['wpa_pairwise'] == 'CCMP TKIP') echo "selected";?> value="CCMP TKIP">Both</option>
|
402
|
<option <? if ($pconfig['wpa_pairwise'] == 'CCMP') echo "selected";?> value="CCMP">AES</option>
|
403
|
<option <? if ($pconfig['wpa_pairwise'] == 'TKIP') echo "selected";?> value="TKIP">TKIP</option>
|
404
|
</select>
|
405
|
</td>
|
406
|
</tr>
|
407
|
<tr>
|
408
|
<td valign="top" class="vncell">Key Rotation</td>
|
409
|
<td class="vtable"><input name="wpa_group_rekey" type="text" class="formfld" id="wpa_group_rekey" size="30" value="<? echo $pconfig['wpa_group_rekey'] ? $pconfig['wpa_group_rekey'] : "60";?>">
|
410
|
<br/>Allowed values are 1-9999 but should not be longer than Master Key Regeneration time.
|
411
|
</td>
|
412
|
</tr>
|
413
|
<tr>
|
414
|
<td valign="top" class="vncell">Master Key Regeneration</td>
|
415
|
<td class="vtable"><input name="wpa_gmk_rekey" type="text" class="formfld" id="wpa_gmk_rekey" size="30" value="<? echo $pconfig['wpa_gmk_rekey'] ? $pconfig['wpa_gmk_rekey'] : "3600";?>">
|
416
|
<br/>Allowed values are 1-9999 but should not be shorter than Key Rotation time.
|
417
|
</td>
|
418
|
</tr>
|
419
|
<tr>
|
420
|
<td valign="top" class="vncell">Strict Key Regeneration</td>
|
421
|
<td class="vtable"><input name="wpa_strict_rekey" type="checkbox" class="formfld" id="wpa_strict_rekey" value="1" <? if ($pconfig['wpa_strict_rekey']) echo "checked"; ?>>
|
422
|
<br/>Setting this option will force the AP to rekey whenever a client disassociates.
|
423
|
</td>
|
424
|
</tr>
|
425
|
<tr>
|
426
|
<td valign="top" class="vncell">Enable IEEE802.1X</td>
|
427
|
<td class="vtable"><input name="ieee8021x" type="checkbox" class="formfld" id="ieee8021x" value="1" <? if ($pconfig['ieee8021x']) echo "checked";?>>
|
428
|
<br/>Setting this option will enable 802.1x authentication.
|
429
|
</td>
|
430
|
</tr>
|
431
|
<? } ?>
|