east:~#
 ipsec setup start
ipsec_setup: Starting Openswan IPsec VERSION
east:~#
 /testing/pluto/bin/wait-until-policy-loaded
east:~#
 ipsec whack --label "\"SAwest-east\" leftrsasigkey"  --keyid "@west" --pubkeyrsa "0sAQNzGEFs18VKT00sA+4p+GUKn9C55PYuPQca6C+9Qhj0jfMdQnTRTDLeI+lp9TnidHH7fVpq+PkfiF2LHlZtDwMurLlwzbNOghlEYKfQ080WlOTTUAmOLhAzH28MF70q3hzq0m5fCaVZWtxcV+LfHWdxceCkjBUSaTFtR2W12urFCBz+SB3+OM33aeIbfHxmck2yzhJ8xyMods5kF3ek/RZlFvgN8VqBdcFVrZwTh0mXDCGN12HNFixL6FzQ1jQKerKBbjb0m/IPqugvpVPWVIUajUpLMEmi1FAXc1mFZE9x1SFuSr0NzYIu2ZaHfvsAZY5oN+I+R2oC67fUCjgxY+t7"
east:~#
 ipsec whack --label "\"SAwest-east\" rightrsasigkey"  --keyid "@east" --pubkeyrsa "0sAQN3cn11FrBVbZhWGwRnFDAf8O9FHBmBIyIvmvt0kfkI2UGDDq8k+vYgRkwBZDviLd1p3SkL30LzuV0rqG3vBriqaAUUGoCQ0UMgsuX+k01bROLsqGB1QNXYvYiPLsnoDhKd2Gx9MUMHEjwwEZeyskMT5k91jvoAZvdEkg+9h7urbJ+kRQ4e+IHkMUrreDGwGVptV/hYQVCD54RZep6xp5ymaKRCDgMpzWvlzO80fP7JDjSZf9LI/MMu6c+qwXIKnWoNha75IhFyLWniVczxK2RdhmMhLsi0kC0CoOwWDSIEOb+5zbECDjjud+SF5tT8qRCWnSomX8jtbCdZ50WraQlL"
east:~#
 ipsec whack --name SAwest-east --encrypt --tunnel --pfs --rsasig --host "192.1.2.23"  --nexthop "192.1.2.45" --updown "ipsec _updown" --id "@east" --to --host "%any" --nexthop "%direct" --updown "ipsec _updown" --id "@west" --ipseclifetime "28800" --rekeymargin "540" --keyingtries "1"
002 added connection description "SAwest-east"
east:~#
 ipsec auto --status
000 using kernel interface: klips
000 interface ipsec0/eth1 192.1.2.23
000 %myid = (none)
000 debug none
000  
000 algorithm ESP encrypt: id=3, name=ESP_3DES, ivlen=64, keysizemin=192, keysizemax=192
000 algorithm ESP encrypt: id=12, name=ESP_AES, ivlen=128, keysizemin=128, keysizemax=256
000 algorithm ESP auth attr: id=1, name=AUTH_ALGORITHM_HMAC_MD5, keysizemin=128, keysizemax=128
000 algorithm ESP auth attr: id=2, name=AUTH_ALGORITHM_HMAC_SHA1, keysizemin=160, keysizemax=160
000 algorithm ESP auth attr: id=9, name=AUTH_ALGORITHM_AES_CBC, keysizemin=128, keysizemax=128
000  
000 algorithm IKE encrypt: id=3, name=OAKLEY_BLOWFISH_CBC, blocksize=8, keydeflen=128
000 algorithm IKE encrypt: id=5, name=OAKLEY_3DES_CBC, blocksize=8, keydeflen=192
000 algorithm IKE encrypt: id=7, name=OAKLEY_AES_CBC, blocksize=16, keydeflen=128
000 algorithm IKE encrypt: id=65004, name=OAKLEY_SERPENT_CBC, blocksize=16, keydeflen=128
000 algorithm IKE encrypt: id=65005, name=OAKLEY_TWOFISH_CBC, blocksize=16, keydeflen=128
000 algorithm IKE encrypt: id=65289, name=OAKLEY_TWOFISH_CBC_SSH, blocksize=16, keydeflen=128
000 algorithm IKE hash: id=1, name=OAKLEY_MD5, hashsize=16
000 algorithm IKE hash: id=2, name=OAKLEY_SHA1, hashsize=20
000 algorithm IKE hash: id=4, name=OAKLEY_SHA2_256, hashsize=32
000 algorithm IKE hash: id=6, name=OAKLEY_SHA2_512, hashsize=64
000 algorithm IKE dh group: id=2, name=OAKLEY_GROUP_MODP1024, bits=1024
000 algorithm IKE dh group: id=5, name=OAKLEY_GROUP_MODP1536, bits=1536
000 algorithm IKE dh group: id=14, name=OAKLEY_GROUP_MODP2048, bits=2048
000 algorithm IKE dh group: id=15, name=OAKLEY_GROUP_MODP3072, bits=3072
000 algorithm IKE dh group: id=16, name=OAKLEY_GROUP_MODP4096, bits=4096
000 algorithm IKE dh group: id=17, name=OAKLEY_GROUP_MODP6144, bits=6144
000 algorithm IKE dh group: id=18, name=OAKLEY_GROUP_MODP8192, bits=8192
000  
000 stats db_ops: {curr_cnt, total_cnt, maxsz} :context={0,0,0} trans={0,0,0} attrs={0,0,0}
000  
000 "packetdefault": 0.0.0.0/0===192.1.2.23[S=C]---192.1.2.254...%opportunistic[S=C]; prospective erouted; eroute owner: #0
000 "packetdefault":     myip=unset; hisip=unset;
000 "packetdefault":   ike_life: 3600s; ipsec_life: 1800s; rekey_margin: 0s; rekey_fuzz: 0%; keyingtries: 3
000 "packetdefault":   policy: RSASIG+ENCRYPT+TUNNEL+PFS+OPPORTUNISTIC+IKEv2ALLOW+failurePASS+lKOD+rKOD; prio: 0,0; interface: eth1; 
000 "packetdefault":   newest ISAKMP SA: #0; newest IPsec SA: #0; 
000 "SAwest-east": 192.1.2.23[@east]---192.1.2.45...%any[@west]; unrouted; eroute owner: #0
000 "SAwest-east":     myip=unset; hisip=unset; myup=ipsec _updown; hisup=ipsec _updown;
000 "SAwest-east":   ike_life: 3600s; ipsec_life: 28800s; rekey_margin: 540s; rekey_fuzz: 100%; keyingtries: 1
000 "SAwest-east":   policy: RSASIG+ENCRYPT+TUNNEL+PFS; prio: 32,32; interface: eth1; 
000 "SAwest-east":   newest ISAKMP SA: #0; newest IPsec SA: #0; 
000  
000  
east:~#
 

east:~#
 ipsec look
east NOW
0.0.0.0/0          -> 0.0.0.0/0          => %trap
ipsec0->eth1 mtu=16260(9999)->1500
tun0xTUN#@192.1.2.23 IPIP: dir=in  src=192.1.2.45 policy=192.1.2.45/32->192.1.2.23/32 flags=0x8<>  natencap=none natsport=0 natdport=0  
ROUTING TABLE
192.1.2.0/24 dev eth1  proto kernel  scope link  src 192.1.2.23
192.1.2.0/24 dev ipsec0  proto kernel  scope link  src 192.1.2.23
192.0.1.0/24 via 192.1.2.45 dev eth1
0.0.0.0/1 via 192.1.2.254 dev ipsec0
128.0.0.0/1 via 192.1.2.254 dev ipsec0
default via 192.1.2.254 dev eth1
east:~#
 ipsec auto --status
000 using kernel interface: klips
000 interface ipsec0/eth1 192.1.2.23
000 %myid = (none)
000 debug none
000  
000 algorithm ESP encrypt: id=3, name=ESP_3DES, ivlen=64, keysizemin=192, keysizemax=192
000 algorithm ESP encrypt: id=12, name=ESP_AES, ivlen=128, keysizemin=128, keysizemax=256
000 algorithm ESP auth attr: id=1, name=AUTH_ALGORITHM_HMAC_MD5, keysizemin=128, keysizemax=128
000 algorithm ESP auth attr: id=2, name=AUTH_ALGORITHM_HMAC_SHA1, keysizemin=160, keysizemax=160
000 algorithm ESP auth attr: id=9, name=AUTH_ALGORITHM_AES_CBC, keysizemin=128, keysizemax=128
000  
000 algorithm IKE encrypt: id=3, name=OAKLEY_BLOWFISH_CBC, blocksize=8, keydeflen=128
000 algorithm IKE encrypt: id=5, name=OAKLEY_3DES_CBC, blocksize=8, keydeflen=192
000 algorithm IKE encrypt: id=7, name=OAKLEY_AES_CBC, blocksize=16, keydeflen=128
000 algorithm IKE encrypt: id=65004, name=OAKLEY_SERPENT_CBC, blocksize=16, keydeflen=128
000 algorithm IKE encrypt: id=65005, name=OAKLEY_TWOFISH_CBC, blocksize=16, keydeflen=128
000 algorithm IKE encrypt: id=65289, name=OAKLEY_TWOFISH_CBC_SSH, blocksize=16, keydeflen=128
000 algorithm IKE hash: id=1, name=OAKLEY_MD5, hashsize=16
000 algorithm IKE hash: id=2, name=OAKLEY_SHA1, hashsize=20
000 algorithm IKE hash: id=4, name=OAKLEY_SHA2_256, hashsize=32
000 algorithm IKE hash: id=6, name=OAKLEY_SHA2_512, hashsize=64
000 algorithm IKE dh group: id=2, name=OAKLEY_GROUP_MODP1024, bits=1024
000 algorithm IKE dh group: id=5, name=OAKLEY_GROUP_MODP1536, bits=1536
000 algorithm IKE dh group: id=14, name=OAKLEY_GROUP_MODP2048, bits=2048
000 algorithm IKE dh group: id=15, name=OAKLEY_GROUP_MODP3072, bits=3072
000 algorithm IKE dh group: id=16, name=OAKLEY_GROUP_MODP4096, bits=4096
000 algorithm IKE dh group: id=17, name=OAKLEY_GROUP_MODP6144, bits=6144
000 algorithm IKE dh group: id=18, name=OAKLEY_GROUP_MODP8192, bits=8192
000  
000 stats db_ops: {curr_cnt, total_cnt, maxsz} :context={0,0,0} trans={0,0,0} attrs={0,0,0}
000  
000 "packetdefault": 0.0.0.0/0===192.1.2.23[S=C]---192.1.2.254...%opportunistic[S=C]; prospective erouted; eroute owner: #0
000 "packetdefault":     myip=unset; hisip=unset;
000 "packetdefault":   ike_life: 3600s; ipsec_life: 1800s; rekey_margin: 0s; rekey_fuzz: 0%; keyingtries: 3
000 "packetdefault":   policy: RSASIG+ENCRYPT+TUNNEL+PFS+OPPORTUNISTIC+IKEv2ALLOW+failurePASS+lKOD+rKOD; prio: 0,0; interface: eth1; 
000 "packetdefault":   newest ISAKMP SA: #0; newest IPsec SA: #0; 
000 "SAwest-east": 192.1.2.23[@east]---192.1.2.45...%any[@west]; unrouted; eroute owner: #0
000 "SAwest-east":     myip=unset; hisip=unset; myup=ipsec _updown; hisup=ipsec _updown;
000 "SAwest-east":   ike_life: 3600s; ipsec_life: 28800s; rekey_margin: 540s; rekey_fuzz: 100%; keyingtries: 1
000 "SAwest-east":   policy: RSASIG+ENCRYPT+TUNNEL+PFS; prio: 32,32; interface: eth1; 
000 "SAwest-east":   newest ISAKMP SA: #0; newest IPsec SA: #0; 
000  
000  
east:~#
 echo end
end

