Jump to content

Recommended Posts

Приветствую всех.
На Keenetic Ultra (KN-1811 KeenOS 4.1.3) поднято Wireguard подключение к внешнему vds серверу, это подключение отмечено "использовать для выхода в Интернет", и оно работает. Нужно через этот wireguarg туннель подключиться к PPPTP серверу, находящемуся на другом внешнем vds сервере. Сейчас ppptp подключение не устанавливается. Подключение на tcp порт 1723 сервера ppptp проходит, но на gre пакеты ответа нет. Без wireguard, напрямую, ppptp подключение поднимается.
Т.к. доступа к ppptp серверу нет, то для проверки поднял ppptp сервер в локальной сети на другом роутере, результат тот-же: при подключении через провайдерское pppoe подключение соединение ppptp поднимается, при подключении через wireguard - нет, т.к. на ppptp сервер не приходят gre пакеты.
Лог подключения через wireguard выглядит так:

Скрытый текст
Апр 4 23:14:48 ndm
Network::Interface::PppTunnel: "PPTP0": interface state is changed, reconnecting.
Апр 4 23:14:48 ndm
Network::Interface::EndpointTracker: "PPTP0": remote endpoint is "95.xxx.xxx.xxx".
Апр 4 23:14:48 ndm
Network::Interface::EndpointTracker: "PPTP0": connecting via "Wireguard3" (Wireguard3).
Апр 4 23:14:48 ndm
Network::Interface::EndpointTracker: "PPTP0": local endpoint is "172.16.0.2".
Апр 4 23:14:48 ndm
Network::Interface::EndpointTracker: "PPTP0": added a host route to 95.xxx.xxx.xxx via Wireguard3 (Wireguard3).
Апр 4 23:14:48 ndm
Network::Interface::Ppp: "PPTP0": enabled connection via Wireguard3 interface.
Апр 4 23:14:50 pptp[15737]
Plugin pptp.so loaded.
Апр 4 23:14:50 pptp[15737]
PPTP plugin version 0.8.3 compiled against pppd 2.4.4-4
Апр 4 23:14:50 pptp[15737]
pppd 2.4.4-4 started by root, uid 0
Апр 4 23:14:51 ndm
Network::Interface::EndpointTracker: "PPTP0": added a host route to 95.xxx.xxx.xxx via Wireguard3 (Wireguard3).
Апр 4 23:14:51 pppd_PPTP0
IP: 95.xxx.xxx.xxx
Апр 4 23:14:51 pppd_PPTP0
local bind: 172.16.0.2
Апр 4 23:14:51 pppd_PPTP0
control connection
Апр 4 23:14:51 pppd_PPTP0
unix_sock
Апр 4 23:14:51 pppd_PPTP0
enable echo requests (30:3)
Апр 4 23:14:51 pppd_PPTP0
Sent control packet type is 1 'Start-Control-Connection-Request'
Апр 4 23:14:51 pppd_PPTP0
Received Start Control Connection Reply
Апр 4 23:14:51 pppd_PPTP0
Client connection established.
Апр 4 23:14:52 pppd_PPTP0
Sent control packet type is 7 'Outgoing-Call-Request'
Апр 4 23:14:52 ndm
Core::System::StartupConfig: configuration saved.
Апр 4 23:14:52 pppd_PPTP0
Received Outgoing Call Reply.
Апр 4 23:14:52 pppd_PPTP0
Outgoing call established (call ID 528, peer's call ID 837).
Апр 4 23:14:52 pppd_PPTP0
Using interface ppp1
Апр 4 23:14:52 pppd_PPTP0
Connect: ppp1 <--> pptp (95.xxx.xxx.xxx)

Апр 4 23:15:22 pppd_PPTP0
LCP: timeout sending Config-Requests
Апр 4 23:15:22 pppd_PPTP0
Connection terminated.
Апр 4 23:15:22 pppd_PPTP0
write: Bad file descriptor (9)
Апр 4 23:15:22 pppd_PPTP0
Closing connection (unhandled)
Апр 4 23:15:22 pppd_PPTP0
Sent control packet type is 12 'Call-Clear-Request'
Апр 4 23:15:22 pppd_PPTP0
Closing connection (call state)
Апр 4 23:15:22 pppd_PPTP0
Modem hangup
Апр 4 23:15:22 pppd_PPTP0
write: Bad file descriptor (9)
Апр 4 23:15:22 pppd_PPTP0
Exit.
Апр 4 23:15:22 ndm
Service: "PPTP0": unexpectedly stopped.

 

95.xxx.xxx.xxx - адрес PPPTP сервера
172.16.0.2 - адрес интерфейса Wireguard на кинетике

Захват пакетов во время попытки подключения выглядит так:

Скрытый текст
~ # tcpdump -i nwg4 host 95.xxx.xxx.xxx -n
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on nwg4, link-type RAW (Raw IP), snapshot length 262144 bytes
15:25:13.527084 IP 10.7.0.3.58141 > 95.xxx.xxx.xxx.1723: Flags [S], seq 2207739571, win 25680, options [mss 1284,sackOK,TS val 13133559 ecr 0,nop,wscale 6], length 0
15:25:13.612512 IP 95.xxx.xxx.xxx.1723 > 10.7.0.3.58141: Flags [S.], seq 2022080516, ack 2207739572, win 14480, options [mss 1460,sackOK,TS val 1293634611 ecr 13133559,nop,wscale 6], length 0
15:25:13.612622 IP 10.7.0.3.58141 > 95.xxx.xxx.xxx.1723: Flags [.], ack 1, win 402, options [nop,nop,TS val 13133580 ecr 1293634611], length 0
15:25:13.613411 IP 10.7.0.3.58141 > 95.xxx.xxx.xxx.1723: Flags [P.], seq 1:157, ack 1, win 402, options [nop,nop,TS val 13133580 ecr 1293634611], length 156: pptp CTRL_MSGTYPE=SCCRQ PROTO_VER(1.0) FRAME_CAP(AS) BEARER_CAP(DA) MAX_CHAN(65535) FIRM_REV(1) HOSTNAME(local) VENDOR(cananian)
15:25:13.698906 IP 95.xxx.xxx.xxx.1723 > 10.7.0.3.58141: Flags [.], ack 157, win 243, options [nop,nop,TS val 1293634620 ecr 13133580], length 0
15:25:13.703365 IP 95.xxx.xxx.xxx.1723 > 10.7.0.3.58141: Flags [P.], seq 1:157, ack 157, win 243, options [nop,nop,TS val 1293634621 ecr 13133580], length 156: pptp CTRL_MSGTYPE=SCCRP PROTO_VER(1.0) RESULT_CODE(1) ERR_CODE(0) FRAME_CAP() BEARER_CAP() MAX_CHAN(1) FIRM_REV(1) HOSTNAME(local) VENDOR(linux)
15:25:13.703443 IP 10.7.0.3.58141 > 95.xxx.xxx.xxx.1723: Flags [.], ack 157, win 418, options [nop,nop,TS val 13133603 ecr 1293634621], length 0
15:25:14.613619 IP 10.7.0.3.58141 > 95.xxx.xxx.xxx.1723: Flags [P.], seq 157:325, ack 157, win 418, options [nop,nop,TS val 13133830 ecr 1293634621], length 168: pptp CTRL_MSGTYPE=OCRQ CALL_ID(87) CALL_SER_NUM(0) MIN_BPS(2400) MAX_BPS(1000000000) BEARER_TYPE(Any) FRAME_TYPE(E) RECV_WIN(50) PROC_DELAY(0) PHONE_NO_LEN(0) PHONE_NO() SUB_ADDR()
15:25:14.698780 IP 95.xxx.xxx.xxx.1723 > 10.7.0.3.58141: Flags [P.], seq 157:189, ack 325, win 260, options [nop,nop,TS val 1293634720 ecr 13133830], length 32: pptp CTRL_MSGTYPE=OCRP CALL_ID(926) PEER_CALL_ID(87) RESULT_CODE(1) ERR_CODE(0) CAUSE_CODE(0) CONN_SPEED(1000000000) RECV_WIN(50) PROC_DELAY(0) PHY_CHAN_ID(0)
15:25:14.698906 IP 10.7.0.3.58141 > 95.xxx.xxx.xxx.1723: Flags [.], ack 189, win 418, options [nop,nop,TS val 13133852 ecr 1293634720], length 0
15:25:14.699820 IP 10.7.0.3 > 95.xxx.xxx.xxx: GREv1, call 926, seq 1, length 32: LCP, Conf-Request (0x01), id 1, length 18
15:25:17.700975 IP 10.7.0.3 > 95.xxx.xxx.xxx: GREv1, call 926, seq 2, length 32: LCP, Conf-Request (0x01), id 1, length 18
15:25:20.701981 IP 10.7.0.3 > 95.xxx.xxx.xxx: GREv1, call 926, seq 3, length 32: LCP, Conf-Request (0x01), id 1, length 18
15:25:23.703139 IP 10.7.0.3 > 95.xxx.xxx.xxx: GREv1, call 926, seq 4, length 32: LCP, Conf-Request (0x01), id 1, length 18
15:25:26.703369 IP 10.7.0.3 > 95.xxx.xxx.xxx: GREv1, call 926, seq 5, length 32: LCP, Conf-Request (0x01), id 1, length 18
15:25:29.704518 IP 10.7.0.3 > 95.xxx.xxx.xxx: GREv1, call 926, seq 6, length 32: LCP, Conf-Request (0x01), id 1, length 18
15:25:32.705658 IP 10.7.0.3 > 95.xxx.xxx.xxx: GREv1, call 926, seq 7, length 32: LCP, Conf-Request (0x01), id 1, length 18
15:25:35.706248 IP 10.7.0.3 > 95.xxx.xxx.xxx: GREv1, call 926, seq 8, length 32: LCP, Conf-Request (0x01), id 1, length 18
15:25:38.707388 IP 10.7.0.3 > 95.xxx.xxx.xxx: GREv1, call 926, seq 9, length 32: LCP, Conf-Request (0x01), id 1, length 18

 

Здесь подключение через другой интерфейс Wireguard, с адресом 10.7.0.3, но результат тот же.


Как я понимаю, причина в том, что протокол GRE не может пройти через NAT. Но решить эту проблему пока не удалось.
Буду благодарен за советы.

Link to comment
Share on other sites

Posted (edited)
В 08.04.2024 в 16:17, Le ecureuil сказал:

K PPTP подключается клиент из локалки, или тот же самый кинетик?

Тот же самый кинетик.
Ещё момент, если PPTP серверу присвоить адрес из подсети Wireguard интерфейса кинетика (например, интерфейс Wireguard 10.0.0.1, а PPTP сервер 10.0.0.2), то PPTP соединение устанавливается. Я так понимаю, устанавливается оно из-за отсутствия NAT на пути протокола GRE.

Edited by Albram
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
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.

  • Recently Browsing   0 members

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