Jump to content
  • 0

L2TP VPN Keenetic Giga KN-1010 ошибка , не работает


arka

Question

Купили два роутера что бы между ними настроить L2TP соединение.

Текущая версия KeeneticOS: 3.1.10 на обоих.

На одном включил приложение сервер. Через второй пытаюсь присоединится как клиент. Доступы в интернет разные. IP адрес на сервере статический.

Ниже лог. 

 

Окт 28 19:34:19 ndm
Network::Interface::Base: "L2TP0": interface is up.
Окт 28 19:34:19 ndm
Network::Interface::PppTunnel: "L2TP0": try to resolve remote endpoint via 192.168.43.63.
Окт 28 19:34:19 ndm
Network::Interface::PppTunnel: "L2TP0": remote endpoint is resolved to "195.94.253.54".
Окт 28 19:34:19 ndm
Network::Interface::PppTunnel: "L2TP0": connecting via WifiMaster0/WifiStation0 (WifiMaster0/WifiStation0).
Окт 28 19:34:19 ndm
Network::Interface::PppTunnel: "L2TP0": local endpoint is resolved to "192.168.43.47".
Окт 28 19:34:19 ndm
Network::Interface::PppTunnel: "L2TP0": added host route to 195.94.253.54 via 192.168.43.63 (WifiMaster0/WifiStation0).
Окт 28 19:34:19 ndm
Network::Interface::Base: "L2TP0": static MTU is 1400.
Окт 28 19:34:19 ndm
Network::Interface::L2tp: "L2TP0": using port 1701 as local.
Окт 28 19:34:19 ndm
Network::Interface::Ppp: "L2TP0": enabled connection via WifiMaster0/WifiStation0 interface.
Окт 28 19:34:21 l2tp[4828]
Plugin pppol2tp.so loaded.
Окт 28 19:34:21 l2tp[4828]
pppd 2.4.4-4 started by root, uid 0
Окт 28 19:34:21 ndm
Network::Interface::PppTunnel: "L2TP0": added host route to 195.94.253.54 via 192.168.43.63 (WifiMaster0/WifiStation0).
Окт 28 19:34:21 pppd_L2TP0
l2tp_control v2.02
Окт 28 19:34:21 pppd_L2TP0
remote host: 195.94.253.54:1701
Окт 28 19:34:21 pppd_L2TP0
local bind: 192.168.43.47:1701
Окт 28 19:34:23 pppd_L2TP0
timeout of sccrp, retry sccrq, try: 1
Окт 28 19:34:25 pppd_L2TP0
timeout of sccrp, retry sccrq, try: 2
Окт 28 19:34:27 pppd_L2TP0
timeout of sccrp, retry sccrq, try: 3
Окт 28 19:34:29 pppd_L2TP0
timeout of sccrp, retry sccrq, try: 4
Окт 28 19:34:31 pppd_L2TP0
timeout of sccrp, retry sccrq, try: 5
Окт 28 19:34:31 pppd_L2TP0
sccrq failed, fatal
Окт 28 19:34:40 pppd_L2TP0
control init failed
Окт 28 19:34:40 pppd_L2TP0
Couldn't get channel number: Bad file descriptor
Окт 28 19:34:40 pppd_L2TP0
Exit.
Окт 28 19:34:40 ndm
Service: "L2TP0": unexpectedly stopped.
Окт 28 19:34:40 ndm
Network::Interface::Base: "L2TP0": interface is up.
Окт 28 19:34:40 ndm
Network::Interface::PppTunnel: "L2TP0": try to resolve remote endpoint via 192.168.43.63.
Окт 28 19:34:47 ndm
Network::Interface::PppTunnel: "L2TP0": fallback to resolve remote endpoint via default DNS.
Окт 28 19:34:47 ndm
Network::Interface::PppTunnel: "L2TP0": remote endpoint is resolved to "195.94.253.54".
Окт 28 19:34:47 ndm
Network::Interface::PppTunnel: "L2TP0": connecting via WifiMaster0/WifiStation0 (WifiMaster0/WifiStation0).
Окт 28 19:34:47 ndm
Network::Interface::PppTunnel: "L2TP0": local endpoint is resolved to "192.168.43.47".
Окт 28 19:34:47 ndm
Network::Interface::PppTunnel: "L2TP0": added host route to 195.94.253.54 via 192.168.43.63 (WifiMaster0/WifiStation0).
Окт 28 19:34:47 ndm
Network::Interface::Base: "L2TP0": static MTU is 1400.
Окт 28 19:34:47 ndm
Network::Interface::L2tp: "L2TP0": using port 1701 as local.
Окт 28 19:34:47 ndm
Network::Interface::Ppp: "L2TP0": enabled connection via WifiMaster0/WifiStation0 interface.

 

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 1

Маршрут на клиенте:

До сети 192.168.0.0(сеть за сервером)

шлюз не заполнять

Интерфейс -выбрать l2tp интерфейс из списка до сервера

поставить галку добавлять автоматически

Маршрут на сервере:

 До сети 192.168.1.0(сеть за клиентом)

шлюз -ip выданный l2tp клиенту

Интерфейс -«любой» 

поставить галку добавлять автоматически

Link to comment
Share on other sites

  • 1

Кстати @arka а вам все это зачем?

Если просто чтобы объединить 2 сети - сервера 192.168.0.0/24  и клиента 192.168.1.0/24

то самый простой вариант то что вы сделали в этом посте:

 

Только там где вы указываете локальную и удаленную сети нужно указывать именно те сети которые требуется объединить, т.е. 192.168.0.0/24  , 192.168.1.0/24 

а не 192.168.3.0/24  и клиента 192.168.4.0/24 как в скринах

И в таком варианте ни маршруты, ни firewall настраивать не надо. Все разруливается на уровне ipsec.

 

  • Thanks 1
Link to comment
Share on other sites

  • 0

У кинетика сервер есть l2tp/ipsec, соответственно используйте l2tp/ipsec клиент, а не простоl2tp

Link to comment
Share on other sites

  • 0

Нашел то о чем вы говорите, спасибо. Попробовал. Всё равно не работает.

Сначала надо прокинуть тоннель IPSEC, а потом авторизацию. Делал по статье https://help.keenetic.com/hc/ru/articles/360000422620-IPSec-VPN-клиент-сервер

Ссылки которые идут под вашим ответом как буд-то для старой прошивки. У меня меню другие.
Я нашел вот эту статью:
 
Вот какие настройки я добавил:
SERVER, SCREEN :
 
CLIENT, SCREEN:
 
 
Log клиента (XX.XX — это белый IP в логе, заменил):

 

Окт 29 14:53:10 ndm
Core::Syslog: the system log has been cleared.
Окт 29 14:54:09 ndm
Network::Acl: "_WEBADMIN_IPSEC_tirstroyipsec" access list removed.
Окт 29 14:54:09 ndm
Network::Acl: rule accepted.
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto ike key successfully updated.
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto ike proposal encryption algorithm "des" added.
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto ike proposal DH group "1" successfully added.
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto ike proposal integrity algorithm "md5" successfully added.
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto ike proposal "tirstroyipsec" successfully added.
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto ike policy lifetime set to 3600 s.
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto ike policy mode set to "ikev2".
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto ipsec transform-set cypher "esp-des" successfully added.
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto ipsec transform-set hmac "esp-md5-hmac" successfully added.
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto ipsec transform-set lifetime set to 3600 s.
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto ipsec profile dpd-interval is set to 10 s.
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto ipsec profile identity-local is set to "client" with type "dn".
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto ipsec profile match-identity-remote is set to "server" with type "dn".
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto ipsec profile authentication-local type "pre-share" is set.
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto ipsec profile mode set to "tunnel".
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto ipsec profile policy set to "tirstroyipsec".
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto ipsec profile xauth is disabled.
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto map primary remote peer is set to "tirstroy.keenetic.pro".
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto map ipsec profile is set to "tirstroyipsec".
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto map ipsec transform-set is set to "tirstroyipsec".
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto map match-address set to "_WEBADMIN_IPSEC_tirstroyipsec".
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto map tcpmss set to pmtu.
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto map autoconnect enabled.
Окт 29 14:54:09 ndm
IpSec::Manager: "tirstroyipsec": crypto map SA renegotiation enabled.
Окт 29 14:54:09 ndm
Core::ConfigurationSaver: saving configuration...
Окт 29 14:54:11 ndm
IpSec::Manager: create IPsec reconfiguration transaction...
Окт 29 14:54:11 ndm
IpSec::Manager: add config for crypto map "tirstroyipsec".
Окт 29 14:54:11 ndm
IpSec::Manager: IPsec reconfiguration transaction was created.
Окт 29 14:54:11 ndm
IpSec::Configurator: start applying IPsec configuration.
Окт 29 14:54:11 ndm
IpSec::Configurator: IPsec configuration applying is done.
Окт 29 14:54:11 ndm
IpSec::Configurator: start reloading IKE keys task.
Окт 29 14:54:11 ipsec
11[CFG] rereading secrets
Окт 29 14:54:11 ipsec
11[CFG] loading secrets
Окт 29 14:54:11 ipsec
11[CFG] loaded IKE secret for @client @server
Окт 29 14:54:11 ipsec
11[CFG] rereading ca certificates from '/tmp/ipsec/ipsec.d/cacerts'
Окт 29 14:54:11 ipsec
11[CFG] rereading aa certificates from '/tmp/ipsec/ipsec.d/aacerts'
Окт 29 14:54:11 ndm
IpSec::Configurator: reloading IKE keys task done.
Окт 29 14:54:11 ipsec
11[CFG] rereading ocsp signer certificates from '/tmp/ipsec/ipsec.d/ocspcerts'
Окт 29 14:54:11 ipsec
11[CFG] rereading attribute certificates from '/tmp/ipsec/ipsec.d/acerts'
Окт 29 14:54:11 ipsec
11[CFG] rereading crls from '/tmp/ipsec/ipsec.d/crls'
Окт 29 14:54:11 ndm
IpSec::Configurator: start reloading IPsec config task.
Окт 29 14:54:11 ipsec
15[CFG] received stroke: unroute 'tirstroyipsec'
Окт 29 14:54:11 ndm
IpSec::IpSecNetfilter: start reloading netfilter configuration...
Окт 29 14:54:11 ndm
IpSec::IpSecNetfilter: netfilter configuration reloading is done.
Окт 29 14:54:11 ndm
IpSec::Configurator: reloading IPsec config task done.
Окт 29 14:54:11 ndm
IpSec::Configurator: "tirstroyipsec": crypto map active IKE SA: 0, active CHILD SA: 0.
Окт 29 14:54:11 ipsec
trap policy 'tirstroyipsec' unrouted
Окт 29 14:54:11 ipsec
Окт 29 14:54:11 ipsec
08[CFG] received stroke: delete connection 'tirstroyipsec'
Окт 29 14:54:11 ipsec
08[CFG] deleted connection 'tirstroyipsec'
Окт 29 14:54:11 ipsec
00[DMN] signal of type SIGHUP received. Reloading configuration
Окт 29 14:54:11 ipsec
10[CFG] received stroke: add connection 'tirstroyipsec'
Окт 29 14:54:11 ipsec
00[CFG] loaded 0 entries for attr plugin configuration
Окт 29 14:54:11 ipsec
10[CFG] added configuration 'tirstroyipsec'
Окт 29 14:54:12 ndm
Core::ConfigurationSaver: configuration saved.
Окт 29 14:54:13 ndm
IpSec::Configurator: "tirstroyipsec": crypto map shutdown started.
Окт 29 14:54:13 ipsec
08[CFG] received stroke: unroute 'tirstroyipsec'
Окт 29 14:54:13 ipsec
10[CFG] received stroke: terminate 'tirstroyipsec{*}'
Окт 29 14:54:13 ipsec
10[CFG] no CHILD_SA named 'tirstroyipsec' found
Окт 29 14:54:13 ipsec
12[CFG] received stroke: terminate 'tirstroyipsec[*]'
Окт 29 14:54:13 ipsec
12[CFG] no IKE_SA named 'tirstroyipsec' found
Окт 29 14:54:13 ndm
IpSec::Configurator: "tirstroyipsec": crypto map shutdown complete.
Окт 29 14:54:14 ipsec
07[CFG] received stroke: initiate 'tirstroyipsec'
Окт 29 14:54:14 ndm
IpSec::Configurator: "tirstroyipsec": crypto map initialized.
Окт 29 14:54:14 ipsec
08[IKE] initiating IKE_SA tirstroyipsec[1] to XXX.XX.XX.XX
Окт 29 14:54:22 ipsec
05[IKE] retransmit 1 of request with message ID 0
Окт 29 14:54:31 ipsec
11[IKE] retransmit 2 of request with message ID 0
Окт 29 14:54:41 ipsec
12[IKE] retransmit 3 of request with message ID 0
Окт 29 14:54:51 ipsec
10[IKE] retransmit 4 of request with message ID 0
Окт 29 14:55:03 ipsec
13[IKE] retransmit 5 of request with message ID 0
Окт 29 14:55:16 ipsec
11[IKE] retransmit 6 of request with message ID 0

 

Edited by arka
Link to comment
Share on other sites

  • 0

Ага, по ним и настраивал. Спасибо вам !

Ошибку , описанную в предыдущем посте нашел - к роутеру-клиенту был подключен езернет кабель ведущий к серверу DHCP и он занимал диапазон 192.168.0.0 , как его отключил сразу тоннель заработал.

 

Машрутизацию теперь до клиента не могу прокинуть, выдаёт ошибку http://prntscr.com/ppn38d

Пользуюсь вот этой статьёй https://help.keenetic.com/hc/ru/articles/360001390359-Маршрутизация-сетей-через-VPN

Link to comment
Share on other sites

  • 0
23 минуты назад, arka сказал:

Фишка была вот в этой галочке http://prntscr.com/ppnlp8  

Тем не менее это не помогло клиенту видеть  сеть  сервера (192.168.0.0 диапазон).

Тоннель перезапустил.

Есть идеи в чем моя ошибка?

Надо в нстройках сервера выдать постоянный ip клиенту

а на клиенте натроить маршрут к сети сервера указав шлюзом этот ip, а не ip из локалки сервера. 
зы ну и если нужен доступ из сети сервера в клиента то также маршруты + настройки firewall на клиенте. 

Link to comment
Share on other sites

  • 0

 

18 minutes ago, r13 said:

Надо в нстройках сервера выдать постоянный ip клиенту

Я выдал.

192.168.3.1 -- это адресс клиента VPN (кинетик клиент)

 

19 minutes ago, r13 said:

зы ну и если нужен доступ из сети сервера в клиента то также маршруты + настройки firewall на клиенте. 

Файер на клиенте настроил. TCP/UDP/ICMP allow

А вот маршрут...

Сделал так, но не помогло http://prntscr.com/ppofna

Мне кажется здесь такая проблема -

у сервера сеть 192.168.0.0 , у vpn клиента 192.168.3.1

а у подсоединящихся по wifi к клиенту подсеть 192.168.1.0 (а я как раз с них должен получить доступ через VPN тоннель в 192.168.0.0)

Маршрутизацией не занимался, где то допускаю ошибку.

Link to comment
Share on other sites

  • 0

Данные из Клиента к Серверной подсети идут. 
Из серверной клиенты не пингуются. 

http://prntscr.com/ppovsj

откуда то вылез 10.7.21.2 , вообще не понятно. Его нет в списке.

Попробовал сменить сеть wifi за клиентом на 192.168.4.0

Прописать на сервере маршрут, сходный с тем что вы дали

Quote

 

До сети 192.168.4.0(сеть за клиентом)

шлюз -ip выданный l2tp клиенту

Интерфейс -«любой» 

поставить галку добавлять автоматически

 

 

может быть потому что сеть за клиентом (именно в тоннеле) 192.168.3.0  ? а у wifi  клиентов 192.168.4.0

как их соединить ?

Link to comment
Share on other sites

  • 0

Судя по скрину маршрут до клиентской сети не применился, надо переподкчить клиента после изменения маршрутов. 

Link to comment
Share on other sites

  • 0

Отлично. Работает. Осталось из 192.168.0.0/24 передать доменные имена в 1.0/24. 

До меня не сразу дошло что это два разных способа. А так как я вбил не правильно подсети, оно не заводилось долго. И  мысль моя пошла не правильно - что надо тоннель ipsec , а потом авторизацию через клиент-сервер L2TP. 

Где то надо DNS сервер 192.168.0.42 вбить на роутере-клиенте? Думаю можно его указать просто в соединении с интернетом через йота модем на роутере-клиенте...

Link to comment
Share on other sites

  • 0

Попробовал IPSEC тоннель, с теми же настройками, через модем Yota Wifi USB (прям в раутер вставил его). - не пробрасывается тоннель между гигами и все.

Я знаю что у самого модема тоже своё NAT, но все что можно я включил для того что бы работало, как например на скрине в приложении.

ЛОГ при этом:

IpSec::Configurator: "tirstroyipsec": crypto map active IKE SA: 0, active CHILD SA: 0.
Ноя 8 16:07:48 ndm
IpSec::Configurator: fallback peer is not defined for crypto map "tirstroyipsec", retry.
Ноя 8 16:07:48 ndm
IpSec::Configurator: "tirstroyipsec": schedule reconnect for crypto map.
Ноя 8 16:07:48 ipsec
11[IKE] establishing IKE_SA failed, peer not responding
Ноя 8 16:08:04 ndm
IpSec::Configurator: reconnecting crypto map "tirstroyipsec".
Ноя 8 16:08:06 ndm
IpSec::Configurator: "tirstroyipsec": crypto map shutdown started.
Ноя 8 16:08:06 ipsec
12[CFG] received stroke: unroute 'tirstroyipsec'
Ноя 8 16:08:06 ipsec
13[CFG] received stroke: terminate 'tirstroyipsec{*}'
Ноя 8 16:08:06 ipsec
13[CFG] no CHILD_SA named 'tirstroyipsec' found
Ноя 8 16:08:06 ipsec
10[CFG] received stroke: terminate 'tirstroyipsec[*]'
Ноя 8 16:08:06 ipsec
10[CFG] no IKE_SA named 'tirstroyipsec' found
Ноя 8 16:08:06 ndm
IpSec::Configurator: "tirstroyipsec": crypto map shutdown complete.
Ноя 8 16:08:08 ipsec
06[CFG] received stroke: initiate 'tirstroyipsec'
Ноя 8 16:08:08 ndm
IpSec::Configurator: "tirstroyipsec": crypto map initialized.
Ноя 8 16:08:08 ipsec
07[IKE] initiating IKE_SA tirstroyipsec[673] to XXX.XX.253.54
Ноя 8 16:08:16 ipsec
05[IKE] retransmit 1 of request with message ID 0
Ноя 8 16:08:25 ipsec
04[IKE] retransmit 2 of request with message ID 0
Ноя 8 16:08:35 ipsec
05[IKE] retransmit 3 of request with message ID 0
Ноя 8 16:08:46 ipsec
14[IKE] retransmit 4 of request with message ID 0
Ноя 8 16:08:57 ipsec
12[IKE] retransmit 5 of request with message ID 0
Ноя 8 16:09:10 ipsec
13[IKE] retransmit 6 of request with message ID 0
Ноя 8 16:09:24 ipsec
11[IKE] retransmit 7 of request with message ID 0
Ноя 8 16:09:40 ipsec
08[IKE] retransmit 8 of request with message ID 0
Ноя 8 16:09:57 ipsec
15[IKE] giving up after 8 retransmits
Ноя 8 16:09:57 ndm
IpSec::Configurator: remote peer of crypto map "tirstroyipsec" is down.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...