Project

General

Profile

Download (20.7 KB) Statistics
| Branch: | Tag: | Revision:
1 3818935a Scott Ullrich
<?php
2
/*
3
	vpn_pppoe.php
4
	part of pfSense
5
	
6
	Copyright (C) 2005 Scott Ullrich (sullrich@gmail.com)
7
	All rights reserved.
8
	
9
	Redistribution and use in source and binary forms, with or without
10
	modification, are permitted provided that the following conditions are met:
11
	
12
	1. Redistributions of source code must retain the above copyright notice,
13
	   this list of conditions and the following disclaimer.
14
	
15
	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
	
19
	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
require("guiconfig.inc");
32
33
if (!is_array($config['pppoe']['radius'])) {
34
	$config['pppoe']['radius'] = array();
35
}
36
$pppoecfg = &$config['pppoe'];
37
38
$pconfig['remoteip'] = $pppoecfg['remoteip'];
39
$pconfig['localip'] = $pppoecfg['localip'];
40
$pconfig['mode'] = $pppoecfg['mode'];
41 83773ab0 Scott Ullrich
$pconfig['interface'] = $pppoecfg['interface'];
42 a429d105 Scott Ullrich
$pconfig['n_pppoe_units'] = $pppoecfg['n_pppoe_units'];
43 47facba8 Scott Ullrich
$pconfig['pppoe_subnet'] = $pppoecfg['pppoe_subnet'];
44 c8c416db Scott Ullrich
$pconfig['pppoe_dns1'] = $pppoecfg['dns1'];
45
$pconfig['pppoe_dns2'] = $pppoecfg['dns2'];
46
$pconfig['radacct_enable'] = isset($pppoecfg['radius']['accounting']);
47
$pconfig['radiusissueips'] = isset($pppoecfg['radius']['radiusissueips']);
48
$pconfig['radiusenable'] = isset($pppoecfg['radius']['server']['enable']);
49
$pconfig['radiusserver'] = $pppoecfg['radius']['server']['ip'];
50
$pconfig['radiusserverport'] = $pppoecfg['radius']['server']['port'];
51
$pconfig['radiusserveracctport'] = $pppoecfg['radius']['server']['acctport'];
52
$pconfig['radiussecret'] = $pppoecfg['radius']['server']['secret'];
53
$pconfig['radiussecenable'] = isset($pppoecfg['radius']['server2']['enable']);
54
$pconfig['radiusserver2'] = $pppoecfg['radius']['server2']['ip'];
55
$pconfig['radiusserver2port'] = $pppoecfg['radius']['server2']['port'];
56
$pconfig['radiusserver2acctport'] = $pppoecfg['radius']['server2']['acctport'];
57
$pconfig['radiussecret2'] = $pppoecfg['radius']['server2']['secret2'];
58
$pconfig['radiusissueips'] = isset($pppoecfg['radius']['radiusissueips']);
59
$pconfig['radius_nasip'] = $pppoecfg['radius']['nasip'];
60
$pconfig['radius_acct_update'] = $pppoecfg['radius']['acct_update'];
61
62 3818935a Scott Ullrich
63
if ($_POST) {
64
65
	unset($input_errors);
66
	$pconfig = $_POST;
67
68
	/* input validation */
69
	if ($_POST['mode'] == "server") {
70
		$reqdfields = explode(" ", "localip remoteip");
71
		$reqdfieldsn = explode(",", "Server address,Remote start address");
72
		
73
		if ($_POST['radiusenable']) {
74
			$reqdfields = array_merge($reqdfields, explode(" ", "radiusserver radiussecret"));
75
			$reqdfieldsn = array_merge($reqdfieldsn, 
76
				explode(",", "RADIUS server address,RADIUS shared secret"));
77
		}
78
		
79
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
80
		
81
		if (($_POST['localip'] && !is_ipaddr($_POST['localip']))) {
82
			$input_errors[] = "A valid server address must be specified.";
83
		}
84
		if (($_POST['subnet'] && !is_ipaddr($_POST['remoteip']))) {
85
			$input_errors[] = "A valid remote start address must be specified.";
86
		}
87
		if (($_POST['radiusserver'] && !is_ipaddr($_POST['radiusserver']))) {
88
			$input_errors[] = "A valid RADIUS server address must be specified.";
89
		}
90
		
91
		if (!$input_errors) {	
92
			$_POST['remoteip'] = $pconfig['remoteip'] = gen_subnet($_POST['remoteip'], $g['pppoe_subnet']);
93
			$subnet_start = ip2long($_POST['remoteip']);
94 47facba8 Scott Ullrich
			$subnet_end = ip2long($_POST['remoteip']) + $g['pppoe_subnet'] - 1;
95 3818935a Scott Ullrich
						
96
			if ((ip2long($_POST['localip']) >= $subnet_start) && 
97
			    (ip2long($_POST['localip']) <= $subnet_end)) {
98
				$input_errors[] = "The specified server address lies in the remote subnet.";	
99
			}
100
			if ($_POST['localip'] == $config['interfaces']['lan']['ipaddr']) {
101
				$input_errors[] = "The specified server address is equal to the LAN interface address.";	
102
			}
103
		}
104 e09def9e Scott Ullrich
	} else {
105
		/* turning pppoe off, lets dump any custom rules */
106
		$rules = &$config['filter']['rule'];
107
		for($x=0; $x<count($rules); $x++) {
108
			if($rules[$x]['interface'] == "pppoe") { 
109
				unset($rules[$x]);
110
			}
111
		}
112 7446b407 Scott Ullrich
		unset($config['pppoe']);
113 e09def9e Scott Ullrich
		write_config();		
114 3818935a Scott Ullrich
	}
115 3e73f3a8 Scott Ullrich
	
116 3818935a Scott Ullrich
	if (!$input_errors) {
117
		$pppoecfg['remoteip'] = $_POST['remoteip'];
118
		$pppoecfg['localip'] = $_POST['localip'];
119
		$pppoecfg['mode'] = $_POST['mode'];
120 83773ab0 Scott Ullrich
		$pppoecfg['interface'] = $_POST['interface'];
121 a429d105 Scott Ullrich
		$pppoecfg['n_pppoe_units'] = $_POST['n_pppoe_units'];	
122 47facba8 Scott Ullrich
		$pppoecfg['pppoe_subnet'] = $_POST['pppoe_subnet'];
123 c8c416db Scott Ullrich
		$pppoecfg['radius']['server']['ip'] = $_POST['radiusserver'];
124
		$pppoecfg['radius']['server']['secret'] = $_POST['radiussecret'];
125
		$pppoecfg['radius']['server']['port'] = $_POST['radiusserverport'];
126
		$pppoecfg['radius']['server']['acctport'] = $_POST['radiusserveracctport'];
127
		$pppoecfg['radius']['server2']['ip'] = $_POST['radiusserver2'];
128
		$pppoecfg['radius']['server2']['secret2'] = $_POST['radiussecret2'];
129
		$pppoecfg['radius']['server2']['port'] = $_POST['radiusserver2port'];
130
		$pppoecfg['radius']['server2']['acctport'] = $_POST['radiusserver2acctport'];
131
		$pppoecfg['radius']['nasip'] = $_POST['radius_nasip'];
132
		$pppoecfg['radius']['acct_update'] = $_POST['radius_acct_update'];
133
134
 		if ($_POST['pppoe_dns1'] == "") 
135
        		unset($pppoecfg['dns1']);
136
		else
137
			$pppoecfg['dns1'] = $_POST['pppoe_dns1'];
138
139
 		if ($_POST['pppoe_dns2'] == "") 
140
        		unset($pppoecfg['dns2']);
141
		else
142
			$pppoecfg['dns2'] = $_POST['pppoe_dns2'];
143 83773ab0 Scott Ullrich
144 33eaec88 Scott Ullrich
		if($_POST['radiusenable'] == "yes")
145 c8c416db Scott Ullrich
			$pppoecfg['radius']['server']['enable'] = true;
146 33eaec88 Scott Ullrich
		else
147 c8c416db Scott Ullrich
			unset($pppoecfg['radius']['server']['enable']);
148 33eaec88 Scott Ullrich
			
149 c8c416db Scott Ullrich
		if($_POST['radiussecenable'] == "yes")
150
			$pppoecfg['radius']['server2']['enable'] = true;
151 07cae4b2 Scott Ullrich
		else
152 c8c416db Scott Ullrich
			unset($pppoecfg['radius']['server2']['enable']);
153 07cae4b2 Scott Ullrich
			
154 33eaec88 Scott Ullrich
		if($_POST['radacct_enable'] == "yes")
155
			$pppoecfg['radius']['accounting'] = true;
156
		else
157
			unset($pppoecfg['radius']['accounting']);
158
159 4b128721 Scott Ullrich
		if($_POST['radiusissueips'] == "yes") {
160 5dfdc1fb Scott Ullrich
			$pppoecfg['radius']['radiusissueips'] = true;
161 4b128721 Scott Ullrich
		} else
162 5dfdc1fb Scott Ullrich
			unset($pppoecfg['radius']['radiusissueips']);
163
164 3818935a Scott Ullrich
		write_config();
165
		
166
		$retval = 0;
167
		
168
		config_lock();
169 88964924 Scott Ullrich
		$retval = vpn_setup();
170 3818935a Scott Ullrich
		config_unlock();
171
		
172
		$savemsg = get_std_save_message($retval);
173
	}
174
}
175
176 6c1721d8 Scott Ullrich
$pgtitle = array("Services","PPPoE Server");
177 3818935a Scott Ullrich
include("head.inc");
178
179
?>
180
181
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
182
<?php include("fbegin.inc"); ?>
183
<script language="JavaScript">
184
<!--
185
function get_radio_value(obj)
186
{
187
	for (i = 0; i < obj.length; i++) {
188
		if (obj[i].checked)
189
			return obj[i].value;
190
	}
191
	return null;
192
}
193
194
function enable_change(enable_over) {
195
	if ((get_radio_value(document.iform.mode) == "server") || enable_over) {
196
		document.iform.remoteip.disabled = 0;
197
		document.iform.localip.disabled = 0;
198
		document.iform.radiusenable.disabled = 0;
199 5287f0e6 Scott Ullrich
		document.iform.interface.disabled = 0;
200
		document.iform.n_pppoe_units.disabled = 0;		
201 47facba8 Scott Ullrich
		document.iform.pppoe_subnet.disabled = 0;		
202 c8c416db Scott Ullrich
		document.iform.pppoe_dns1.disabled = 0;
203
		document.iform.pppoe_dns2.disabled = 0;		
204 3818935a Scott Ullrich
		if (document.iform.radiusenable.checked || enable_over) {
205
			document.iform.radacct_enable.disabled = 0;
206
			document.iform.radiusserver.disabled = 0;
207
			document.iform.radiussecret.disabled = 0;
208 c8c416db Scott Ullrich
			document.iform.radiusserverport.disabled = 0;
209
			document.iform.radiusserveracctport.disabled = 0;
210 4b128721 Scott Ullrich
			document.iform.radiusissueips.disabled = 0;
211 07cae4b2 Scott Ullrich
			document.iform.radius_nasip.disabled = 0;
212
			document.iform.radiusissueips.disabled = 0;
213
			document.iform.radius_nasip.disabled = 0;
214
			document.iform.radius_acct_update = 0;
215 c8c416db Scott Ullrich
			document.iform.radiussecenable.disabled = 0;
216
			if (document.iform.radiussecenable.checked || enable_over) {
217
				document.iform.radiusserver2.disabled = 0;
218
				document.iform.radiussecret2.disabled = 0;
219
				document.iform.radiusserver2port.disabled = 0;
220
				document.iform.radiusserver2acctport.disabled = 0;
221 07cae4b2 Scott Ullrich
			} else {
222
223
				document.iform.radiusserver2.disabled = 1;
224
				document.iform.radiussecret2.disabled = 1;
225 c8c416db Scott Ullrich
				document.iform.radiusserver2port.disabled = 1;
226
				document.iform.radiusserver2acctport.disabled = 1;
227 07cae4b2 Scott Ullrich
			}
228 3818935a Scott Ullrich
		} else {
229
			document.iform.radacct_enable.disabled = 1;
230
			document.iform.radiusserver.disabled = 1;
231
			document.iform.radiussecret.disabled = 1;
232 c8c416db Scott Ullrich
			document.iform.radiusserverport.disabled = 1;
233
			document.iform.radiusserveracctport.disabled = 1;
234 4b128721 Scott Ullrich
			document.iform.radiusissueips.disabled = 1;
235 07cae4b2 Scott Ullrich
			document.iform.radius_nasip.disabled = 1;
236
			document.iform.radius_acct_update = 1;
237 c8c416db Scott Ullrich
			document.iform.radiussecenable.disabled = 1;
238 3818935a Scott Ullrich
		}
239
	} else {
240 5287f0e6 Scott Ullrich
		document.iform.interface.disabled = 1;
241
		document.iform.n_pppoe_units.disabled = 1;		
242 47facba8 Scott Ullrich
		document.iform.pppoe_subnet.disabled = 1;		
243 3818935a Scott Ullrich
		document.iform.remoteip.disabled = 1;
244
		document.iform.localip.disabled = 1;
245 c8c416db Scott Ullrich
		document.iform.pppoe_dns1.disabled = 1;
246
		document.iform.pppoe_dns2.disabled = 1;
247 3818935a Scott Ullrich
		document.iform.radiusenable.disabled = 1;
248 c8c416db Scott Ullrich
		document.iform.radiussecenable.disabled = 1;
249 3818935a Scott Ullrich
		document.iform.radacct_enable.disabled = 1;
250
		document.iform.radiusserver.disabled = 1;
251
		document.iform.radiussecret.disabled = 1;
252 c8c416db Scott Ullrich
		document.iform.radiusserverport.disabled = 1;
253
		document.iform.radiusserveracctport.disabled = 1;
254 07cae4b2 Scott Ullrich
		document.iform.radiusserver2.disabled = 1;
255
		document.iform.radiussecret2.disabled = 1;
256 c8c416db Scott Ullrich
		document.iform.radiusserver2port.disabled = 1;
257
		document.iform.radiusserver2acctport.disabled = 1;
258 4b128721 Scott Ullrich
		document.iform.radiusissueips.disabled = 1;
259 07cae4b2 Scott Ullrich
		document.iform.radius_nasip.disabled = 1;
260
		document.iform.radius_acct_update = 1;
261 3818935a Scott Ullrich
	}
262
}
263
//-->
264
</script>
265
<form action="vpn_pppoe.php" method="post" name="iform" id="iform">
266
<?php if ($input_errors) print_input_errors($input_errors); ?>
267
<?php if ($savemsg) print_info_box($savemsg); ?>
268
<table width="100%" border="0" cellpadding="0" cellspacing="0">
269
  <tr><td class="tabnavtbl">
270
<?php
271
	$tab_array = array();
272
	$tab_array[0] = array("Configuration", true, "vpn_pppoe.php");
273
	$tab_array[1] = array("Users", false, "vpn_pppoe_users.php");
274
	display_top_tabs($tab_array);
275
?>  
276
  </td></tr>
277
  <tr> 
278
    <td>
279 3e73f3a8 Scott Ullrich
	<div id="mainarea">
280 3818935a Scott Ullrich
              <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
281
                <tr> 
282
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
283
                  <td width="78%" class="vtable"> 
284
                    <input name="mode" type="radio" onclick="enable_change(false)" value="off"
285
				  	<?php if (($pconfig['mode'] != "server") && ($pconfig['mode'] != "redir")) echo "checked";?>>
286
                    Off</td>
287 3e73f3a8 Scott Ullrich
		</tr>
288 3818935a Scott Ullrich
                <tr> 
289
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
290
                  <td width="78%" class="vtable">
291 3e73f3a8 Scott Ullrich
		    <input type="radio" name="mode" value="server" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "server") echo "checked"; ?>>
292 3818935a Scott Ullrich
                    Enable PPPoE server</td>
293 3e73f3a8 Scott Ullrich
		</tr>
294
295 64391455 Scott Ullrich
                <tr> 
296
                  <td width="22%" valign="top" class="vncell"><b>Interface</b></td>
297
                  <td width="78%" valign="top" class="vtable">
298
299 b5c78501 Seth Mos
			<select name="interface" class="formselect" id="interface">
300 64391455 Scott Ullrich
			  <?php
301 3e321df2 Ermal Luçi
				$interfaces = get_configured_interface_with_descr();
302
303 64391455 Scott Ullrich
				foreach ($interfaces as $iface => $ifacename):
304
			  ?>
305
			  <option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo "selected"; ?>>
306
			  <?=htmlspecialchars($ifacename);?>
307
			  </option>
308
			  <?php endforeach; ?>
309
			</select> <br>			
310
                      
311
		  </td>
312
                </tr>
313 3818935a Scott Ullrich
                <tr> 
314 c0503ad3 Scott Ullrich
                  <td width="22%" valign="top" class="vncellreq">Subnet netmask</td>
315 a429d105 Scott Ullrich
                  <td width="78%" class="vtable">
316 47facba8 Scott Ullrich
		    <select id="pppoe_subnet" name="pppoe_subnet">
317 a429d105 Scott Ullrich
		    <?php
318
		     for($x=0; $x<33; $x++) {
319 47facba8 Scott Ullrich
			if($x == $pconfig['pppoe_subnet'])
320 a429d105 Scott Ullrich
				$SELECTED = " SELECTED";
321
			else
322
				$SELECTED = "";
323 50667263 Scott Ullrich
			echo "<option value=\"{$x}\"{$SELECTED}>{$x}</option>\n";			
324 a429d105 Scott Ullrich
		     }
325
		    ?>
326
		    </select>
327 c0503ad3 Scott Ullrich
		    <br>Hint: 24 is 255.255.255.0
328 3818935a Scott Ullrich
                  </td>
329 3e73f3a8 Scott Ullrich
		</tr>
330 47facba8 Scott Ullrich
                <tr> 
331
                  <td width="22%" valign="top" class="vncellreq">No. PPPOE users</td>
332
                  <td width="78%" class="vtable">
333
		    <select id="n_pppoe_units" name="n_pppoe_units">
334
		    <?php
335
		     for($x=0; $x<255; $x++) {
336
			if($x == $pconfig['n_pppoe_units'])
337
				$SELECTED = " SELECTED";
338
			else
339
				$SELECTED = "";
340
			echo "<option value=\"{$x}\"{$SELECTED}>{$x}</option>\n";			
341
		     }
342
		    ?>
343
		    </select>
344
		    <br>Hint: 10 is TEN pppoe clients
345
                  </td>
346
		</tr>
347 3818935a Scott Ullrich
                <tr> 
348
                  <td width="22%" valign="top" class="vncellreq">Server address</td>
349
                  <td width="78%" class="vtable"> 
350 b5c78501 Seth Mos
                    <?=$mandfldhtml;?><input name="localip" type="text" class="formfld unknown" id="localip" size="20" value="<?=htmlspecialchars($pconfig['localip']);?>"> 
351 3818935a Scott Ullrich
                    <br>
352
                    Enter the IP address the PPPoE server should use on its side 
353
                    for all clients.</td>
354
                </tr>
355
                <tr> 
356 3e73f3a8 Scott Ullrich
                  <td width="22%" valign="top" class="vncellreq">Remote address range</td>
357 3818935a Scott Ullrich
                  <td width="78%" class="vtable"> 
358 b5c78501 Seth Mos
                    <?=$mandfldhtml;?><input name="remoteip" type="text" class="formfld unknown" id="remoteip" size="20" value="<?=htmlspecialchars($pconfig['remoteip']);?>">
359 3818935a Scott Ullrich
                    <br>
360
                    Specify the starting address for the client IP address subnet.<br>
361 aa58165b Scott Ullrich
                    </td>
362 3818935a Scott Ullrich
                </tr>
363 c8c416db Scott Ullrich
                <tr> 
364
                  <td width="22%" valign="top" class="vncellreq">DNS servers</td>
365
                  <td width="78%" class="vtable"> 
366 b5c78501 Seth Mos
                    <?=$mandfldhtml;?><input name="pppoe_dns1" type="text" class="formfld unkown" id="pppoe_dns1" size="20" value="<?=htmlspecialchars($pconfig['pppoe_dns1']);?>">
367 c8c416db Scott Ullrich
                    <br>
368 b5c78501 Seth Mos
			<input name="pppoe_dns2" type="text" class="formfld unknown" id="pppoe_dns2" size="20" value="<?=htmlspecialchars($pconfig['pppoe_dns2']);?>">
369 c8c416db Scott Ullrich
                    <br>
370
                    If entered they will be given to all pppoe clients else lan dns and one wan dns will go to all clients<br>
371
                    </td>
372
                </tr>
373 3818935a Scott Ullrich
                <tr> 
374
                  <td width="22%" valign="top" class="vncell">RADIUS</td>
375
                  <td width="78%" class="vtable"> 
376
                      <input name="radiusenable" type="checkbox" id="radiusenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiusenable']) echo "checked"; ?>>
377
                      <strong>Use a RADIUS server for authentication<br>
378
                      </strong>When set, all users will be authenticated using 
379
                      the RADIUS server specified below. The local user database 
380
                      will not be used.<br>
381
                      <br>
382
                      <input name="radacct_enable" type="checkbox" id="radacct_enable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radacct_enable']) echo "checked"; ?>>
383
                      <strong>Enable RADIUS accounting <br>
384 c8c416db Scott Ullrich
			 <br>
385
                      </strong>Sends accounting packets to the RADIUS server.<br>
386
                      <input name="radiussecenable" type="checkbox" id="radiussecenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiussecenable']) echo "checked"; ?>>
387
                      <strong>Use Backup Radius Server</strong><br>
388
                      When set, if primary server fails all requests will be sent via backup server</td>
389
                </tr>
390
                <tr> 
391
                  <td width="22%" valign="top" class="vncellreq">NAS IP ADDRESS</td>
392
                  <td width="78%" class="vtable"> 
393 b5c78501 Seth Mos
                    <?=$mandfldhtml;?><input name="radius_nasip" type="text" class="formfld unknown" id="radius_nasip" size="20" value="<?=htmlspecialchars($pconfig['radius_nasip']);?>">
394 c8c416db Scott Ullrich
                    <br>radius server NAS ip Address<br>
395
                    </td>
396
                </tr>
397
                <tr> 
398
                  <td width="22%" valign="top" class="vncellreq">Radius Accounting Update</td>
399
                  <td width="78%" class="vtable"> 
400 b5c78501 Seth Mos
                    <?=$mandfldhtml;?><input name="radius_acct_update" type="text" class="formfld unknown" id="radius_acct_update" size="20" value="<?=htmlspecialchars($pconfig['radius_acct_update']);?>">
401 c8c416db Scott Ullrich
                    <br>Radius accounting update period in seconds
402
                    </td>
403
                </tr>
404
                <tr> 
405
                  <td width="22%" valign="top" class="vncell">RADIUS issued IP's</td>
406
                  <td width="78%" valign="top" class="vtable">
407
                      <input name="radiusissueips" value="yes" type="checkbox" class="formfld" id="radiusissueips"<?php if($pconfig['radiusissueips']) echo " CHECKED"; ?>>
408
                      <br>Issue IP Addresses via RADIUS server.</td>
409 3818935a Scott Ullrich
                </tr>
410
                <tr> 
411 07cae4b2 Scott Ullrich
                  <td width="22%" valign="top" class="vncell">RADIUS server Primary</td>
412 3818935a 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 c8c416db Scott Ullrich
                      <br>Enter the IP address and portof the RADIUS server. Format ip auth_port acct_port<br>
417
			 <br> standard port 1812 and 1813 accounting</td>
418 3818935a Scott Ullrich
                </tr>
419
                <tr> 
420 07cae4b2 Scott Ullrich
                  <td width="22%" valign="top" class="vncell">RADIUS primary shared secret</td>
421 3818935a 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 c8c416db Scott Ullrich
                      <br>Enter the shared secret that will be used to authenticate 
424 3818935a Scott Ullrich
                      to the RADIUS server.</td>
425 07cae4b2 Scott Ullrich
                </tr>
426
                <tr> 
427
                  <td width="22%" valign="top" class="vncell">RADIUS server Secondary</td>
428
                  <td width="78%" class="vtable">
429 b5c78501 Seth Mos
                      <input name="radiusserver2" type="text" class="formfld unknown" id="radiusserver2" size="20" value="<?=htmlspecialchars($pconfig['radiusserver2']);?>">
430
			 <input name="radiusserver2port" type="text" class="formfld unknown" id="radiusserver2port" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2port']);?>">
431
			 <input name="radiusserver2acctport" type="text" class="formfld unknown" id="radiusserver2acctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2acctport']);?>">
432 c8c416db Scott Ullrich
                      <br>Enter the IP address and port of the BACKUP RADIUS server. Format ip auth_port acct_port<br>
433
			 <br> standard port 1812 and 1813 accounting</td>
434 07cae4b2 Scott Ullrich
                </tr>
435
                <tr> 
436
                  <td width="22%" valign="top" class="vncell">RADIUS secondary shared secret</td>
437
                  <td width="78%" valign="top" class="vtable">
438 b5c78501 Seth Mos
                      <input name="radiussecret2" type="password" class="formfld pwd" id="radiussecret2" size="20" value="<?=htmlspecialchars($pconfig['radiussecret2']);?>">
439 07cae4b2 Scott Ullrich
                      <br>
440
                      Enter the shared secret that will be used to authenticate 
441
                      to the RADIUS server.</td>
442
                </tr>
443 3818935a Scott Ullrich
                <tr> 
444
                  <td height="16" colspan="2" valign="top"></td>
445
                </tr>
446
                <tr> 
447
                  <td width="22%" valign="top">&nbsp;</td>
448
                  <td width="78%"> 
449
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)"> 
450
                  </td>
451
                </tr>
452
                <tr> 
453
                  <td width="22%" valign="top">&nbsp;</td>
454
                  <td width="78%"><span class="vexpl"><span class="red"><strong>Note:<br>
455
                    </strong></span>don't forget to add a firewall rule to permit 
456
                    traffic from PPPoE clients!</span></td>
457
                </tr>
458
              </table>
459 3e73f3a8 Scott Ullrich
	   </div>
460
	 </td>
461 3818935a Scott Ullrich
	</tr>
462
</table>
463
</form>
464
<script language="JavaScript">
465
<!--
466
enable_change(false);
467
//-->
468
</script>
469
<?php include("fend.inc"); ?>
470
</body>
471
</html>