summaryrefslogtreecommitdiffstats
path: root/etc/inc/vpn.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2014-02-12 10:35:38 +0100
committerErmal <eri@pfsense.org>2014-02-12 10:35:38 +0100
commit91287d1f4635c7149721b1c3eca918b8d827f1e2 (patch)
tree16a65f036d6853bf222438e29270b4fcba54ef98 /etc/inc/vpn.inc
parentfe63645d95f4545274fa71b46502f3af0b71c034 (diff)
downloadpfsense-91287d1f4635c7149721b1c3eca918b8d827f1e2.zip
pfsense-91287d1f4635c7149721b1c3eca918b8d827f1e2.tar.gz
If specified add authentication script configuration to strongswan.conf
Diffstat (limited to 'etc/inc/vpn.inc')
-rw-r--r--etc/inc/vpn.inc16
1 files changed, 16 insertions, 0 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 30201a8..0e4b97b 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -343,6 +343,22 @@ EOD;
$strongswan .= "\t\t28679 = {$a_client['pfs_group']}\n";
$strongswan .= "\t\t}\n";
+ if ($a_client['user_source'] != "none") {
+ $strongswan .= "\txauth-generic {\n";
+ $strongswan .= "\t\tscript = /etc/inc/ipsec.auth.php";
+ $strongswan .= "\t\tauthcfg = ";
+ $firstsed = 0;
+ foreach ($authcfgs as $authcfg) {
+ if ($firstsed > 0)
+ $strongswan .= ",";
+ if ($authcfg == "system")
+ $authcfg = "Local Database";
+ $strongswan .= $authcfg;
+ $firstsed = 1;
+ }
+ $strongswan .= "\n";
+ $strongswan .= "\t}\n";
+ }
}
$strongswan .= "\t}\n}\n";
OpenPOWER on IntegriCloud