tbksly
(usa Ubuntu)
Enviado em 28/03/2012 - 11:47h
Bom dia pessoal.
Acompanho algum material disponibilizado aqui na comunidade, mas sou novo como "postador" por assim dizer. Estou tentando fechar um VPN (ipsec com openswan) entre um servidor Ubuntu 11.10 que instalei e um Sonicwall. Pesquisei e utilizei alguns arquivos disponíveis aqui para o fazer.
Porém estou com alguns problemas que vou compartilhar em busca de ajuda.
O ambiente consiste em matriz e filial. Onde aqui na matriz temos o servidor Linux ligado em diretamente para a internet num link GVT. E na filial temos um Sonicwall também com IP valido.
Vamos as configs:
No sonicwall não tenho acesso a interface de gerenciamento, mas as configs são:
Peer: 200.175.218.99
Local Network: 10.20.31.0/24
Destination Network: 192.168.2.0/24
Encryption: 3DES
Authentication: SHA1
Life Time: 28800
Protocol: ESP
IKE authentication:
Shared Secret: senhadavpn
Local IKE ID: DC002B
Peer IKE ID: DC002A
/etc/ipsec.conf
version 2.0 # conforms to second version of ipsec.conf specification
config setup
interfaces=%defaultroute
plutodebug="parsing"
plutodebug=all
protostack=netkey
nat_traversal=yes
conn sonicwall #Nome da Conexa VPN
type= tunnel
left= 200.175.218.99
leftid=@DC002A
leftxauthclient=yes
right=189.73.152.112
rightsubnet=10.20.31.0/24
rightxauthserver=yes
rightid=@DC002B
keyingtries=1
pfs=yes
aggrmode=yes
auto=start
auth=esp
ike=3DES-SHA1-modp1024
esp=3DES-SHA1
ikelifetime=28800s
keylife=8h
/etc/ipsec.secrets
@DC002A @DC002B : PSK "senhadavpn"
Então, tentando iniciar tenho os seguintes resultados.
#service ipsec start
ipsec_setup: Starting Openswan IPsec U2.6.28/K3.0.0-16-generic-pae...
# ipsec auto --status
000 using kernel interface: netkey
000 interface lo/lo ::1
000 interface lo/lo 127.0.0.1
000 interface lo/lo 127.0.0.1
000 interface eth2/eth2 200.175.218.99
000 interface eth2/eth2 200.175.218.99
000 interface eth0/eth0 192.168.254.250
000 interface eth0/eth0 192.168.254.250
000 interface eth1/eth1 192.168.2.250
000 interface eth1/eth1 192.168.2.250
000 %myid = (none)
000 debug raw+crypt+parsing+emitting+control+lifecycle+klips+dns+oppo+controlmor e+pfkey+nattraversal+x509+dpd+oppoinfo
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=6, name=ESP_CAST, ivlen=8, keysizemin=40, keysizem ax=128
000 algorithm ESP encrypt: id=7, name=ESP_BLOWFISH, ivlen=8, keysizemin=40, keys izemax=448
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=13, name=ESP_AES_CTR, ivlen=8, keysizemin=160, key sizemax=288
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 encrypt: id=22, name=ESP_CAMELLIA, ivlen=8, keysizemin=128, ke ysizemax=256
000 algorithm ESP encrypt: id=252, name=ESP_SERPENT, ivlen=8, keysizemin=128, ke ysizemax=256
000 algorithm ESP encrypt: id=253, name=ESP_TWOFISH, ivlen=8, keysizemin=128, ke ysizemax=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=5, name=AUTH_ALGORITHM_HMAC_SHA2_256, keysizemin =256, keysizemax=256
000 algorithm ESP auth attr: id=6, name=AUTH_ALGORITHM_HMAC_SHA2_384, keysizemin =384, keysizemax=384
000 algorithm ESP auth attr: id=7, name=AUTH_ALGORITHM_HMAC_SHA2_512, keysizemin =512, keysizemax=512
000 algorithm ESP auth attr: id=8, name=AUTH_ALGORITHM_HMAC_RIPEMD, keysizemin=1 60, keysizemax=160
000 algorithm ESP auth attr: id=9, name=AUTH_ALGORITHM_AES_CBC, keysizemin=128, keysizemax=128
000 algorithm ESP auth attr: id=251, name=(null), keysizemin=0, keysizemax=0
000
000 algorithm IKE encrypt: id=0, name=(null), blocksize=16, keydeflen=131
000 algorithm IKE encrypt: id=3, name=OAKLEY_BLOWFISH_CBC, blocksize=8, keydefle n=128
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 encrypt: id=65004, name=OAKLEY_SERPENT_CBC, blocksize=16, keyd eflen=128
000 algorithm IKE encrypt: id=65005, name=OAKLEY_TWOFISH_CBC, blocksize=16, keyd eflen=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,1,36} trans={0,1,1536 } attrs={0,1,2048}
000
000 "sonicwall": 200.175.218.99<200.175.218.99>[@DC002A,+XC+S=C]...189.73.152.11 2<189.73.152.112>[@DC002B,+XS+S=C]===10.20.31.0/24; prospective erouted; eroute owner: #0
000 "sonicwall": myip=unset; hisip=unset;
000 "sonicwall": ike_life: 28800s; ipsec_life: 28800s; rekey_margin: 540s; rek ey_fuzz: 100%; keyingtries: 1
000 "sonicwall": policy: PSK+ENCRYPT+TUNNEL+PFS+UP+AGGRESSIVE+IKEv2ALLOW+lKOD+ rKOD; prio: 32,24; interface: eth2;
000 "sonicwall": dpd: action:clear; delay:0; timeout:0;
000 "sonicwall": newest ISAKMP SA: #0; newest IPsec SA: #0;
000 "sonicwall": IKE algorithms wanted: 3DES_CBC(5)_000-SHA1(2)_000-MODP1024(2 ); flags=-strict
000 "sonicwall": IKE algorithms found: 3DES_CBC(5)_192-SHA1(2)_160-MODP1024(2 )
000 "sonicwall": ESP algorithms wanted: 3DES(3)_000-SHA1(2)_000; flags=-strict
000 "sonicwall": ESP algorithms loaded: 3DES(3)_192-SHA1(2)_160
000
000 #1: "sonicwall":500 STATE_AGGR_I1 (sent AI1, expecting AR1); EVENT_RETRANSMI T in 16s; nodpd; idle; import:admin initiate
000 #1: pending Phase 2 for "sonicwall" replacing #0
000
# ipsec auto --replace sonicwall
# ipsec auto --up sonicwall
112 "sonicwall" #2: STATE_AGGR_I1: initiate
003 "sonicwall" #2: Informational Exchange message must be encrypted
010 "sonicwall" #2: STATE_AGGR_I1: retransmission; will wait 20s for response
003 "sonicwall" #2: Informational Exchange message must be encrypted
010 "sonicwall" #2: STATE_AGGR_I1: retransmission; will wait 40s for response
003 "sonicwall" #2: Informational Exchange message must be encrypted
031 "sonicwall" #2: max number of retransmissions (2) reached STATE_AGGR_I1
# ipsec auto --status
000 using kernel interface: netkey
000 interface lo/lo ::1
000 interface lo/lo 127.0.0.1
000 interface lo/lo 127.0.0.1
000 interface eth2/eth2 200.175.218.99
000 interface eth2/eth2 200.175.218.99
000 interface eth0/eth0 192.168.254.250
000 interface eth0/eth0 192.168.254.250
000 interface eth1/eth1 192.168.2.250
000 interface eth1/eth1 192.168.2.250
000 %myid = (none)
000 debug raw+crypt+parsing+emitting+control+lifecycle+klips+dns+oppo+controlmore+pfkey+nattraversal+x509+dpd+oppoinfo
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, keysizemax=64
000 algorithm ESP encrypt: id=3, name=ESP_3DES, ivlen=8, keysizemin=192, keysizemax=192
000 algorithm ESP encrypt: id=6, name=ESP_CAST, ivlen=8, keysizemin=40, keysizemax=128
000 algorithm ESP encrypt: id=7, name=ESP_BLOWFISH, ivlen=8, keysizemin=40, keysizemax=448
000 algorithm ESP encrypt: id=11, name=ESP_NULL, ivlen=0, keysizemin=0, keysizemax=0
000 algorithm ESP encrypt: id=12, name=ESP_AES, ivlen=8, keysizemin=128, keysizemax=256
000 algorithm ESP encrypt: id=13, name=ESP_AES_CTR, ivlen=8, keysizemin=160, keysizemax=288
000 algorithm ESP encrypt: id=14, name=ESP_AES_CCM_A, ivlen=8, keysizemin=128, keysizemax=256
000 algorithm ESP encrypt: id=15, name=ESP_AES_CCM_B, ivlen=8, keysizemin=128, keysizemax=256
000 algorithm ESP encrypt: id=16, name=ESP_AES_CCM_C, ivlen=8, keysizemin=128, keysizemax=256
000 algorithm ESP encrypt: id=18, name=ESP_AES_GCM_A, ivlen=8, keysizemin=128, keysizemax=256
000 algorithm ESP encrypt: id=19, name=ESP_AES_GCM_B, ivlen=8, keysizemin=128, keysizemax=256
000 algorithm ESP encrypt: id=20, name=ESP_AES_GCM_C, ivlen=8, keysizemin=128, keysizemax=256
000 algorithm ESP encrypt: id=22, name=ESP_CAMELLIA, ivlen=8, keysizemin=128, keysizemax=256
000 algorithm ESP encrypt: id=252, name=ESP_SERPENT, ivlen=8, keysizemin=128, keysizemax=256
000 algorithm ESP encrypt: id=253, name=ESP_TWOFISH, ivlen=8, 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=5, name=AUTH_ALGORITHM_HMAC_SHA2_256, keysizemin=256, keysizemax=256
000 algorithm ESP auth attr: id=6, name=AUTH_ALGORITHM_HMAC_SHA2_384, keysizemin=384, keysizemax=384
000 algorithm ESP auth attr: id=7, name=AUTH_ALGORITHM_HMAC_SHA2_512, keysizemin=512, keysizemax=512
000 algorithm ESP auth attr: id=8, name=AUTH_ALGORITHM_HMAC_RIPEMD, keysizemin=160, keysizemax=160
000 algorithm ESP auth attr: id=9, name=AUTH_ALGORITHM_AES_CBC, keysizemin=128, keysizemax=128
000 algorithm ESP auth attr: id=251, name=(null), keysizemin=0, keysizemax=0
000
000 algorithm IKE encrypt: id=0, name=(null), blocksize=16, keydeflen=131
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,2,36} trans={0,2,1536} attrs={0,2,2048}
000
000 "sonicwall": 200.175.218.99<200.175.218.99>[@DC002A,+XC+S=C]...189.73.152.112<189.73.152.112>[@DC002B,+XS+S=C]===10.20.31.0/24; unrouted; eroute owner: #0
000 "sonicwall": myip=unset; hisip=unset;
000 "sonicwall": ike_life: 28800s; ipsec_life: 28800s; rekey_margin: 540s; rekey_fuzz: 100%; keyingtries: 1
000 "sonicwall": policy: PSK+ENCRYPT+TUNNEL+PFS+UP+AGGRESSIVE+IKEv2ALLOW+lKOD+rKOD; prio: 32,24; interface: eth2;
000 "sonicwall": dpd: action:clear; delay:0; timeout:0;
000 "sonicwall": newest ISAKMP SA: #0; newest IPsec SA: #0;
000 "sonicwall": IKE algorithms wanted: 3DES_CBC(5)_000-SHA1(2)_000-MODP1024(2); flags=-strict
000 "sonicwall": IKE algorithms found: 3DES_CBC(5)_192-SHA1(2)_160-MODP1024(2)
000 "sonicwall": ESP algorithms wanted: 3DES(3)_000-SHA1(2)_000; flags=-strict
000 "sonicwall": ESP algorithms loaded: 3DES(3)_192-SHA1(2)_160
000
000
# tail -f /var/log/auth.log
Mar 28 11:17:42 USEFW pluto[1614]: | next event EVENT_PENDING_DDNS in 24 seconds
Mar 28 11:17:42 USEFW pluto[1614]: | next event EVENT_PENDING_DDNS in 24 seconds
Mar 28 11:18:06 USEFW pluto[1614]: |
Mar 28 11:18:06 USEFW pluto[1614]: | next event EVENT_PENDING_DDNS in 0 seconds
Mar 28 11:18:06 USEFW pluto[1614]: | *time to handle event
Mar 28 11:18:06 USEFW pluto[1614]: | handling event EVENT_PENDING_DDNS
Mar 28 11:18:06 USEFW pluto[1614]: | event after this is EVENT_PENDING_PHASE2 in 60 seconds
Mar 28 11:18:06 USEFW pluto[1614]: | inserting event EVENT_PENDING_DDNS, timeout in 60 seconds
Mar 28 11:18:06 USEFW pluto[1614]: | event added at head of queue
Mar 28 11:18:06 USEFW pluto[1614]: | next event EVENT_PENDING_DDNS in 60 seconds
Alguma dica?
Pelo que me parece, estou com problemas na segunda fase. Algo relacionado a criptografia. Mas não sei o que fazer.
Algumas fontes aqui do VOL:
http://www.vivaolinux.com.br/artigo/Configurando-uma-VPN-IPSec-Openswan-no-SUSE-Linux-9.3
http://www.vivaolinux.com.br/artigo/VPN-SitetoSite-Openswan-x-ASA-%28Cisco%29
externas:
http://www.xantha.org/blog/?p=299
comments.gmane.org/gmane.network.openswan.user/17778