diff options
author | Ermal <eri@pfsense.org> | 2014-02-12 10:35:38 +0100 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2014-02-12 10:35:38 +0100 |
commit | 91287d1f4635c7149721b1c3eca918b8d827f1e2 (patch) | |
tree | 16a65f036d6853bf222438e29270b4fcba54ef98 /etc/inc/vpn.inc | |
parent | fe63645d95f4545274fa71b46502f3af0b71c034 (diff) | |
download | pfsense-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.inc | 16 |
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"; |