Project

General

Profile

Download (21.6 KB) Statistics
| Branch: | Tag: | Revision:
1 5b237745 Scott Ullrich
<?php
2
/*
3
	vpn_pptp.php
4
	part of m0n0wall (http://m0n0.ch/wall)
5 e2411886 Scott Ullrich
	
6
	Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
7 5b237745 Scott Ullrich
	All rights reserved.
8 e2411886 Scott Ullrich
	
9 5b237745 Scott Ullrich
	Redistribution and use in source and binary forms, with or without
10
	modification, are permitted provided that the following conditions are met:
11 e2411886 Scott Ullrich
	
12 5b237745 Scott Ullrich
	1. Redistributions of source code must retain the above copyright notice,
13
	   this list of conditions and the following disclaimer.
14 e2411886 Scott Ullrich
	
15 5b237745 Scott Ullrich
	2. Redistributions in binary form must reproduce the above copyright
16
	   notice, this list of conditions and the following disclaimer in the
17
	   documentation and/or other materials provided with the distribution.
18 e2411886 Scott Ullrich
	
19 5b237745 Scott Ullrich
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
20
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
21
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
23
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
	POSSIBILITY OF SUCH DAMAGE.
29
*/
30
31 6b07c15a Matthew Grooms
##|+PRIV
32
##|*IDENT=page-vpn-vpnpptp
33
##|*NAME=VPN: VPN PPTP page
34
##|*DESCR=Allow access to the 'VPN: VPN PPTP' page.
35
##|*MATCH=vpn_pptp.php*
36
##|-PRIV
37
38 5b237745 Scott Ullrich
require("guiconfig.inc");
39 7a927e67 Scott Ullrich
require_once("functions.inc");
40
require_once("filter.inc");
41
require_once("shaper.inc");
42 483e6de8 Scott Ullrich
require_once("vpn.inc");
43 5b237745 Scott Ullrich
44
if (!is_array($config['pptpd']['radius'])) {
45
	$config['pptpd']['radius'] = array();
46
}
47
$pptpcfg = &$config['pptpd'];
48
49
$pconfig['remoteip'] = $pptpcfg['remoteip'];
50
$pconfig['localip'] = $pptpcfg['localip'];
51
$pconfig['redir'] = $pptpcfg['redir'];
52
$pconfig['mode'] = $pptpcfg['mode'];
53 10d470b9 Scott Ullrich
$pconfig['wins'] = $pptpcfg['wins'];
54 5b237745 Scott Ullrich
$pconfig['req128'] = isset($pptpcfg['req128']);
55 07cae4b2 Scott Ullrich
$pconfig['n_pptp_units'] = $pptpcfg['n_pptp_units'];
56 c8c416db Scott Ullrich
$pconfig['pptp_dns1'] = $pptpcfg['dns1'];
57
$pconfig['pptp_dns2'] = $pptpcfg['dns2'];
58 71569a7e jim-p
$pconfig['radiusenable'] = isset($pptpcfg['radius']['server']['enable']);
59 c8c416db Scott Ullrich
$pconfig['radiusissueips'] = isset($pptpcfg['radius']['radiusissueips']);
60
$pconfig['radiussecenable'] = isset($pptpcfg['radius']['server2']['enable']);
61
$pconfig['radacct_enable'] = isset($pptpcfg['radius']['accounting']);
62
$pconfig['radiusserver'] = $pptpcfg['radius']['server']['ip'];
63
$pconfig['radiusserverport'] = $pptpcfg['radius']['server']['port'];
64
$pconfig['radiusserveracctport'] = $pptpcfg['radius']['server']['acctport'];
65
$pconfig['radiussecret'] = $pptpcfg['radius']['server']['secret'];
66
$pconfig['radiusserver2'] = $pptpcfg['radius']['server2']['ip'];
67
$pconfig['radiusserver2port'] = $pptpcfg['radius']['server2']['port'];
68
$pconfig['radiusserver2acctport'] = $pptpcfg['radius']['server2']['acctport'];
69
$pconfig['radiussecret2'] = $pptpcfg['radius']['server2']['secret2'];
70
$pconfig['radius_acct_update'] = $pptpcfg['radius']['acct_update'];
71
$pconfig['radius_nasip'] = $pptpcfg['radius']['nasip'];
72 5b237745 Scott Ullrich
73
if ($_POST) {
74
75
	unset($input_errors);
76
	$pconfig = $_POST;
77
78
	/* input validation */
79
	if ($_POST['mode'] == "server") {
80
		$reqdfields = explode(" ", "localip remoteip");
81
		$reqdfieldsn = explode(",", "Server address,Remote start address");
82 e2411886 Scott Ullrich
		
83 5b237745 Scott Ullrich
		if ($_POST['radiusenable']) {
84
			$reqdfields = array_merge($reqdfields, explode(" ", "radiusserver radiussecret"));
85 e2411886 Scott Ullrich
			$reqdfieldsn = array_merge($reqdfieldsn, 
86 5b237745 Scott Ullrich
				explode(",", "RADIUS server address,RADIUS shared secret"));
87
		}
88 e2411886 Scott Ullrich
		
89 5b237745 Scott Ullrich
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
90 e2411886 Scott Ullrich
		
91 5b237745 Scott Ullrich
		if (($_POST['localip'] && !is_ipaddr($_POST['localip']))) {
92
			$input_errors[] = "A valid server address must be specified.";
93
		}
94 2f31946f jim-p
		if (!is_ipaddr($_POST['remoteip'])) {
95 5b237745 Scott Ullrich
			$input_errors[] = "A valid remote start address must be specified.";
96
		}
97
		if (($_POST['radiusserver'] && !is_ipaddr($_POST['radiusserver']))) {
98
			$input_errors[] = "A valid RADIUS server address must be specified.";
99
		}
100 e2411886 Scott Ullrich
		
101
		if (!$input_errors) {	
102 96033063 Erik Fonnesbeck
			$subnet_start = ip2ulong($_POST['remoteip']);
103
			$subnet_end = ip2ulong($_POST['remoteip']) + $_POST['n_pptp_units'] - 1;
104 e2411886 Scott Ullrich
						
105 96033063 Erik Fonnesbeck
			if ((ip2ulong($_POST['localip']) >= $subnet_start) && 
106
			    (ip2ulong($_POST['localip']) <= $subnet_end)) {
107 e2411886 Scott Ullrich
				$input_errors[] = "The specified server address lies in the remote subnet.";	
108 5b237745 Scott Ullrich
			}
109 2f31946f jim-p
			// TODO: Should this check be for any local IP address?
110 045c9cc9 sullrich
			if ($_POST['localip'] == $config['interfaces']['lan']['ipaddr']) {
111 e2411886 Scott Ullrich
				$input_errors[] = "The specified server address is equal to the LAN interface address.";	
112 5b237745 Scott Ullrich
			}
113
		}
114
	} else if ($_POST['mode'] == "redir") {
115
		$reqdfields = explode(" ", "redir");
116
		$reqdfieldsn = explode(",", "PPTP redirection target address");
117 e2411886 Scott Ullrich
		
118 5b237745 Scott Ullrich
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
119 e2411886 Scott Ullrich
		
120 5b237745 Scott Ullrich
		if (($_POST['redir'] && !is_ipaddr($_POST['redir']))) {
121
			$input_errors[] = "A valid target address must be specified.";
122
		}
123 64cc8755 Scott Ullrich
	} else {
124 963d012d Scott Ullrich
		unset($config['pptpd']['mode']);
125 5b237745 Scott Ullrich
	}
126
127
	if (!$input_errors) {
128
		$pptpcfg['remoteip'] = $_POST['remoteip'];
129
		$pptpcfg['redir'] = $_POST['redir'];
130 c8c416db Scott Ullrich
		$pptpcfg['localip'] = $_POST['localip'];
131 5b237745 Scott Ullrich
		$pptpcfg['mode'] = $_POST['mode'];
132 10d470b9 Scott Ullrich
		$pptpcfg['wins'] = $_POST['wins'];
133 07cae4b2 Scott Ullrich
		$pptpcfg['n_pptp_units'] = $_POST['n_pptp_units'];	
134 c8c416db Scott Ullrich
		$pptpcfg['radius']['server']['ip'] = $_POST['radiusserver'];
135
		$pptpcfg['radius']['server']['port'] = $_POST['radiusserverport'];
136
		$pptpcfg['radius']['server']['acctport'] = $_POST['radiusserveracctport'];
137
		$pptpcfg['radius']['server']['secret'] = $_POST['radiussecret'];
138
		$pptpcfg['radius']['server2']['ip'] = $_POST['radiusserver2'];
139
		$pptpcfg['radius']['server2']['port'] = $_POST['radiusserver2port'];
140
		$pptpcfg['radius']['server2']['acctport'] = $_POST['radiusserver2acctport'];
141
		$pptpcfg['radius']['server2']['secret2'] = $_POST['radiussecret2'];
142
		$pptpcfg['radius']['nasip'] = $_POST['radius_nasip'];
143
		$pptpcfg['radius']['acct_update'] = $_POST['radius_acct_update'];
144
145
 		if ($_POST['pptp_dns1'] == "") 
146
        		unset($pptpcfg['dns1']);
147
		else
148
			$pptpcfg['dns1'] = $_POST['pptp_dns1'];
149
150
 		if ($_POST['pptp_dns2'] == "") 
151
        		unset($pptpcfg['dns2']);
152
		else
153
			$pptpcfg['dns2'] = $_POST['pptp_dns2'];
154 33eaec88 Scott Ullrich
155
		if($_POST['req128'] == "yes") 
156
			$pptpcfg['req128'] = true;
157
		else
158
			unset($pptpcfg['req128']);
159
160
		if($_POST['radiusenable'] == "yes") 
161 c8c416db Scott Ullrich
			$pptpcfg['radius']['server']['enable'] = true;
162 33eaec88 Scott Ullrich
		else 
163 c8c416db Scott Ullrich
			unset($pptpcfg['radius']['server']['enable']);
164 e2411886 Scott Ullrich
			
165 07cae4b2 Scott Ullrich
		if($_POST['radiussecenable'] == "yes") 
166 c8c416db Scott Ullrich
			$pptpcfg['radius']['server']['enable'] = true;
167 07cae4b2 Scott Ullrich
		else 
168 c8c416db Scott Ullrich
			unset($pptpcfg['radius']['server2']['enable']);
169 07cae4b2 Scott Ullrich
			
170 33eaec88 Scott Ullrich
		if($_POST['radacct_enable'] == "yes") 
171
			$pptpcfg['radius']['accounting'] = true;
172
		else 
173
			unset($pptpcfg['radius']['accounting']);
174
		
175 07cae4b2 Scott Ullrich
		if($_POST['radiusissueips'] == "yes") {
176
			$pptpcfg['radius']['radiusissueips'] = true;
177
		} else
178
			unset($pptpcfg['radius']['radiusissueips']);
179
		
180 5b237745 Scott Ullrich
		write_config();
181 e2411886 Scott Ullrich
		
182 5b237745 Scott Ullrich
		$retval = 0;
183 72bd8df5 Ermal Lu?i
		$retval = vpn_pptpd_configure();
184 5b237745 Scott Ullrich
		$savemsg = get_std_save_message($retval);
185 34947a64 Scott Ullrich
		
186
		filter_configure();
187 5b237745 Scott Ullrich
	}
188
}
189 4df96eff Scott Ullrich
190 57a2e25f Scott Ullrich
$pgtitle = array("VPN","VPN PPTP");
191 4df96eff Scott Ullrich
include("head.inc");
192
193 5b237745 Scott Ullrich
?>
194 422f27c0 Scott Ullrich
195
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
196 e2411886 Scott Ullrich
<?php include("fbegin.inc"); ?>
197 5b237745 Scott Ullrich
<script language="JavaScript">
198
<!--
199
function get_radio_value(obj)
200
{
201
	for (i = 0; i < obj.length; i++) {
202
		if (obj[i].checked)
203
			return obj[i].value;
204
	}
205
	return null;
206
}
207
208
function enable_change(enable_over) {
209
	if ((get_radio_value(document.iform.mode) == "server") || enable_over) {
210
		document.iform.remoteip.disabled = 0;
211
		document.iform.localip.disabled = 0;
212
		document.iform.req128.disabled = 0;
213
		document.iform.radiusenable.disabled = 0;
214 a35c2033 Martin Fuchs
		document.iform.radiusissueips.disabled = 0;
215 4dd1d9af Scott Ullrich
		document.iform.wins.disabled = 0;
216 07cae4b2 Scott Ullrich
		document.iform.n_pptp_units.disabled = 0;
217 c8c416db Scott Ullrich
		document.iform.pptp_dns1.disabled = 0;
218
		document.iform.pptp_dns2.disabled = 0;	
219 e2411886 Scott Ullrich
		
220 5b237745 Scott Ullrich
		if (document.iform.radiusenable.checked || enable_over) {
221 07cae4b2 Scott Ullrich
			document.iform.radiussecenable.disabled = 0;
222 5b237745 Scott Ullrich
			document.iform.radacct_enable.disabled = 0;
223
			document.iform.radiusserver.disabled = 0;
224 c8c416db Scott Ullrich
			document.iform.radiusserverport.disabled = 0;
225
			document.iform.radiusserveracctport.disabled = 0;
226 5b237745 Scott Ullrich
			document.iform.radiussecret.disabled = 0;
227 07cae4b2 Scott Ullrich
			document.iform.radius_nasip.disabled = 0;	
228
			document.iform.radius_acct_update.disabled = 0;	
229
			document.iform.radiusissueips.disabled = 0;		
230 c8c416db Scott Ullrich
			if (document.iform.radiussecenable.checked || enable_over) {
231
				document.iform.radiusserver2.disabled = 0;
232
				document.iform.radiussecret2.disabled = 0;
233
				document.iform.radiusserver2port.disabled = 0;
234
				document.iform.radiusserver2acctport.disabled = 0;
235
			} else {
236
	
237
				document.iform.radiusserver2.disabled = 1;
238
				document.iform.radiussecret2.disabled = 1;
239
				document.iform.radiusserver2port.disabled = 1;
240
				document.iform.radiusserver2acctport.disabled = 1;
241
			}	
242 5b237745 Scott Ullrich
		} else {
243
			document.iform.radacct_enable.disabled = 1;
244
			document.iform.radiusserver.disabled = 1;
245 c8c416db Scott Ullrich
			document.iform.radiusserverport.disabled = 1;
246 a35c2033 Martin Fuchs
			document.iform.radiusissueips.disabled = 1;
247 c8c416db Scott Ullrich
			document.iform.radiusserveracctport.disabled = 1;
248 5b237745 Scott Ullrich
			document.iform.radiussecret.disabled = 1;
249 07cae4b2 Scott Ullrich
			document.iform.radius_nasip.disabled = 1;	
250
			document.iform.radius_acct_update.disabled = 1;	
251
			document.iform.radiusissueips.disabled = 1;
252
		}
253
254 5b237745 Scott Ullrich
	} else {
255
		document.iform.remoteip.disabled = 1;
256
		document.iform.localip.disabled = 1;
257
		document.iform.req128.disabled = 1;
258 07cae4b2 Scott Ullrich
		document.iform.n_pptp_units.disabled = 1;
259 c8c416db Scott Ullrich
		document.iform.pptp_dns1.disabled = 1;
260
		document.iform.pptp_dns2.disabled = 1;
261 5b237745 Scott Ullrich
		document.iform.radiusenable.disabled = 1;
262
		document.iform.radacct_enable.disabled = 1;
263
		document.iform.radiusserver.disabled = 1;
264 c8c416db Scott Ullrich
		document.iform.radiusserverport.disabled = 1;
265 a35c2033 Martin Fuchs
		document.iform.radiusissueips.disabled = 1;
266 c8c416db Scott Ullrich
		document.iform.radiusserveracctport.disabled = 1;
267 5b237745 Scott Ullrich
		document.iform.radiussecret.disabled = 1;
268 07cae4b2 Scott Ullrich
		document.iform.radius_nasip.disabled = 1;	
269
		document.iform.radius_acct_update.disabled = 1;
270
		document.iform.radiussecenable.disabled = 1;
271
		document.iform.radiusserver2.disabled = 1;
272 c8c416db Scott Ullrich
		document.iform.radiusserver2port.disabled = 1;
273
		document.iform.radiusserver2acctport.disabled = 1;
274 07cae4b2 Scott Ullrich
		document.iform.radiussecret2.disabled = 1;	
275 4dd1d9af Scott Ullrich
		document.iform.wins.disabled = 1;
276 07cae4b2 Scott Ullrich
		document.iform.radiusissueips.disabled = 1;
277 5b237745 Scott Ullrich
	}
278
	if ((get_radio_value(document.iform.mode) == "redir") || enable_over) {
279
		document.iform.redir.disabled = 0;
280
	} else {
281
		document.iform.redir.disabled = 1;
282
	}
283
}
284
//-->
285
</script>
286
<form action="vpn_pptp.php" method="post" name="iform" id="iform">
287
<?php if ($input_errors) print_input_errors($input_errors); ?>
288
<?php if ($savemsg) print_info_box($savemsg); ?>
289
<table width="100%" border="0" cellpadding="0" cellspacing="0">
290 e2411886 Scott Ullrich
  <tr><td class="tabnavtbl">
291 17982382 Scott Ullrich
<?php
292
	$tab_array = array();
293
	$tab_array[0] = array("Configuration", true, "vpn_pptp.php");
294
	$tab_array[1] = array("Users", false, "vpn_pptp_users.php");
295
	display_top_tabs($tab_array);
296
?>  
297 5b237745 Scott Ullrich
  </td></tr>
298 e2411886 Scott Ullrich
  <tr> 
299 96f8c1e2 Bill Marquette
    <td>
300
<div id="mainarea">
301
              <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
302 e2411886 Scott Ullrich
                <tr> 
303 5b237745 Scott Ullrich
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
304 e2411886 Scott Ullrich
                  <td width="78%" class="vtable"> 
305 5b237745 Scott Ullrich
                    <input name="mode" type="radio" onclick="enable_change(false)" value="off"
306
				  	<?php if (($pconfig['mode'] != "server") && ($pconfig['mode'] != "redir")) echo "checked";?>>
307
                    Off</td>
308 e2411886 Scott Ullrich
                <tr> 
309 5b237745 Scott Ullrich
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
310
                  <td width="78%" class="vtable">
311 c8c416db Scott Ullrich
			<input type="radio" name="mode" value="redir" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "redir") echo "checked"; ?>>
312 5b237745 Scott Ullrich
                    Redirect incoming PPTP connections to:</td>
313 e2411886 Scott Ullrich
                <tr> 
314 5b237745 Scott Ullrich
                  <td width="22%" valign="top" class="vncellreq">PPTP redirection</td>
315 e2411886 Scott Ullrich
                  <td width="78%" class="vtable"> 
316 b5c78501 Seth Mos
                    <?=$mandfldhtml;?><input name="redir" type="text" class="formfld unknown" id="redir" size="20" value="<?=htmlspecialchars($pconfig['redir']);?>"> 
317 5b237745 Scott Ullrich
                    <br>
318 e2411886 Scott Ullrich
                    Enter the IP address of a host which will accept incoming 
319 5b237745 Scott Ullrich
                    PPTP connections.</td>
320 e2411886 Scott Ullrich
                <tr> 
321 5b237745 Scott Ullrich
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
322
                  <td width="78%" class="vtable">
323 c8c416db Scott Ullrich
			<input type="radio" name="mode" value="server" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "server") echo "checked"; ?>>
324 5b237745 Scott Ullrich
                    Enable PPTP server</td>
325 c8c416db Scott Ullrich
                </tr>
326 f2b4ff2b sullrich
				<tr>
327
					<td width="22%" valign="top" class="vncellreq">No. PPTP users</td>
328
					<td width="78%" class="vtable">
329
						<select id="n_pptp_units" name="n_pptp_units">
330
							<?php
331 1f6f0076 jim-p
								$toselect = ($pconfig['n_pptp_units'] > 0) ? $pconfig['n_pptp_units'] : 16;
332
								for($x=1; $x<255; $x++) {
333
									if($x == $toselect)
334 f2b4ff2b sullrich
										$SELECTED = " SELECTED";
335
									else
336
										$SELECTED = "";
337
									echo "<option value=\"{$x}\"{$SELECTED}>{$x}</option>\n";
338
								}
339
							?>
340
						</select>
341
						<br>Hint: 10 is TEN pptp clients
342
					</td>
343
				</tr>
344 e2411886 Scott Ullrich
                <tr> 
345 5b237745 Scott Ullrich
                  <td width="22%" valign="top" class="vncellreq">Server address</td>
346 e2411886 Scott Ullrich
                  <td width="78%" class="vtable"> 
347 b5c78501 Seth Mos
                    <?=$mandfldhtml;?><input name="localip" type="text" class="formfld unknown" id="localip" size="20" value="<?=htmlspecialchars($pconfig['localip']);?>"> 
348 5b237745 Scott Ullrich
                    <br>
349 e2411886 Scott Ullrich
                    Enter the IP address the PPTP server should use on its side 
350 5b237745 Scott Ullrich
                    for all clients.</td>
351
                </tr>
352 e2411886 Scott Ullrich
                <tr> 
353
                  <td width="22%" valign="top" class="vncellreq">Remote address 
354 5b237745 Scott Ullrich
                    range</td>
355 e2411886 Scott Ullrich
                  <td width="78%" class="vtable"> 
356 b5c78501 Seth Mos
                    <?=$mandfldhtml;?><input name="remoteip" type="text" class="formfld unknown" id="remoteip" size="20" value="<?=htmlspecialchars($pconfig['remoteip']);?>">
357 5b237745 Scott Ullrich
                    <br>
358 6c762c62 Chris Buechler
                    Specify the starting address for the client IP subnet.<br>
359 07cae4b2 Scott Ullrich
                </tr>
360 c8c416db Scott Ullrich
                <tr> 
361 92d5144e Chris Buechler
                  <td width="22%" valign="top" class="vncell">PPTP DNS Servers</td>
362 c8c416db Scott Ullrich
                  <td width="78%" class="vtable"> 
363 b5c78501 Seth Mos
                    <?=$mandfldhtml;?><input name="pptp_dns1" type="text" class="formfld unknown" id="pptp_dns1" size="20" value="<?=htmlspecialchars($pconfig['pptp_dns1']);?>">
364 c8c416db Scott Ullrich
                    <br>
365 045c9cc9 sullrich
					<input name="pptp_dns2" type="text" class="formfld unknown" id="pptp_dns2" size="20" value="<?=htmlspecialchars($pconfig['pptp_dns2']);?>">
366 c8c416db Scott Ullrich
                    <br>
367 6c762c62 Chris Buechler
                   primary and secondary DNS servers assigned to PPTP clients<br>
368 c8c416db Scott Ullrich
                </tr>
369
                <tr> 
370
                  <td width="22%" valign="top" class="vncell">WINS Server</td>
371
                  <td width="78%" valign="top" class="vtable">
372 b5c78501 Seth Mos
                      <input name="wins" class="formfld unknown" id="wins" size="20" value="<?=htmlspecialchars($pconfig['wins']);?>">
373 c8c416db Scott Ullrich
                  </td>
374
                </tr>
375 e2411886 Scott Ullrich
                <tr> 
376 5b237745 Scott Ullrich
                  <td width="22%" valign="top" class="vncell">RADIUS</td>
377 e2411886 Scott Ullrich
                  <td width="78%" class="vtable"> 
378
                      <input name="radiusenable" type="checkbox" id="radiusenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiusenable']) echo "checked"; ?>>
379 c8c416db Scott Ullrich
                      <strong>Use a RADIUS server for authentication</strong><br>
380
                      When set, all users will be authenticated using 
381 e2411886 Scott Ullrich
                      the RADIUS server specified below. The local user database 
382 5b237745 Scott Ullrich
                      will not be used.<br>
383
                      <br>
384 e2411886 Scott Ullrich
                      <input name="radacct_enable" type="checkbox" id="radacct_enable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radacct_enable']) echo "checked"; ?>>
385 5b237745 Scott Ullrich
                      <strong>Enable RADIUS accounting <br>
386 c8c416db Scott Ullrich
                      </strong>Sends accounting packets to the RADIUS server.<br>
387
			 <br>
388
                      <input name="radiussecenable" type="checkbox" id="radiussecenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiussecenable']) echo "checked"; ?>>
389 6c762c62 Chris Buechler
                      <strong>Secondary RADIUS server for failover authentication</strong><br>
390 f9f160b1 Chris Buechler
                      When set, all requests will go to the secondary server when primary fails<br>
391
		      <br>
392
                      <input name="radiusissueips" value="yes" type="checkbox" class="formfld" id="radiusissueips"<?php if($pconfig['radiusissueips']) echo " CHECKED"; ?>>
393
		      <strong>RADIUS issued IPs</strong>
394
                      <br>Issue IP addresses via RADIUS server.
395
		      </td>
396
                 </td>
397 c8c416db Scott Ullrich
                </tr>
398
                <tr> 
399 6c762c62 Chris Buechler
                  <td width="22%" valign="top" class="vncell">RADIUS NAS IP</td>
400 c8c416db Scott Ullrich
                  <td width="78%" valign="top" class="vtable">
401 b5c78501 Seth Mos
                      <input name="radius_nasip" class="formfld unknown" id="radius_nasip" size="20" value="<?=htmlspecialchars($pconfig['radius_nasip']);?>">
402 c8c416db Scott Ullrich
                  </td>
403 f9f160b1 Chris Buechler
		</tr>
404 c8c416db Scott Ullrich
                <tr> 
405 6c762c62 Chris Buechler
                  <td width="22%" valign="top" class="vncell">RADIUS Accounting Update</td>
406 c8c416db Scott Ullrich
                  <td width="78%" valign="top" class="vtable">
407 b5c78501 Seth Mos
                      <input name="radius_acct_update" class="formfld unknown" id="radius_acct_update" size="20" value="<?=htmlspecialchars($pconfig['radius_acct_update']);?>">
408 c8c416db Scott Ullrich
                  </td>
409 f9f160b1 Chris Buechler
		</tr>
410 e2411886 Scott Ullrich
                <tr> 
411 6c762c62 Chris Buechler
                  <td width="22%" valign="top" class="vncell">RADIUS Server </td>
412 78cf56c6 Scott Ullrich
                  <td width="78%" class="vtable">
413 b5c78501 Seth Mos
                      <input name="radiusserver" type="text" class="formfld unknown" id="radiusserver" size="20" value="<?=htmlspecialchars($pconfig['radiusserver']);?>">
414
                      <input name="radiusserverport" type="text" class="formfld unknown" id="radiusserverport" size="4" value="<?=htmlspecialchars($pconfig['radiusserverport']);?>">
415
                      <input name="radiusserveracctport" type="text" class="formfld unknown" id="radiusserveracctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserveracctport']);?>">
416 5b237745 Scott Ullrich
                      <br>
417 ba9d3f07 Chris Buechler
                      Enter the IP address, RADIUS port, and RADIUS accounting port of the RADIUS server.</td>
418 5b237745 Scott Ullrich
                </tr>
419 e2411886 Scott Ullrich
                <tr> 
420 5b237745 Scott Ullrich
                  <td width="22%" valign="top" class="vncell">RADIUS shared secret</td>
421 78cf56c6 Scott Ullrich
                  <td width="78%" valign="top" class="vtable">
422 b5c78501 Seth Mos
                      <input name="radiussecret" type="password" class="formfld pwd" id="radiussecret" size="20" value="<?=htmlspecialchars($pconfig['radiussecret']);?>">
423 5b237745 Scott Ullrich
                      <br>
424 e2411886 Scott Ullrich
                      Enter the shared secret that will be used to authenticate 
425
                      to the RADIUS server.</td>
426 07cae4b2 Scott Ullrich
                </tr>
427
                <tr> 
428 6c762c62 Chris Buechler
                  <td width="22%" valign="top" class="vncell">Secondary RADIUS server </td>
429 07cae4b2 Scott Ullrich
                  <td width="78%" class="vtable">
430 b5c78501 Seth Mos
                      <input name="radiusserver2" type="text" class="formfld unknown" id="radiusserver2" size="20" value="<?=htmlspecialchars($pconfig['radiusserver2']);?>">
431
                      <input name="radiusserver2port" type="text" class="formfld unknown" id="radiusserver2port" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2port']);?>">
432
                      <input name="radiusserver2acctport" type="text" class="formfld unknown" id="radiusserver2acctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2acctport']);?>">
433 07cae4b2 Scott Ullrich
                      <br>
434 ba9d3f07 Chris Buechler
                      Enter the IP address, RADIUS port, and RADIUS accounting port of the RADIUS server.</td>
435 07cae4b2 Scott Ullrich
                </tr>
436
                <tr> 
437 6c762c62 Chris Buechler
                  <td width="22%" valign="top" class="vncell">Secondary RADIUS shared secret</td>
438 07cae4b2 Scott Ullrich
                  <td width="78%" valign="top" class="vtable">
439 b5c78501 Seth Mos
                      <input name="radiussecret2" type="password" class="formfld pwd" id="radiussecret2" size="20" value="<?=htmlspecialchars($pconfig['radiussecret2']);?>">
440 07cae4b2 Scott Ullrich
                      <br>
441
                      Enter the shared secret that will be used to authenticate 
442 6c762c62 Chris Buechler
                      to the secondary RADIUS server.</td>
443 07cae4b2 Scott Ullrich
                </tr>
444 e2411886 Scott Ullrich
                <tr> 
445 5b237745 Scott Ullrich
                  <td height="16" colspan="2" valign="top"></td>
446
                </tr>
447 e2411886 Scott Ullrich
                <tr> 
448 5b237745 Scott Ullrich
                  <td width="22%" valign="middle">&nbsp;</td>
449 e2411886 Scott Ullrich
                  <td width="78%" class="vtable"> 
450
                    <input name="req128" type="checkbox" id="req128" value="yes" <?php if ($pconfig['req128']) echo "checked"; ?>> 
451 5b237745 Scott Ullrich
                    <strong>Require 128-bit encryption</strong><br>
452 6c762c62 Chris Buechler
                    When set, only 128-bit encryption will be accepted. Otherwise 
453
                    40-bit and 56-bit encryption will be accepted as well. Note that 
454 e2411886 Scott Ullrich
                    encryption will always be forced on PPTP connections (i.e. 
455 5b237745 Scott Ullrich
                    unencrypted connections will not be accepted).</td>
456
                </tr>
457 e2411886 Scott Ullrich
                <tr> 
458 5b237745 Scott Ullrich
                  <td width="22%" valign="top">&nbsp;</td>
459 e2411886 Scott Ullrich
                  <td width="78%"> 
460
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)"> 
461 5b237745 Scott Ullrich
                  </td>
462
                </tr>
463 e2411886 Scott Ullrich
                <tr> 
464
                  <td width="22%" valign="top">&nbsp;</td>
465
                  <td width="78%"><span class="vexpl"><span class="red"><strong>Note:<br>
466 c55a8ab9 Holger Bauer
                    </strong></span>don't forget to <a href="firewall_rules.php?if=pptp">add a firewall rule</a> to permit 
467 e2411886 Scott Ullrich
                    traffic from PPTP clients!</span></td>
468
                </tr>
469 5b237745 Scott Ullrich
              </table>
470 96f8c1e2 Bill Marquette
</div>
471 e2411886 Scott Ullrich
			</td>
472 5b237745 Scott Ullrich
	</tr>
473
</table>
474
</form>
475
<script language="JavaScript">
476
<!--
477
enable_change(false);
478
//-->
479
</script>
480
<?php include("fend.inc"); ?>
481 9999b3aa Scott Ullrich
</body>
482
</html>