Project

General

Profile

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