[Openswan Users] DH group phase2 confusedly

Ozai ozai.tien at gmail.com
Thu Jan 24 01:20:06 EST 2013


Dear Sirs,

I try to change the DH group to make the vpn tunnel up

1>Set different DH group on two devices phase1 and the same setting phase2.
Test result==> The phase1 failed,The vpn tunnel can not be up.
<openswan>
 phase1=3des-md5;modp1536!
 phase2= 3des-hmac_md5!;modp1024
 <other system>
 phase1=3des-md5;modp1024
 phase2= 3des-md5!;modp1024

===========================================================
2>Set different DH group on two devices phase2 and the same setting phase1.
Test result==> The vpn tunnel can be up.
<openswan>
 phase1=3des-md5;modp1024!
 phase2= 3des-hmac_md5!;modp1536
 <other system>
 phase1=3des-md5;modp1024
 phase2= 3des-md5!;modp1024

# ipsec auto --status
000 using kernel interface: netkey
000 interface lo/lo ::1
000 interface lo/lo 127.0.0.1
000 interface br0/br0 192.168.2.254
000 interface eth0.1/eth0.1 172.17.21.81
000 %myid = (none)
000 debug none
000
000 virtual_private (%priv):
000 - allowed 0 subnets:
000 - disallowed 0 subnets:
000 WARNING: Either virtual_private= is not specified, or there is a syntax
000          error in that line. 'left/rightsubnet=vhost:%priv' will not 
work!
000 WARNING: Disallowed subnets in virtual_private= is empty. If you have
000          private address space in internal use, it should be excluded!
000
000 algorithm ESP encrypt: id=2, name=ESP_DES, ivlen=8, keysizemin=64, 
keysizema
x=64
000 algorithm ESP encrypt: id=3, name=ESP_3DES, ivlen=8, keysizemin=192, 
keysize
max=192
000 algorithm ESP encrypt: id=11, name=ESP_NULL, ivlen=0, keysizemin=0, 
keysizem
ax=0
000 algorithm ESP encrypt: id=12, name=ESP_AES, ivlen=8, keysizemin=128, 
keysize
max=256
000 algorithm ESP encrypt: id=14, name=ESP_AES_CCM_A, ivlen=8, 
keysizemin=128, k
eysizemax=256
000 algorithm ESP encrypt: id=15, name=ESP_AES_CCM_B, ivlen=8, 
keysizemin=128, k
eysizemax=256
000 algorithm ESP encrypt: id=16, name=ESP_AES_CCM_C, ivlen=8, 
keysizemin=128, k
eysizemax=256
000 algorithm ESP encrypt: id=18, name=ESP_AES_GCM_A, ivlen=8, 
keysizemin=128, k
eysizemax=256
000 algorithm ESP encrypt: id=19, name=ESP_AES_GCM_B, ivlen=8, 
keysizemin=128, k
eysizemax=256
000 algorithm ESP encrypt: id=20, name=ESP_AES_GCM_C, ivlen=8, 
keysizemin=128, k
eysizemax=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=251, name=AUTH_ALGORITHM_NULL_KAME, 
keysizemin=0
, keysizemax=0
000
000 algorithm IKE encrypt: id=0, name=(null), blocksize=16, keydeflen=131
000 algorithm IKE encrypt: id=1, name=OAKLEY_DES_CBC, blocksize=8, 
keydeflen=64
000 algorithm IKE encrypt: id=5, name=OAKLEY_3DES_CBC, blocksize=8, 
keydeflen=19
2
000 algorithm IKE encrypt: id=7, name=OAKLEY_AES_CBC, blocksize=16, 
keydeflen=12
8
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=1, name=OAKLEY_GROUP_MODP768, bits=768
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 algorithm IKE dh group: id=22, name=OAKLEY_GROUP_DH22, bits=1024
000 algorithm IKE dh group: id=23, name=OAKLEY_GROUP_DH23, bits=2048
000 algorithm IKE dh group: id=24, name=OAKLEY_GROUP_DH24, bits=2048
000
000 stats db_ops: {curr_cnt, total_cnt, maxsz} :context={0,2,36} 
trans={0,2,360}
 attrs={0,2,480}
000
000 "test": 
192.168.2.0/24===172.17.21.81<172.17.21.81>...172.17.21.80<172.17.21
.80>===192.168.1.0/24; erouted; eroute owner: #2
000 "test":     myip=unset; hisip=unset;
000 "test":   ike_life: 3600s; ipsec_life: 28800s; rekey_margin: 540s; 
rekey_fuz
z: 100%; keyingtries: 0
000 "test":   policy: 
PSK+ENCRYPT+TUNNEL+PFS+UP+IKEv2ALLOW+SAREFTRACK+lKOD+rKOD;
 prio: 24,24; interface: eth0.1;
000 "test":   newest ISAKMP SA: #1; newest IPsec SA: #2;
000 "test":   IKE algorithms wanted: 3DES_CBC(5)_000-MD5(1)_000-MODP1024(2); 
fla
gs=strict
000 "test":   IKE algorithms found:  3DES_CBC(5)_192-MD5(1)_128-MODP1024(2)
000 "test":   IKE algorithm newest: 3DES_CBC_192-MD5-MODP1024
000 "test":   ESP algorithms wanted: 3DES(3)_000-MD5(1)_000; 
pfsgroup=MODP1536(5
); flags=strict
000 "test":   ESP algorithms loaded: 3DES(3)_192-MD5(1)_128
000 "test":   ESP algorithm newest: 3DES_000-HMAC_MD5; pfsgroup=MODP1536
000
000 #2: "test":500 STATE_QUICK_I2 (sent QI2, IPsec SA established); 
EVENT_SA_REP
LACE in 27932s; newest IPSEC; eroute owner; isakmp#1; idle; import:admin 
initiat
e
000 #2: "test" esp.d370a0e at 172.17.21.80 esp.f28fec16 at 172.17.21.81 ref=0 
refhim=4
294901761
000 #1: "test":500 STATE_MAIN_I4 (ISAKMP SA established); EVENT_SA_REPLACE 
in 26
17s; newest ISAKMP; lastdpd=-1s(seq in:0 out:0); idle; import:admin initiate
#

I am very confused.The test result are as above.Are they correct or 
not?Originally I think if use different algorithms,the tunnel should not 
work.But the final result is different.I have no idea in this 
question.Please help very thank's

Best Regards,
Ozai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openswan.org/pipermail/users/attachments/20130124/cc30760d/attachment-0001.html>


More information about the Users mailing list