diff options
author | jim-p <jim@pingle.org> | 2010-05-06 15:32:44 -0400 |
---|---|---|
committer | jim-p <jim@pingle.org> | 2010-05-06 15:33:07 -0400 |
commit | 2ef1b601209ce2d3fce5e25ac9c064f6be9c44cc (patch) | |
tree | e229b062ab96318dd44f379c392f884a706d1de1 | |
parent | 7d8a886abc2fad87537cf62028937c83381329f4 (diff) | |
download | pfsense-2ef1b601209ce2d3fce5e25ac9c064f6be9c44cc.zip pfsense-2ef1b601209ce2d3fce5e25ac9c064f6be9c44cc.tar.gz |
Write out IPsec PSKs for mobile clients. Part of ticket #108.
-rw-r--r-- | etc/inc/vpn.inc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 3aba988..daaf82c 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -291,6 +291,13 @@ function vpn_ipsec_configure($ipchg = false) } } + /* add PSKs for mobile clients */ + if (is_array($ipseccfg['mobilekey'])) { + foreach ($ipseccfg['mobilekey'] as $key) { + $pskconf .= "{$key['ident']} {$key['pre-shared-key']}\n"; + } + } + fwrite($fd, $pskconf); fclose($fd); chmod("{$g['varetc_path']}/psk.txt", 0600); |