(racoon2 85) Re: Could you please teach PSK file syntax to us?
Fukumoto Atsushi <[email protected]> Tue, 06 Mar 2007 19:10:14 +0900
| Newsgroups | gmane.network.ipv6.kame.racoon |
|---|---|
| Message-ID | <[email protected]> |
racoon2 has totally different configuration file structure, including
PSK file. You should forget about racoon (v1).
For racoon2, you should prepare PSK files for each peer, each file
containing single pre-shared key in plain binary data.
Let's suppose you are setting up Host-A to communicate with Host-B and
Host-C. Relevant portion of racoon2.conf on Host-A should be:
setval { PSKDIR "/usr/local/racoon2/etc/psk" };
remote Host-B {
....;
kmp_auth_method { psk; };
pre_shared_key "${PSKDIR}/a-b.psk";
....;
};
remote Host-C {
....;
kmp_auth_method { psk; };
pre_shared_key "${PSKDIR}/a-c.psk";
....;
};
Then, you need to prepare /usr/local/racoon2/etc/psk/a-b.psk and
a-c.psk. racoon2 package contains a perl script "pskgen" to handle
it, if you like it.
% PSKDIR=/usr/local/racoon2/etc/psk
% echo presharedkeyforAandB | pskgen -i - -o $PSKDIR/a-b.psk
% echo presharedkeyforAandC | pskgen -i - -o $PSKDIR/a-c.psk
If your pre-shared keys are in hexadecimal format, add -h option to
pskgen:
% echo 0x536563726574206b6579 | pskgen -i - -h -o $PSKDIR/a-b.psk
It can be totally random data, if you like it:
% dd if=/dev/random of=$PSKDIR/a-b.psk count=1
You'll need to transfer it to hostB electronically (such as using
scp), instead of typing it in, though.
Hope this helps,
FUKUMOTO Atsushi
[email protected]