This is at http://www.sandelman.ottawa.on.ca/ietf/secwlan/KAME-SecWLan.txt 1. Make sure that you have FreeBSD XXX, NetBSD 1.5.x or better. 2. Make sure that you have from pkgsrc, racoon-20011215a You may need one patch, http://orange.kame.net/dev/cvsweb.cgi/kame/kame/kame/racoon/ipsec_doi.c.diff?r1=1.154&r2=1.155 if you wind up having to use PSK. We believe that it is unnecessary if you are using RSA public keys. 3. Generate a public key pair (certificate) if you have not already. e.g: openssl req -new -x509 -keyout newreq.pem -out newreq.pem -days VALID-DAYS This forces you to set a password, but you can remove it with XXX. 4. Extract your public key. Racoon only does X.509 right now. FreeSWAN only does raw RSA keys in DNS. Some translation is needed. Hopefully racoon will support raw RSA keys soon. Get fswcert-0.6-bsd.tar.gz. This is identical to the fswcert for Linux, but the termio.h has been replaced by termios.h. edit newreq.pem, split it up to /etc/openssl/certs and /etc/openssl/private do: echo -n myhost.dom.ain. 3600 IN KEY 16896 4 1 >mykey.dns perl -e 'print pack("H*", "'`fswcert --raw --cert mykey.pem`'");' | mmencode >>mykey.dns 5. Get your public key into DNS. If you are running Dynamic DNS, you can put this into your forward zone easily with something like the following, if you substiute your your private file, server and zone info. #!/bin/sh host=$1 keyrec=`cat mykey.dns` * nsupdate -d -v -k K$host.+157+26817.private <