Возвращен код ошибки 13868

Пролог:
Прочел все мануалы по IPsec на DFL.
Затем прочел все мануалы по IPsec на других устройствах, которые смог найти.
Попробовал различные комбинации.

Вводная: имеется DFL-260 со статическим белым адресом с одноранговой локалью за ним. Хочу подключаться к этой локалке через IPsec туннель с мобильной связи, из любой точки. Т. е. подключаться придется зачастую с динамического серого (NAT) адреса.

Пробовал подключаться:
1. штатными средствами Win7 (L2TP IPsec VPN, IKEv2) (NAT);
2. штатными средствами Android (L2TP/IPSec PSK, IPSec Xauth PSK) (мобильный интернет — NAT);
3. штатными средствами Ios (IKEv2, IPSec, L2TP) (мобильный интернет — NAT).

Все безрезультатно.

1. При попытке подключения с Win7 по L2TP IPsec VPN, выдается ошибка 788: Попытка L2TP-подключения не удалась, поскольку на уровне безопасности не удалось согласовать параметры с удаленным компьютером.
В логах на DFL следующее:

Код:

2018-08-15
12:27:15   
Info
IPSEC
1800904                  ike_sa_created
ipsec_if=dynamic_ipsec local_ip=<ВНЕШНИЙ IP DFL> local_port=4500 remote_iface=wan remote_ip=<ВНЕШНИЙ IP компа> remote_port=57944 local_id=<ВНЕШНИЙ IP DFL> remote_id=<ЛОКАЛЬНЫЙ IP компа в его локальной сети>local_ike_spi=0xa1f871a70951d192 remote_ike_spi=0x53bc392752c1ec0c initiator=FALSE algorithms=aes256-cbc/hmac-sha1-96/hmac-sha1/MODP_2048 mode=Main lifetime=28800 ikeversion=1 local_behind_nat=TRUE remote_behind_nat=TRUE initial_contact=FALSE

2018-08-15
12:27:15   
Info
IPSEC
1802023                  ike_sa_statistics
done=183 success=19 failed=164

2018-08-15
12:27:15   
Info
IPSEC
1802049                  [b]ipsec_sa_failed[/b]
ipsec_sa_disabled
statusmsg=»No proposal chosen» reason=»Peer IP address mismatch. Local Traffic Selector mismatch.» local_peer=»<ВНЕШНИЙ IP DFL>:4500 ID <ВНЕШНИЙ IP DFL>» remote_peer=»<ВНЕШНИЙ IP компа>:57944 ID <ЛОКАЛЬНЫЙ IP компа в его локальной сети>» ike_spi_i=0x53bc392752c1ec0c ike_spi_r=0xa1f871a70951d192

2018-08-15
12:27:15   
Notice
IPSEC
1800105                  ike_delete_notification
local_ip=<ВНЕШНИЙ IP DFL> remote_ip=<ВНЕШНИЙ IP компа> cookies=0x53bc392752c1ec0ca1f871a70951d192 reason=»Received delete notification»

2018-08-15
12:27:15   
Info
IPSEC
1800906                  ike_sa_deleted
ipsec_if=dynamic_ipsec local_ip=<ВНЕШНИЙ IP DFL> local_port=4500 remote_iface=wan remote_ip=<ВНЕШНИЙ IP компа> remote_port=57944 local_id=<ВНЕШНИЙ IP DFL> remote_id=<ЛОКАЛЬНЫЙ IP компа в его локальной сети> local_ike_spi=0xa1f871a70951d192 remote_ike_spi=0x53bc392752c1ec0c peer_dead=FALSE

Я так понимаю, первая фаза(ike) проходит нормально, а вторая(ipsec) прерывается из-за несоответствия внешнего ip и «id» инициатора туннеля. Если я прав, то что с этим делать?

При попытке подключения по IKEv2, Win7 выдает ошибку 13868: Ошибка сопоставления групповой политики.
В логах DFL следующее:

Код:

2018-08-15
12:40:56   
Error
IPSEC
1802221                  no_matching_tunnel_found
packet_will_be_discarded
localaddr=<ВНЕШНИЙ IP DFL> remoteaddr=<ВНЕШНИЙ IP компа> srcif=wan

2018-08-15
12:40:56   
Warning
IPSEC
1802022                  ike_sa_failed
no_ike_sa
statusmsg=»No proposal chosen» reason=»» local_peer=»<ВНЕШНИЙ IP DFL>:500 ID (null)» remote_peer=»<ВНЕШНИЙ IP компа>:500 ID (null)» spi_i=0x1960bcb26ab80e2c spi_r=0x6460b7a0d3e77fc4 initiator=FALSE

2018-08-15
12:40:56   
Info
IPSEC
1802023                  ike_sa_statistics
done=204 success=19 failed=185

2. При попытке подключения с Android по L2TP/IPSec PSK, соединение висит в состоянии «подключение», затем, спустя секунд 30 — «сбой».
В логах DFL следующее:

Код:

2018-08-15
12:44:57   
Error
IPSEC
1802221                  no_matching_tunnel_found
packet_will_be_discarded
localaddr=<ВНЕШНИЙ IP DFL> remoteaddr=<ВНЕШНИЙ IP Android> srcif=wan

2018-08-15
12:44:57   
Warning
IPSEC
1800107                  ike_invalid_proposal
local_ip=<ВНЕШНИЙ IP DFL> remote_ip=<ВНЕШНИЙ IP Android> cookies=0xd473938d4b3cf3eb5230d23d5b24cf6d reason=»Could not find acceptable proposal»

2018-08-15
12:44:57   
Warning
IPSEC
1802022                  ike_sa_failed
no_ike_sa
statusmsg=»No proposal chosen» reason=»» local_peer=»<ВНЕШНИЙ IP DFL>:500 ID (null)» remote_peer=»<ВНЕШНИЙ IP Android>:500 ID (null)» spi_i=0xd473938d4b3cf3eb spi_r=0x5230d23d5b24cf6d initiator=FALSE

2018-08-15
12:44:57   
Info
IPSEC
1802023                  ike_sa_statistics
done=211 success=19 failed=192

Тут, я так понимаю, не угадал с набором алгоритмов первой фазы. Как их следует изменить?

При попытке подключения с Android по IPSec Xauth PSK, соединение висит в состоянии «подключение», затем, спустя секунд 30 — «сбой».
В логах DFL то же самое. (хотя, при каких-то других параметрах, в логе было что-то похожее на несоответствие IP и ID)

3. При попытках подключения Ios по IKEv2 и IPSec содержимое лога идентичное ситуации, когда неверно подобраны алгоритмы 1 фазы.
При попытке подключения по L2TP — несоответствие IP и ID.

Как быть, куда копать? Вообще, возможно ли поднятие туннеля в таких условиях?

Настройки IPsec:

Вложение:

Комментарий к файлу: Настройки IPsec 1

IPSec_01.jpg
IPSec_01.jpg [ 53.82 KiB | Просмотров: 5759 ]

Вложение:

Комментарий к файлу: Настройки IPSec 2

IPSec_02.jpg
IPSec_02.jpg [ 77.54 KiB | Просмотров: 5759 ]

Вложение:

Комментарий к файлу: Настройки IPsec 3

IPSec_03.jpg
IPSec_03.jpg [ 98.89 KiB | Просмотров: 5759 ]

Последний раз редактировалось aNGEl0 Ср авг 15, 2018 13:01, всего редактировалось 1 раз.

  • Remove From My Forums
  • General discussion

  • Доброго времени суток имеется win 7 при подключении через ikev2 vpn ошибка 13868 ошибка сопоставления групповой политики я по подключаюсь к windows server 2012 r2 там поднята роль маршрутизация и удаленный доступ чего
    ошибка скажите?

    На других машинах windows7,8.10 проблем нет с ikev2 vpn !

    • Edited by
      Александр700
      Saturday, February 9, 2019 12:41 AM
    • Changed type
      Anton Sashev Ivanov
      Wednesday, February 20, 2019 8:14 AM
      Обсуждение

All replies

  • Попробуйте рекомендации из топика:

    ikev2, anyone got it working?


    Мнения, высказанные здесь, являются отражением моих личных взглядов, а не позиции корпорации Microsoft. Вся информация предоставляется «как есть» без каких-либо гарантий.

  • Попробуйте рекомендации из топика:

    ikev2, anyone got it working?


    Мнения, высказанные здесь, являются отражением моих личных взглядов, а не позиции корпорации Microsoft. Вся информация предоставляется «как есть» без каких-либо гарантий.

    где попробувать на серваке 2012r2 или на windows 7?

    • Edited by
      Александр700
      Sunday, February 10, 2019 3:08 AM

I have the newest version of Strongswan vpn on my ubuntu server running.
I followed this tutorial here and got it to work on my android and Iphone.

Now I want to get it to work on my windows 10 laptop but when I try to connect via the vpn settings in windows I only get a «policy match error» and the event view gives me the error code «13868».

After much googling I still cant find any working solution.

What can I do?

asked Apr 30, 2019 at 10:02

sirzento's user avatar

sirzentosirzento

1931 gold badge1 silver badge5 bronze badges

The problem is most likely that the Windows client proposes a weak Diffie-Hellman (DH) group (1024-bit MODP). That group is not used anymore by strongSwan unless the user configures it explicitly.

You have two options:

  1. Configure Windows to use a stronger DH group. This can be done either
    • via Set-VpnConnectionIPsecConfiguration PowerShell cmdlet, which allows enabling stronger DH groups (e.g. group 14/2048-bit MODP or 384-bit ECP) and even other algorithms (e.g. AES-GCM combined-mode encryption/integrity, which is more efficient, but needs to be enabled explicitly on the server too)
    • or via registry by adding the DWORD key HKEY_LOCAL_MACHINESystemCurrentControlSetServicesRasmanParametersNegotiateDH2048_AES256. Set it to 1 to enable (the other algorithms are still proposed), or 2 to enforce the use of 256-bit AES-CBC and 2048-bit MODP DH (only these will be proposed).
  2. Add the proposed, weak DH group (1024-bit MODP) to the IKE proposal on the server (e.g. configure something like ike=aes256-aes128-sha256-sha1-modp3072-modp2048-modp1024, which adds it at the end so other clients may use stronger DH groups).

Option 1 is definitely preferred.

answered Apr 30, 2019 at 13:16

ecdsa's user avatar

ecdsaecdsa

3,88014 silver badges29 bronze badges

3

To find out what is the problem you should, as a first step, turn on logging and see what happens during the connection process. Here is the example config I use on my server.

/etc/strongswan.d/charon-logging.conf

charon {
    # Section to define file loggers, see LOGGER CONFIGURATION in
    # strongswan.conf(5).
    filelog {
        # <filename> is the full path to the log file.
        /var/log/strongswan.log {

            # Loglevel for a specific subsystem.
            # <subsystem> = <default>

            # If this option is enabled log entries are appended to the existing
            # file.
            append = yes

            # Default loglevel.
            default = 2

            # Enabling this option disables block buffering and enables line
            # buffering.
            # flush_line = no

            # Prefix each log entry with the connection name and a unique
            # numerical identifier for each IKE_SA.
            ike_name = yes

            # Adds the milliseconds within the current second after the
            # timestamp (separated by a dot, so time_format should end with %S
            # or %T).
            # time_add_ms = no

            # Prefix each log entry with a timestamp. The option accepts a
            # format string as passed to strftime(3).
            # time_format =
        }
    }
}

U can use it and analyze the log file to discover the issue. If you will not able to figure it out, post a connection log here I will try to help you.

answered Apr 30, 2019 at 10:31

Ivan Vartanyan's user avatar

3

  • Печать

Страницы: [1]   Вниз

Тема: бьюсь с VPN IPsec IKEv2 strongSwan на Ubuntu-server  (Прочитано 2432 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
zaka4kin

Доброго времени…

на виртуальной обкатке имею:

Ubuntu-server 20.04 + strongSwan 5.8.2

и

Win10 20H2 x64.

обе лежат в одной сети.

ipsec.conf срисовал отсюда. оттуда же и ipsec.secrets.

подключаюсь… выползла ошибка 13868, пофиксил.
прописал пока «ike=aes256-aes128-sha256-sha1-modp3072-modp2048-modp1024″…

НО винда не унимается… выдаёт «ошибку обработки полезных данных ke» за номером 13833.

может кто сталкивался?

второй вопрос — реально ли замутить VPN IPsec IKEv2 без центра сертификации, генерации сертификата и прочего?
(прошу прощения за возможно неправильные термины/понятия. только начал щупать данную тему).
вопрос возник потому, что у них то инфа про это есть
https://www.strongswan.org/testing/testresults/ikev2/rw-psk-ipv4/.
яж не ошибся, там чисто по ключу подключение, без сертификатов всяких?

Спасибо!


Оффлайн
AlexDem

яж не ошибся, там чисто по ключу подключение, без сертификатов всяких?

А в чем проблема сделать самому сертификат Х.509 сервера, клиента, ключей и пр., и пользоваться этим всем хозяйством?
Принцип безопасного соединения заключается в том, что поскольку те открытые ключи, которыми обмениваются клиент и сервер передаются изначально по незащищенному каналу и могут быть перехвачены, расшифрованы и подменены, поэтому достоверность ключей по которым клиент и сервер «узнают» друг-друга подтверждаются сертификатами, которые хранятся локально на клиенте и сервере и никуда не передаются во время сеанса связи, а следовательно не могут быть взломаны (ну, если их не похитили отдельно).
Поэтому VPN без сертификата это просто шифрование закрытым симметричным ключом.


Оффлайн
zaka4kin

Доброго времени всем…

собрал стенд на virtualbox:

Win-клиент — NAT (10.0.10.0/24) — Ubuntu-Server 20.04 + VPN IKEv2-сервер (10.0.10.10)

адрес хоста 10.89.7.2. UDP 500, 4500 пробросил с 10.89.7.2 на 10.0.10.10 в Файл -> Настройки -> Сеть.

отключил брандмауэр на Windows и UFW на Ubuntu-server (подстраховался)…

подготовка сертификатов:

ipsec.conf:

пробовал и

left=%defaultroute
leftfirewall=yes

ipsec.secrets

не хочет подключаться и всё, «ошибка сопоставления групповой политики».

если и сервер и клиент в одной подсети, то подключение проходит,

без

[code]left=%defaultroute
leftfirewall=yes

естественно.

Что я упускаю из виду?


  • Печать

Страницы: [1]   Вверх

Чтобы выяснить, в чем заключается проблема, вы должны, в качестве первого шага, включить ведение журнала и посмотреть, что происходит во время процесса подключения. Вот пример конфигурации, который я использую на своем сервере.

/etc/strongswan.d/charon-logging.conf

charon {
    # Section to define file loggers, see LOGGER CONFIGURATION in
    # strongswan.conf(5).
    filelog {
        # <filename> is the full path to the log file.
        /var/log/strongswan.log {

            # Loglevel for a specific subsystem.
            # <subsystem> = <default>

            # If this option is enabled log entries are appended to the existing
            # file.
            append = yes

            # Default loglevel.
            default = 2

            # Enabling this option disables block buffering and enables line
            # buffering.
            # flush_line = no

            # Prefix each log entry with the connection name and a unique
            # numerical identifier for each IKE_SA.
            ike_name = yes

            # Adds the milliseconds within the current second after the
            # timestamp (separated by a dot, so time_format should end with %S
            # or %T).
            # time_add_ms = no

            # Prefix each log entry with a timestamp. The option accepts a
            # format string as passed to strftime(3).
            # time_format =
        }
    }
}

Вы можете использовать его и проанализировать файл журнала, чтобы обнаружить проблему. Если вы не сможете разобраться, опубликуйте журнал подключений здесь, я постараюсь вам помочь.

Пролог:
Прочел все мануалы по IPsec на DFL.
Затем прочел все мануалы по IPsec на других устройствах, которые смог найти.
Попробовал различные комбинации.

Вводная: имеется DFL-260 со статическим белым адресом с одноранговой локалью за ним. Хочу подключаться к этой локалке через IPsec туннель с мобильной связи, из любой точки. Т. е. подключаться придется зачастую с динамического серого (NAT) адреса.

Пробовал подключаться:
1. штатными средствами Win7 (L2TP IPsec VPN, IKEv2) (NAT);
2. штатными средствами Android (L2TP/IPSec PSK, IPSec Xauth PSK) (мобильный интернет — NAT);
3. штатными средствами Ios (IKEv2, IPSec, L2TP) (мобильный интернет — NAT).

Все безрезультатно.

1. При попытке подключения с Win7 по L2TP IPsec VPN, выдается ошибка 788: Попытка L2TP-подключения не удалась, поскольку на уровне безопасности не удалось согласовать параметры с удаленным компьютером.
В логах на DFL следующее:

Код:

2018-08-15
12:27:15   
Info
IPSEC
1800904                  ike_sa_created
ipsec_if=dynamic_ipsec local_ip=<ВНЕШНИЙ IP DFL> local_port=4500 remote_iface=wan remote_ip=<ВНЕШНИЙ IP компа> remote_port=57944 local_id=<ВНЕШНИЙ IP DFL> remote_id=<ЛОКАЛЬНЫЙ IP компа в его локальной сети>local_ike_spi=0xa1f871a70951d192 remote_ike_spi=0x53bc392752c1ec0c initiator=FALSE algorithms=aes256-cbc/hmac-sha1-96/hmac-sha1/MODP_2048 mode=Main lifetime=28800 ikeversion=1 local_behind_nat=TRUE remote_behind_nat=TRUE initial_contact=FALSE

2018-08-15
12:27:15   
Info
IPSEC
1802023                  ike_sa_statistics
done=183 success=19 failed=164

2018-08-15
12:27:15   
Info
IPSEC
1802049                  [b]ipsec_sa_failed[/b]
ipsec_sa_disabled
statusmsg=»No proposal chosen» reason=»Peer IP address mismatch. Local Traffic Selector mismatch.» local_peer=»<ВНЕШНИЙ IP DFL>:4500 ID <ВНЕШНИЙ IP DFL>» remote_peer=»<ВНЕШНИЙ IP компа>:57944 ID <ЛОКАЛЬНЫЙ IP компа в его локальной сети>» ike_spi_i=0x53bc392752c1ec0c ike_spi_r=0xa1f871a70951d192

2018-08-15
12:27:15   
Notice
IPSEC
1800105                  ike_delete_notification
local_ip=<ВНЕШНИЙ IP DFL> remote_ip=<ВНЕШНИЙ IP компа> cookies=0x53bc392752c1ec0ca1f871a70951d192 reason=»Received delete notification»

2018-08-15
12:27:15   
Info
IPSEC
1800906                  ike_sa_deleted
ipsec_if=dynamic_ipsec local_ip=<ВНЕШНИЙ IP DFL> local_port=4500 remote_iface=wan remote_ip=<ВНЕШНИЙ IP компа> remote_port=57944 local_id=<ВНЕШНИЙ IP DFL> remote_id=<ЛОКАЛЬНЫЙ IP компа в его локальной сети> local_ike_spi=0xa1f871a70951d192 remote_ike_spi=0x53bc392752c1ec0c peer_dead=FALSE

Я так понимаю, первая фаза(ike) проходит нормально, а вторая(ipsec) прерывается из-за несоответствия внешнего ip и «id» инициатора туннеля. Если я прав, то что с этим делать?

При попытке подключения по IKEv2, Win7 выдает ошибку 13868: Ошибка сопоставления групповой политики.
В логах DFL следующее:

Код:

2018-08-15
12:40:56   
Error
IPSEC
1802221                  no_matching_tunnel_found
packet_will_be_discarded
localaddr=<ВНЕШНИЙ IP DFL> remoteaddr=<ВНЕШНИЙ IP компа> srcif=wan

2018-08-15
12:40:56   
Warning
IPSEC
1802022                  ike_sa_failed
no_ike_sa
statusmsg=»No proposal chosen» reason=»» local_peer=»<ВНЕШНИЙ IP DFL>:500 ID (null)» remote_peer=»<ВНЕШНИЙ IP компа>:500 ID (null)» spi_i=0x1960bcb26ab80e2c spi_r=0x6460b7a0d3e77fc4 initiator=FALSE

2018-08-15
12:40:56   
Info
IPSEC
1802023                  ike_sa_statistics
done=204 success=19 failed=185

2. При попытке подключения с Android по L2TP/IPSec PSK, соединение висит в состоянии «подключение», затем, спустя секунд 30 — «сбой».
В логах DFL следующее:

Код:

2018-08-15
12:44:57   
Error
IPSEC
1802221                  no_matching_tunnel_found
packet_will_be_discarded
localaddr=<ВНЕШНИЙ IP DFL> remoteaddr=<ВНЕШНИЙ IP Android> srcif=wan

2018-08-15
12:44:57   
Warning
IPSEC
1800107                  ike_invalid_proposal
local_ip=<ВНЕШНИЙ IP DFL> remote_ip=<ВНЕШНИЙ IP Android> cookies=0xd473938d4b3cf3eb5230d23d5b24cf6d reason=»Could not find acceptable proposal»

2018-08-15
12:44:57   
Warning
IPSEC
1802022                  ike_sa_failed
no_ike_sa
statusmsg=»No proposal chosen» reason=»» local_peer=»<ВНЕШНИЙ IP DFL>:500 ID (null)» remote_peer=»<ВНЕШНИЙ IP Android>:500 ID (null)» spi_i=0xd473938d4b3cf3eb spi_r=0x5230d23d5b24cf6d initiator=FALSE

2018-08-15
12:44:57   
Info
IPSEC
1802023                  ike_sa_statistics
done=211 success=19 failed=192

Тут, я так понимаю, не угадал с набором алгоритмов первой фазы. Как их следует изменить?

При попытке подключения с Android по IPSec Xauth PSK, соединение висит в состоянии «подключение», затем, спустя секунд 30 — «сбой».
В логах DFL то же самое. (хотя, при каких-то других параметрах, в логе было что-то похожее на несоответствие IP и ID)

3. При попытках подключения Ios по IKEv2 и IPSec содержимое лога идентичное ситуации, когда неверно подобраны алгоритмы 1 фазы.
При попытке подключения по L2TP — несоответствие IP и ID.

Как быть, куда копать? Вообще, возможно ли поднятие туннеля в таких условиях?

Настройки IPsec:

Вложение:

Комментарий к файлу: Настройки IPsec 1

IPSec_01.jpg
IPSec_01.jpg [ 53.82 KiB | Просмотров: 6089 ]

Вложение:

Комментарий к файлу: Настройки IPSec 2

IPSec_02.jpg
IPSec_02.jpg [ 77.54 KiB | Просмотров: 6089 ]

Вложение:

Комментарий к файлу: Настройки IPsec 3

IPSec_03.jpg
IPSec_03.jpg [ 98.89 KiB | Просмотров: 6089 ]

Последний раз редактировалось aNGEl0 Ср авг 15, 2018 13:01, всего редактировалось 1 раз.

I’ve tried all of the above and created a simple powershell script that does all of the configuration including adding the registry entry for behind a NAT firewall and using DH Group 14.

I’m still getting an 809 error when the Windows 10 computer is behind a pfSense router. I.e. if I have my surface pro hooked up to teathering on my android phone which has NAT then the Surface Pro will connect to the pFsense VPN no problem.

If however i have my surface pro at work behind work’s pfSense router and try and connect it to my home pfSense VPN with ipSec IKEv2 then it refuses to connect with 809 error and then a 631 informational message in the logs.

Using a Mac it works fine. Just Windows 10 that has issues.

On the client firewall version of pfSense outbound rules are set to automatic.

Any ideas as to what the problem could be? (The VPN is setup according to the ipSec and MSCHAP documentation and I’ve checked multiple times.

Here’s the pfsense host log too which seems to indicate that it’s working but then drops:

Jan 23 12:05:34
charon

02[JOB] <con1|28>deleting half open IKE_SA after timeout
Jan 23 12:05:06
charon

02[NET] <con1|28>sending packet: from 50.233.196.210[4500] to 10.100.0.63[4500] (1712 bytes)
Jan 23 12:05:06
charon

02[IKE] <con1|28>received retransmit of request with ID 1, retransmitting response
Jan 23 12:05:06
charon

02[ENC] <con1|28>parsed IKE_AUTH request 1 [ IDi CERTREQ N(MOBIKE_SUP) CPRQ(ADDR DNS NBNS SRV ADDR6 DNS6 SRV6) SA TSi TSr ]
Jan 23 12:05:06
charon

02[NET] <con1|28>received packet: from 10.100.0.63[4500] to 50.233.196.210[4500] (1328 bytes)
Jan 23 12:05:05
charon

02[NET] <con1|28>sending packet: from 50.233.196.210[4500] to 10.100.0.63[4500] (1712 bytes)
Jan 23 12:05:05
charon

02[IKE] <con1|28>received retransmit of request with ID 1, retransmitting response
Jan 23 12:05:05
charon

02[ENC] <con1|28>parsed IKE_AUTH request 1 [ IDi CERTREQ N(MOBIKE_SUP) CPRQ(ADDR DNS NBNS SRV ADDR6 DNS6 SRV6) SA TSi TSr ]
Jan 23 12:05:05
charon

02[NET] <con1|28>received packet: from 10.100.0.63[4500] to 50.233.196.210[4500] (1328 bytes)

Thanks!</con1|28></con1|28></con1|28></con1|28></con1|28></con1|28></con1|28></con1|28></con1|28>

Пролог:
Прочел все мануалы по IPsec на DFL.
Затем прочел все мануалы по IPsec на других устройствах, которые смог найти.
Попробовал различные комбинации.

Вводная: имеется DFL-260 со статическим белым адресом с одноранговой локалью за ним. Хочу подключаться к этой локалке через IPsec туннель с мобильной связи, из любой точки. Т. е. подключаться придется зачастую с динамического серого (NAT) адреса.

Пробовал подключаться:
1. штатными средствами Win7 (L2TP IPsec VPN, IKEv2) (NAT);
2. штатными средствами Android (L2TP/IPSec PSK, IPSec Xauth PSK) (мобильный интернет — NAT);
3. штатными средствами Ios (IKEv2, IPSec, L2TP) (мобильный интернет — NAT).

Все безрезультатно.

1. При попытке подключения с Win7 по L2TP IPsec VPN, выдается ошибка 788: Попытка L2TP-подключения не удалась, поскольку на уровне безопасности не удалось согласовать параметры с удаленным компьютером.
В логах на DFL следующее:

Код:

2018-08-15
12:27:15   
Info
IPSEC
1800904                  ike_sa_created
ipsec_if=dynamic_ipsec local_ip=<ВНЕШНИЙ IP DFL> local_port=4500 remote_iface=wan remote_ip=<ВНЕШНИЙ IP компа> remote_port=57944 local_id=<ВНЕШНИЙ IP DFL> remote_id=<ЛОКАЛЬНЫЙ IP компа в его локальной сети>local_ike_spi=0xa1f871a70951d192 remote_ike_spi=0x53bc392752c1ec0c initiator=FALSE algorithms=aes256-cbc/hmac-sha1-96/hmac-sha1/MODP_2048 mode=Main lifetime=28800 ikeversion=1 local_behind_nat=TRUE remote_behind_nat=TRUE initial_contact=FALSE

2018-08-15
12:27:15   
Info
IPSEC
1802023                  ike_sa_statistics
done=183 success=19 failed=164

2018-08-15
12:27:15   
Info
IPSEC
1802049                  [b]ipsec_sa_failed[/b]
ipsec_sa_disabled
statusmsg=»No proposal chosen» reason=»Peer IP address mismatch. Local Traffic Selector mismatch.» local_peer=»<ВНЕШНИЙ IP DFL>:4500 ID <ВНЕШНИЙ IP DFL>» remote_peer=»<ВНЕШНИЙ IP компа>:57944 ID <ЛОКАЛЬНЫЙ IP компа в его локальной сети>» ike_spi_i=0x53bc392752c1ec0c ike_spi_r=0xa1f871a70951d192

2018-08-15
12:27:15   
Notice
IPSEC
1800105                  ike_delete_notification
local_ip=<ВНЕШНИЙ IP DFL> remote_ip=<ВНЕШНИЙ IP компа> cookies=0x53bc392752c1ec0ca1f871a70951d192 reason=»Received delete notification»

2018-08-15
12:27:15   
Info
IPSEC
1800906                  ike_sa_deleted
ipsec_if=dynamic_ipsec local_ip=<ВНЕШНИЙ IP DFL> local_port=4500 remote_iface=wan remote_ip=<ВНЕШНИЙ IP компа> remote_port=57944 local_id=<ВНЕШНИЙ IP DFL> remote_id=<ЛОКАЛЬНЫЙ IP компа в его локальной сети> local_ike_spi=0xa1f871a70951d192 remote_ike_spi=0x53bc392752c1ec0c peer_dead=FALSE

Я так понимаю, первая фаза(ike) проходит нормально, а вторая(ipsec) прерывается из-за несоответствия внешнего ip и «id» инициатора туннеля. Если я прав, то что с этим делать?

При попытке подключения по IKEv2, Win7 выдает ошибку 13868: Ошибка сопоставления групповой политики.
В логах DFL следующее:

Код:

2018-08-15
12:40:56   
Error
IPSEC
1802221                  no_matching_tunnel_found
packet_will_be_discarded
localaddr=<ВНЕШНИЙ IP DFL> remoteaddr=<ВНЕШНИЙ IP компа> srcif=wan

2018-08-15
12:40:56   
Warning
IPSEC
1802022                  ike_sa_failed
no_ike_sa
statusmsg=»No proposal chosen» reason=»» local_peer=»<ВНЕШНИЙ IP DFL>:500 ID (null)» remote_peer=»<ВНЕШНИЙ IP компа>:500 ID (null)» spi_i=0x1960bcb26ab80e2c spi_r=0x6460b7a0d3e77fc4 initiator=FALSE

2018-08-15
12:40:56   
Info
IPSEC
1802023                  ike_sa_statistics
done=204 success=19 failed=185

2. При попытке подключения с Android по L2TP/IPSec PSK, соединение висит в состоянии «подключение», затем, спустя секунд 30 — «сбой».
В логах DFL следующее:

Код:

2018-08-15
12:44:57   
Error
IPSEC
1802221                  no_matching_tunnel_found
packet_will_be_discarded
localaddr=<ВНЕШНИЙ IP DFL> remoteaddr=<ВНЕШНИЙ IP Android> srcif=wan

2018-08-15
12:44:57   
Warning
IPSEC
1800107                  ike_invalid_proposal
local_ip=<ВНЕШНИЙ IP DFL> remote_ip=<ВНЕШНИЙ IP Android> cookies=0xd473938d4b3cf3eb5230d23d5b24cf6d reason=»Could not find acceptable proposal»

2018-08-15
12:44:57   
Warning
IPSEC
1802022                  ike_sa_failed
no_ike_sa
statusmsg=»No proposal chosen» reason=»» local_peer=»<ВНЕШНИЙ IP DFL>:500 ID (null)» remote_peer=»<ВНЕШНИЙ IP Android>:500 ID (null)» spi_i=0xd473938d4b3cf3eb spi_r=0x5230d23d5b24cf6d initiator=FALSE

2018-08-15
12:44:57   
Info
IPSEC
1802023                  ike_sa_statistics
done=211 success=19 failed=192

Тут, я так понимаю, не угадал с набором алгоритмов первой фазы. Как их следует изменить?

При попытке подключения с Android по IPSec Xauth PSK, соединение висит в состоянии «подключение», затем, спустя секунд 30 — «сбой».
В логах DFL то же самое. (хотя, при каких-то других параметрах, в логе было что-то похожее на несоответствие IP и ID)

3. При попытках подключения Ios по IKEv2 и IPSec содержимое лога идентичное ситуации, когда неверно подобраны алгоритмы 1 фазы.
При попытке подключения по L2TP — несоответствие IP и ID.

Как быть, куда копать? Вообще, возможно ли поднятие туннеля в таких условиях?

Настройки IPsec:

Вложение:

Комментарий к файлу: Настройки IPsec 1

IPSec_01.jpg
IPSec_01.jpg [ 53.82 KiB | Просмотров: 6270 ]

Вложение:

Комментарий к файлу: Настройки IPSec 2

IPSec_02.jpg
IPSec_02.jpg [ 77.54 KiB | Просмотров: 6270 ]

Вложение:

Комментарий к файлу: Настройки IPsec 3

IPSec_03.jpg
IPSec_03.jpg [ 98.89 KiB | Просмотров: 6270 ]

Последний раз редактировалось aNGEl0 Ср авг 15, 2018 13:01, всего редактировалось 1 раз.

Чтобы выяснить, в чем заключается проблема, вы должны, в качестве первого шага, включить ведение журнала и посмотреть, что происходит во время процесса подключения. Вот пример конфигурации, который я использую на своем сервере.

/etc/strongswan.d/charon-logging.conf

charon {
    # Section to define file loggers, see LOGGER CONFIGURATION in
    # strongswan.conf(5).
    filelog {
        # <filename> is the full path to the log file.
        /var/log/strongswan.log {

            # Loglevel for a specific subsystem.
            # <subsystem> = <default>

            # If this option is enabled log entries are appended to the existing
            # file.
            append = yes

            # Default loglevel.
            default = 2

            # Enabling this option disables block buffering and enables line
            # buffering.
            # flush_line = no

            # Prefix each log entry with the connection name and a unique
            # numerical identifier for each IKE_SA.
            ike_name = yes

            # Adds the milliseconds within the current second after the
            # timestamp (separated by a dot, so time_format should end with %S
            # or %T).
            # time_add_ms = no

            # Prefix each log entry with a timestamp. The option accepts a
            # format string as passed to strftime(3).
            # time_format =
        }
    }
}

Вы можете использовать его и проанализировать файл журнала, чтобы обнаружить проблему. Если вы не сможете разобраться, опубликуйте журнал подключений здесь, я постараюсь вам помочь.

Error code: 13868

This error can occur when using the IKEv2 protocol and the IKEv2 security settings configured on the client don’t match the settings configured on the server.

What is VPN connection error 13868?

Error code 13868 translates to ERROR_IPSEC_IKE_POLICY_MATCH. Essentially this error indicates that the IKEv2 security policy on the client did not match the configuration on the server.

What are the error codes for always on VPN?

Always On VPN administrators will be familiar with error codes such as 809, 691 and 812, 853, 858, and even 13801, 13806, and 13868.

What is 13806 always on VPN?

Error code: 13806

Contact your network security administrator about installing a valid certificate in the appropriate certificate store. Possible cause. This error typically occurs when no machine certificate or root machine certificate is present on the VPN server.

Why is my always on VPN not connecting?

If the AOVPN setup doesn’t connect clients to your internal network, the cause is likely an invalid VPN certificate, incorrect NPS policies, issues that affect the client deployment scripts, or issues that occur in Routing and Remote Access.

Always On VPN Deployment Guide

How do I make my VPN always connected?

  1. If you haven’t already, add a VPN.
  2. Open your phone’s Settings app.
  3. Tap Network & internet. VPN. …
  4. Next to the VPN you want to change, tap Settings .
  5. Turn Always-on VPN on or off. If you’ve set up a VPN through an app, you won’t have the always-on option.
  6. If needed, tap Save.

How do I stop VPN from blocking my internet?

When your VPN gets blocked, a manual VPN connection might be your best solution. You can try setting up a VPN connection manually on your device (for example, it’s possible on Windows 10) via inbuilt VPN functionality or an app like OpenVPN Connect or strongSwan.

Should you always have VPN turned on?

You should use a Virtual Private Network (VPN) whenever you’re online. By doing so, you make sure that your data and privacy are protected. Without a VPN, your every action online may be monitored and taken advantage of. A VPN encrypts all of your data, effectively hiding any information about you from prying eyes.

Is it safe to always on VPN?

Security: Always On VPN has new, advanced security capabilities to restrict the type of traffic, which applications can use the VPN connection, and which authentication methods you can use to initiate the connection. When the connection is active most of the time, it is especially important to secure the connection.

Is it good to always have VPN on?

Always keeping a VPN on is necessary to ensure that your device and personal information is protected. For instance, with a VPN (Virtual Private Network) always on, can protect you from cyberthreats on public Wi-Fi.

How do I fix VPN error?

How to Fix VPN Not Connecting

  1. Change your VPN server. If something is wrong with that particular node, switching to a different one will help. …
  2. Reboot the device (and the router). …
  3. Temporarily disable firewalls/antivirus/anti-spyware. …
  4. Connect using a different protocol. …
  5. Reinstall & reboot. …
  6. Switch networks.

What is error code 13801 on always on VPN?

Certificate Chain

A 13801 error will occur if the client does not trust the certificate installed on the VPN server. Ensure the client has all the necessary root and intermediate certification authority (CA) certificates installed in their respective certificate stores.

What is always on VPN 13899?

Error code: 13899

If the VPN server is configured to assign IP addresses from a static pool, check if all available addresses have been allocated. If so, add additional IP address space to the pool.

How to reset VPN?

In the portal, go to the virtual network gateway that you want to reset. On the Virtual network gateway page, in the left pane, scroll down to the Support + Troubleshooting section and select Reset. On the Reset page, click Reset.

How do I fix VPN on Chrome?

5 Ways to Fix VPN Connection Issues in Google Chrome

  1. Clear browsing data.
  2. Disable proxy server.
  3. Disable Chrome extensions.
  4. Flush DNS cache.
  5. Check firewall settings.
  6. Use updated VPN app.
  7. Disable network lock in VPN app.

How to setup VPN in network security?

How to Set up a VPN on Your Router

  1. Type your router’s internet protocol (IP) address and password to log into your admin panel.
  2. Find the VPN option in the settings.
  3. Select the option for VPN client, not VPN server.
  4. Enter the correct settings. …
  5. Complete any additional steps your router may request.

What does always on VPN mean?

Always On VPN is Microsoft’s technology for Windows 10 clients that replaces Direct Access and provides secure remote access for clients. Replacing Microsoft’s older Direct Access technology, the VPN connection is “always on” and securely connected to the internet after the connection is established.

Is VPN needed for home Wi-Fi?

Most people won’t need to log into a VPN service when accessing the internet from home, whether from an Android phone, a Windows computer, or other connected device. That doesn’t mean, though, that VPNs aren’t important online privacy tools, particularly when you’re accessing the internet on the go.

Why would you turn off VPN?

While it’s recommended to use a VPN at all times, there are a few scenarios when you might want to disable it for a short while. Situations in which you may wish to disconnect a VPN include: troubleshooting network issues; setting up an internet connection for the first time.

Why should I disable VPN?

Turning off your VPN reveals your IP address, identity, and data to interested parties, including snoopers and cybercrooks. You’ll also lose secure access to your favorite content on certain networks. We recommend you always keep your VPN on and only disconnect if absolutely necessary.

Should VPN be on or off on my phone?

Should I Run a VPN on My iPhone or Android Smartphone? Yes, You Should! A VPN (virtual private network) is a service that provides a secure Internet connection by using private servers in remote locations. All data traveling between your computer, smartphone or tablet and the VPN server is securely encrypted.

Can VPN block my Wi-Fi?

The flow of traffic to and from a VPN server is managed by VPN ports. Just like VPN protocols, some ports might also get blocked, causing no internet access when connected to VPN.

Can Wi-Fi block you from using a VPN?

Yes, public Wi-Fi networks can block you from accessing them with a VPN. Whoever is hosting the connection gets to choose the terms of use, so occasionally, they will block them. However, anybody who intentionally blocks you from using a VPN is generally only doing it so they can track your online activity.

Can my internet provider block me from using VPN?

Yes, an ISP can block a VPN by blocking IP addresses associated with a certain VPN provider or disabling communication ports. If you’re unable to connect to the internet when using a VPN, your ISP might be restricting the access. You can solve this problem by switching to a different server, port, or protocol.

How does always on VPN know when to connect?

When deploying Windows 10 Always On VPN, administrators can configure Trusted Network Detection (TND) which enables clients to detect when they are on the internal network. With this option set, the client will only automatically establish a VPN connection when it is outside the trusted network.

Always On VPN IKEv2 Policy Mismatch ErrorThe Internet Key Exchange version 2 (IKEv2) VPN protocol is the protocol of choice for Windows 10 Always On VPN deployments where the highest levels of security and assurance are required. However, as I’ve written about in the past, often the default IKEv2 security settings are less than desirable. Before using IKEv2 VPN in a production environment the administrator will need to update these security settings accordingly.

Connection Failure

When configuring Windows Server Routing and Remote Access Service (RRAS) or a third-party VPN appliance to support IKEv2 using custom security policies, the administrator may encounter a scenario in which a connection cannot be established due to a policy mismatch error. When the connection attempt fails, an error will be recorded in the Windows Application event log from the RasClient source with Event ID 20227. The error message states the following:

“The user [username] dialed a connection named [connection name] which has failed. The error code returned on failure is 13868.”

Always On VPN IKEv2 Policy Mismatch Error

Error Code 13868

Error code 13868 translates to ERROR_IPSEC_IKE_POLICY_MATCH. Essentially this error indicates that the IKEv2 security policy on the client did not match the configuration on the server.

Server Configuration

To view the current IKEv2 IPsec policy configuration, open an elevated PowerShell command window and run the following command.

Get-VpnServerIPsecConfiguration

Always On VPN IKEv2 Policy Mismatch Error

Client Configuration

To ensure interoperability, the VPN client must be configured to use the same IKEv2 security policy as defined on the sever. To view a VPN client’s currently configured IKEv2 security policy, open an elevated PowerShell command window and run the following command.

Get-VpnConnection -Name [connection name] | Select-Object -ExpandProperty IPsecCustomPolicy

Always On VPN IKEv2 Policy Mismatch Error

Note: If this PowerShell command returns no output, the VPN connection is not using a custom IKEv2 IPsec security policy.

Updating Settings

Guidance for configuring IKEv2 security policies on Windows Server RRAS and Windows 10 can be found here.

NPS Policy

Another common cause of IKEv2 policy mismatch errors is a misconfigured Network Policy Server (NPS) network policy. Specifically, administrators may disable Basic and Strong encryption for MPPE in an attempt to improve security.

Always On VPN IKEv2 Policy Mismatch Error

The NPS policy for Always On VPN must include Strong encryption at a minimum. Basic and No encryption can be safely disabled.

Always On VPN IKEv2 Policy Mismatch Error

Summary

IKEv2 policy mismatch errors can be resolved easily by ensuring both the VPN server and client are configured to use the same IPsec security policies. Use the PowerShell commands in the above referenced above to validate settings and make changes when necessary.

Additional Information

Windows 10 Always On VPN IKEv2 Security Configuration

Windows 10 Always On VPN IKEv2 Features and Limitations

Show-VpnConnectionIPsecConfiguration PowerShell script on Github

Set-IKEv2SecurityBaseline PowerShell script on Github

Понравилась статья? Поделить с друзьями:
  • Возглавить движение речевая ошибка
  • Возвращенный код ошибки 0х8007048f bluetooth
  • Возвращен код ошибки 13801
  • Возвращаясь домой я загрустила где ошибка
  • Возвращаясь домой шел дождь речевая ошибка