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 /etc/inc | |
parent | 673e587db9f14bcd8e7ffd5e772db5bc72b0e0e7 (diff) | |
download | pfsense-71569a7e8498439750fa5b2fc33001de712b3805.zip pfsense-71569a7e8498439750fa5b2fc33001de712b3805.tar.gz |
Fix PPTP+RADIUS. See ticket #1926.
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/vpn.inc | 17 |
1 files changed, 13 insertions, 4 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 |