summaryrefslogtreecommitdiffstats
path: root/etc/inc/vpn.inc
diff options
context:
space:
mode:
authorsullrich <sullrich@pfsense.org>2009-12-02 17:32:45 -0500
committersullrich <sullrich@pfsense.org>2009-12-02 17:32:45 -0500
commit045c9cc995a4f75ca2634a00c8ed23b1c711506d (patch)
treeb2fe27b19dad58e3b74244801e574feaa3c10ef2 /etc/inc/vpn.inc
parente2e8ab0af3679f05fa94e8603c6c9c9b9118d21d (diff)
downloadpfsense-045c9cc995a4f75ca2634a00c8ed23b1c711506d.zip
pfsense-045c9cc995a4f75ca2634a00c8ed23b1c711506d.tar.gz
Combine PPTP Server subnet and clients. Code imported from m0n0wall. Ticket #139
Diffstat (limited to 'etc/inc/vpn.inc')
-rw-r--r--etc/inc/vpn.inc19
1 files changed, 7 insertions, 12 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 6c82a9c..1f07ac7 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -976,30 +976,25 @@ function vpn_pptpd_configure() {
return 1;
}
- $mpdconf =<<<EOD
+ $mpdconf = <<<EOD
pptpd:
EOD;
- for ($i = 0; $i < $pptpdcfg['n_pptp_units']; $i++) {
+ for ($i = 0; $i < $g['n_pptp_units']; $i++) {
$mpdconf .= " load pt{$i}\n";
}
- for ($i = 0; $i < $pptpdcfg['n_pptp_units']; $i++) {
+ for ($i = 0; $i < $g['n_pptp_units']; $i++) {
$clientip = long2ip(ip2long($pptpdcfg['remoteip']) + $i);
+ $ngif = "ng" . ($i+1);
- 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";
- }
-
- $mpdconf .=<<<EOD
+ $mpdconf .= <<<EOD
pt{$i}:
- new pt{$i} pt{$i}
- {$isssue_ip_type}
+ new -i {$ngif} pt{$i} pt{$i}
+ set ipcp ranges {$pptpdcfg['localip']}/32 {$clientip}/32
load pts
EOD;
OpenPOWER on IntegriCloud