Jump to content

Recommended Posts

Posted

доброе время суток  настраиваю IKEv2 VPN   на микротике

/ip ipsec> export 
# jul/03/2019 08:59:41 by RouterOS 6.45.1
# software id = 1P31-3YPG
#
# model = CCR1016-12G
# serial number = 574A055F0AF7
/ip ipsec mode-config
add address-pool=vpn address-prefix-length=32 name=ike2-conf static-dns=8.8.8.8 system-dns=no
/ip ipsec policy group
add name=ike2-policies
/ip ipsec profile
add enc-algorithm=aes-256,aes-128,3des name=ike2
/ip ipsec peer
add exchange-mode=ike2 name=ike2 passive=yes profile=ike2
/ip ipsec proposal
set [ find default=yes ] auth-algorithms=md5 enc-algorithms=aes-128-cbc,3des
add auth-algorithms=sha256,sha1 enc-algorithms=aes-256-cbc,aes-128-cbc name=ike2 pfs-group=none
/ip ipsec identity
add auth-method=digital-signature certificate=vpn generate-policy=port-strict match-by=certificate mode-config=ike2-conf peer=ike2 policy-template-group=ike2-policies remote-certificate=client

в итоге когда  подключаюсь с  windows 10  соединение не идет  в логах получаю

09:02:01 echo: ipsec,debug,packet 084ed603 5a8733c9 00000000 00000000 29202508 00000000 00000028 0000000c
09:02:01 echo: ipsec,debug,packet 00003039 00003619
09:02:01 echo: ipsec -> ike2 request, exchange: INFORMATIONAL:0 x.x.48.2[47]
09:02:01 echo: ipsec ike2 respond
09:02:01 echo: ipsec reply notify: INVALID_SYNTAX
09:02:01 echo: ipsec adding notify: INVALID_SYNTAX
09:02:01 echo: ipsec,debug => (size 0x8)
09:02:01 echo: ipsec,debug 00000008 00000007
09:02:01 echo: ipsec,debug ===== sending 36 bytes from x.x.61.22[500] to x.x.48.2[47]
09:02:01 echo: ipsec,debug 1 times of 36 bytes message will be sent to x.x.48.2[47]
09:02:01 echo: ipsec,debug,packet 084ed603 5a8733c9 00000000 00000000 29202520 00000000 00000024 00000008
09:02:01 echo: ipsec,debug,packet 00000007
09:02:31 echo: ipsec,debug KA: x.x.61.22[4500]->x.x.48.2[47]
09:02:31 echo: ipsec,debug 1 times of 1 bytes message will be sent to x.x.48.2[47]
09:02:31 echo: ipsec,debug,packet ff
09:02:31 echo: ipsec child negitiation timeout in state 0
09:02:31 echo: ipsec,info killing ike2 SA: x.x.61.22[4500]-x.x.48.2[47] spi:861d0378e501f667:fc2e697972d65712
09:02:31 echo: ipsec KA remove: x.x.61.22[4500]->x.x.48.2[47]
09:02:31 echo: ipsec,debug KA tree dump: x.x.61.22[4500]->x.x.48.2[47] (in_use=2)
09:02:31 echo: ipsec child negitiation timeout in state 0
09:02:31 echo: ipsec,info killing ike2 SA: x.x.61.22[4500]-x.x.48.2[47] spi:e05ddda0b272dee5:084ed6035a8733c9
09:02:31 echo: ipsec KA remove: x.x.61.22[4500]->x.x.48.2[47]
09:02:31 echo: ipsec,debug KA tree dump: x.x.61.22[4500]->x.x.48.2[47] (in_use=1)
09:02:31 echo: ipsec,debug KA removing this one...

 

Posted

Тогда что-то не так с сертификатами. Windows предъявляет к ним ряд требований, см. хотя бы https://directaccess.richardhicks.com/2018/04/30/always-on-vpn-certificate-requirements-for-ikev2/ . Также, популярная проблема - совпадение полей Issuer и Subject, такие для VPN у Windows тоже не канают

Posted

сертификаты делал так

#Root CA и сапомодпись
/certificate add name=ca common-name="IKEv2 CA" days-valid=6928
/certificate sign ca ca-crl-host=<IP роутера>

#Сертификат для сервера vpn
/certificate add common-name=<IP роутера> subject-alt-name=IP:<IP роутера> key-usage=tls-server name=vpn days-valid=6928

#Подпись серверного сертификата
/certificate sign vpn ca=ca

#Сертификат для клиента
#Клиенты с одним сертификатам не смогут работать одновременно, поэтому генерируйте по одному для каждого
#Для отмены доступа необходимо сделать Revoke клиентского сертификата
/certificate add common-name=client key-usage=tls-client name=client days-valid=6928

#Подпись клиентского сертификата
/certificate sign client ca=ca

 

Posted

Такие сертификаты обычно не прокатывают. Windows (и Mac, кстати) вообще не любят IP адреса в поле SAN, их туда надо особым образом засовывать. Аналогично, single-part имена в клиентских SAN вообще не поддерживаются, начиная с Win10 1603. Лучше использовать доменные имена, пусть даже и липовые, для сервера, и e-mail для клиента (в том же домене). Не стоит насиловать роутер как CA, сделайте на компе с помощью openssl

Posted

я так понимаю  если в реестре поменять значения до должно прокатывть

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RasMan\Parameters" /v DisableIKENameEkuCheck /t REG_DWORD /d 1

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...
На сайте используются файлы cookie и сервисы аналитики для корректной работы форума и улучшения качества обслуживания. Продолжая использовать сайт, вы соглашаетесь с использованием файлов cookie и с Политикой конфиденциальности.