diff options
author | jim-p <jim@pingle.org> | 2009-05-12 16:29:10 -0400 |
---|---|---|
committer | jim-p <jim@pingle.org> | 2009-05-12 16:29:10 -0400 |
commit | 71569a7e8498439750fa5b2fc33001de712b3805 (patch) | |
tree | 3d7aeb29e035494739eb59f476faa255fe025794 | |
parent | 673e587db9f14bcd8e7ffd5e772db5bc72b0e0e7 (diff) | |
download | pfsense-71569a7e8498439750fa5b2fc33001de712b3805.zip pfsense-71569a7e8498439750fa5b2fc33001de712b3805.tar.gz |
Fix PPTP+RADIUS. See ticket #1926.
-rw-r--r-- | etc/inc/vpn.inc | 17 | ||||
-rwxr-xr-x | usr/local/www/vpn_pptp.php | 2 |
2 files changed, 14 insertions, 5 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 5f4cad2..365d376 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -968,7 +968,7 @@ EOD; $clientip = long2ip(ip2long($pptpdcfg['remoteip']) + $i); - if(isset($pptpdcfg['radius']['radiusissueips']) && isset($pptpdcfg['radius']['enable'])) { + if(isset($pptpdcfg['radius']['radiusissueips']) && isset($pptpdcfg['radius']['server']['enable'])) { $isssue_ip_type = "set ipcp ranges {$pptpdcfg['localip']}/32 0.0.0.0/0"; } else { $isssue_ip_type = "set ipcp ranges {$pptpdcfg['localip']}/32 {$clientip}/32"; @@ -1031,11 +1031,20 @@ EOD; $mpdconf .= " set ipcp dns " . join(" ", $syscfg['dnsserver']) . "\n"; } - if (isset ($pptpdcfg['radius']['enable'])) { - $authport = isset($pptpdcfg['radius']['port']) ? $pptpdcfg['radius']['port'] : 1812; + if (isset ($pptpdcfg['radius']['server']['enable'])) { + $authport = (isset($pptpdcfg['radius']['server']['port']) && strlen($pptpdcfg['radius']['server']['port']) > 1) ? $pptpdcfg['radius']['server']['port'] : 1812; $acctport = $authport + 1; $mpdconf .=<<<EOD - set radius server {$pptpdcfg['radius']['server']} "{$pptpdcfg['radius']['secret']}" {$authport} {$acctport} + set radius server {$pptpdcfg['radius']['server']['ip']} "{$pptpdcfg['radius']['server']['secret']}" {$authport} {$acctport} +EOD; + if (isset ($pptpdcfg['radius']['server2']['enable'])) { + $authport = (isset($pptpdcfg['radius']['server2']['port']) && strlen($pptpdcfg['radius']['server2']['port']) > 1) ? $pptpdcfg['radius']['server2']['port'] : 1812; + $acctport = $authport + 1; + $mpdconf .=<<<EOD + set radius server {$pptpdcfg['radius']['server2']['ip']} "{$pptpdcfg['radius']['server2']['secret']}" {$authport} {$acctport} +EOD; + } + $mpdconf .=<<<EOD set radius retries 3 set radius timeout 10 set auth enable radius-auth diff --git a/usr/local/www/vpn_pptp.php b/usr/local/www/vpn_pptp.php index 6f01353..7f9f80a 100755 --- a/usr/local/www/vpn_pptp.php +++ b/usr/local/www/vpn_pptp.php @@ -53,7 +53,7 @@ $pconfig['n_pptp_units'] = $pptpcfg['n_pptp_units']; $pconfig['pptp_subnet'] = $pptpcfg['pptp_subnet']; $pconfig['pptp_dns1'] = $pptpcfg['dns1']; $pconfig['pptp_dns2'] = $pptpcfg['dns2']; -$pconfig['radiusenable'] = isset($pptpcfg['radius']['enable']); +$pconfig['radiusenable'] = isset($pptpcfg['radius']['server']['enable']); $pconfig['radiusissueips'] = isset($pptpcfg['radius']['radiusissueips']); $pconfig['radiussecenable'] = isset($pptpcfg['radius']['server2']['enable']); $pconfig['radacct_enable'] = isset($pptpcfg['radius']['accounting']); |