3
# (C) 2004 Ken Bantoft <ken@xelerance.com>
5
# This script converts most Cisco VPN client .pcf files to Openswan's
6
# ipsec.conf and ipsec.secrets format
9
die "Usage: ./pcf2os.pl cisco-config.pcf\n\n" if ! $ARGV[0];
15
if (m/^description/i) {
40
print "ipsec.conf\n\n";
42
print " ike=3des-md5-modp1024\n";
43
print " aggrmode=yes\n";
44
print " authby=secret\n";
45
print " left=%defaultroute\n";
46
print " leftid=\@$groupname\n";
47
print " leftxauthclient=yes\n";
48
print " leftmodecfgclient=yes\n";
49
print " right=$right\n";
50
print " rightxauthserver=yes\n";
51
print " rightmodecfgserver=yes\n";
56
print "ipsec.secrets:\n\n";
57
print "\@$groupname $right : PSK \"$grouppassword\"\n";