diff options
author | jim-p <jimp@pfsense.org> | 2010-05-28 14:31:40 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2010-05-28 16:13:27 -0400 |
commit | 4ed2dde76fe84de43d0296ac1926da4898642c5f (patch) | |
tree | 4a2feed245ebbaaa3d56c4615f85041ff30c86c8 /etc/inc | |
parent | ddd1fb7f19f6496cb772db67e722720972ce8d5b (diff) | |
download | pfsense-4ed2dde76fe84de43d0296ac1926da4898642c5f.zip pfsense-4ed2dde76fe84de43d0296ac1926da4898642c5f.tar.gz |
Add per-user PSKs to racoon.
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/vpn.inc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index c874a83..f38a0ff 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -291,10 +291,17 @@ function vpn_ipsec_configure($ipchg = false) } } + /* Add user PSKs */ + foreach ($config['system']['user'] as $user) { + if (!empty($user['ipsecpsk'])) { + $pskconf .= "{$user['name']}\t{$user['ipsecpsk']}\n"; + } + } + /* add PSKs for mobile clients */ if (is_array($ipseccfg['mobilekey'])) { foreach ($ipseccfg['mobilekey'] as $key) { - $pskconf .= "{$key['ident']} {$key['pre-shared-key']}\n"; + $pskconf .= "{$key['ident']}\t{$key['pre-shared-key']}\n"; } } |