LINUX.ORG.RU
решено ФорумAdmin

debian 8.1 pptp клиент

 , , ,


0

0

Доброго времени суток. Проблема с подключением к pptp серверу. Постоянно отваливается соединение. Что интересно после перезагрузки могу подсоединиться, но после обращения к какому либо ресурсу в локальной сети соединение падает и больше не поднимается. Соединение настраивал через виджет KDE NetworkManager. Выхлоп debian: /var/log/syslog

Jun 17 14:37:37 rav-ThinkPad-E555 NetworkManager[620]: <info> Starting VPN service 'pptp'...
Jun 17 14:37:37 rav-ThinkPad-E555 NetworkManager[620]: <info> VPN service 'pptp' started (org.freedesktop.NetworkManager.pptp), PID 2915
Jun 17 14:37:37 rav-ThinkPad-E555 NetworkManager[620]: <info> VPN service 'pptp' appeared; activating connections
Jun 17 14:37:37 rav-ThinkPad-E555 NetworkManager[620]: <info> VPN plugin state changed: starting (3)
Jun 17 14:37:37 rav-ThinkPad-E555 NetworkManager[620]: ** Message: pppd started with pid 2916
Jun 17 14:37:37 rav-ThinkPad-E555 NetworkManager[620]: <info> VPN connection 'home_vpn' (Connect) reply received.
Jun 17 14:37:37 rav-ThinkPad-E555 pppd[2916]: Plugin /usr/lib/pppd/2.4.6/nm-pptp-pppd-plugin.so loaded.
Jun 17 14:37:37 rav-ThinkPad-E555 NetworkManager[620]: Plugin /usr/lib/pppd/2.4.6/nm-pptp-pppd-plugin.so loaded.
Jun 17 14:37:37 rav-ThinkPad-E555 NetworkManager[620]: ** Message: nm-pptp-ppp-plugin: (plugin_init): initializing
Jun 17 14:37:37 rav-ThinkPad-E555 pppd[2916]: pppd 2.4.6 started by root, uid 0
Jun 17 14:37:37 rav-ThinkPad-E555 NetworkManager[620]: ** Message: nm-pptp-ppp-plugin: (nm_phasechange): status 3 / phase 'serial connection'
Jun 17 14:37:37 rav-ThinkPad-E555 pppd[2916]: Using interface ppp0
Jun 17 14:37:37 rav-ThinkPad-E555 pppd[2916]: Connect: ppp0 <--> /dev/pts/3
Jun 17 14:37:37 rav-ThinkPad-E555 NetworkManager[620]: Using interface ppp0
Jun 17 14:37:37 rav-ThinkPad-E555 NetworkManager[620]: Connect: ppp0 <--> /dev/pts/3
Jun 17 14:37:37 rav-ThinkPad-E555 NetworkManager[620]: ** Message: nm-pptp-ppp-plugin: (nm_phasechange): status 5 / phase 'establish'
Jun 17 14:37:37 rav-ThinkPad-E555 pptp[2921]: nm-pptp-service-2915 log[main:pptp.c:314]: The synchronous pptp option is NOT activated
Jun 17 14:37:37 rav-ThinkPad-E555 NetworkManager[620]: <info> (ppp0): new Generic device (driver: 'unknown' ifindex: 5)
Jun 17 14:37:37 rav-ThinkPad-E555 NetworkManager[620]: <info> (ppp0): exported as /org/freedesktop/NetworkManager/Devices/4
Jun 17 14:37:37 rav-ThinkPad-E555 NetworkManager[620]: <info> devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Jun 17 14:37:37 rav-ThinkPad-E555 NetworkManager[620]: <info> device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Jun 17 14:37:40 rav-ThinkPad-E555 NetworkManager[620]: nm-pptp-service-2915 warn[open_inetsock:pptp_callmgr.c:329]: connect: No route to host
Jun 17 14:37:40 rav-ThinkPad-E555 pptp[2923]: nm-pptp-service-2915 warn[open_inetsock:pptp_callmgr.c:329]: connect: No route to host
Jun 17 14:37:40 rav-ThinkPad-E555 pptp[2923]: nm-pptp-service-2915 fatal[callmgr_main:pptp_callmgr.c:127]: Could not open control connection to 95.79.xx.xxx
Jun 17 14:37:40 rav-ThinkPad-E555 pptp[2921]: nm-pptp-service-2915 fatal[open_callmgr:pptp.c:487]: Call manager exited with error 256
Jun 17 14:37:40 rav-ThinkPad-E555 pppd[2916]: Modem hangup
Jun 17 14:37:40 rav-ThinkPad-E555 pppd[2916]: Connection terminated.
Jun 17 14:37:40 rav-ThinkPad-E555 NetworkManager[620]: nm-pptp-service-2915 fatal[callmgr_main:pptp_callmgr.c:127]: Could not open control connection to 95.79.xx.xxx
Jun 17 14:37:40 rav-ThinkPad-E555 avahi-daemon[2457]: Withdrawing workstation service for ppp0.
Jun 17 14:37:40 rav-ThinkPad-E555 NetworkManager[620]: nm-pptp-service-2915 fatal[open_callmgr:pptp.c:487]: Call manager exited with error 256
Jun 17 14:37:40 rav-ThinkPad-E555 NetworkManager[620]: Modem hangup
Jun 17 14:37:40 rav-ThinkPad-E555 NetworkManager[620]: ** Message: nm-pptp-ppp-plugin: (nm_phasechange): status 11 / phase 'disconnect'
Jun 17 14:37:40 rav-ThinkPad-E555 NetworkManager[620]: Connection terminated.
Jun 17 14:37:40 rav-ThinkPad-E555 NetworkManager[620]: ** Message: nm-pptp-ppp-plugin: (nm_phasechange): status 1 / phase 'dead'
Jun 17 14:37:40 rav-ThinkPad-E555 pppd[2916]: Exit.
Jun 17 14:37:40 rav-ThinkPad-E555 NetworkManager[620]: ** Message: nm-pptp-ppp-plugin: (nm_exit_notify): cleaning up
Jun 17 14:37:40 rav-ThinkPad-E555 NetworkManager[620]: ** (nm-pptp-service:2915): WARNING **: pppd exited with error code 16
Jun 17 14:37:40 rav-ThinkPad-E555 NetworkManager[620]: <info> devices removed (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Jun 17 14:37:40 rav-ThinkPad-E555 NetworkManager[620]: <warn> VPN plugin failed: connect-failed (1)
Jun 17 14:37:40 rav-ThinkPad-E555 NetworkManager[620]: <warn> VPN plugin failed: connect-failed (1)
Jun 17 14:37:40 rav-ThinkPad-E555 NetworkManager[620]: <warn> VPN plugin failed: connect-failed (1)
Jun 17 14:37:40 rav-ThinkPad-E555 NetworkManager[620]: <info> VPN plugin state changed: stopped (6)
Jun 17 14:37:40 rav-ThinkPad-E555 NetworkManager[620]: <info> VPN plugin state change reason: unknown (0)
Jun 17 14:37:40 rav-ThinkPad-E555 NetworkManager[620]: <warn> error disconnecting VPN: Could not process the request because no VPN connection was active.

/var/messages

Jun 19 22:30:47 rav-ThinkPad-E555 pppd[2499]: Plugin /usr/lib/pppd/2.4.6/nm-pptp-pppd-plugin.so loaded.
Jun 19 22:30:47 rav-ThinkPad-E555 pppd[2499]: pppd 2.4.6 started by root, uid 0
Jun 19 22:30:47 rav-ThinkPad-E555 kernel: [  619.689582] PPP generic driver version 2.4.2
Jun 19 22:30:47 rav-ThinkPad-E555 pppd[2499]: Using interface ppp0
Jun 19 22:30:47 rav-ThinkPad-E555 pppd[2499]: Connect: ppp0 <--> /dev/pts/4
Jun 19 22:30:51 rav-ThinkPad-E555 pppd[2499]: CHAP authentication succeeded
Jun 19 22:30:51 rav-ThinkPad-E555 kernel: [  623.333796] PPP BSD Compression module registered
Jun 19 22:30:51 rav-ThinkPad-E555 kernel: [  623.336602] PPP Deflate Compression module registered
Jun 19 22:30:52 rav-ThinkPad-E555 pppd[2499]: CCP terminated by peer (No compression negotiated)
Jun 19 22:30:52 rav-ThinkPad-E555 pppd[2499]: Compression disabled by peer.
Jun 19 22:30:52 rav-ThinkPad-E555 pppd[2499]: local  IP address 192.168.255.1
Jun 19 22:30:52 rav-ThinkPad-E555 pppd[2499]: remote IP address 192.168.0.1
Jun 19 22:30:52 rav-ThinkPad-E555 pppd[2499]: primary   DNS address 192.168.0.1
Jun 19 22:30:52 rav-ThinkPad-E555 pppd[2499]: secondary DNS address 91.144.186.3
Jun 19 22:30:52 rav-ThinkPad-E555 pppd[2499]: Modem hangup
Jun 19 22:30:52 rav-ThinkPad-E555 pppd[2499]: Connect time 0.0 minutes.
Jun 19 22:30:52 rav-ThinkPad-E555 pppd[2499]: Sent 6790 bytes, received 0 bytes.
Jun 19 22:30:52 rav-ThinkPad-E555 pppd[2499]: Connection terminated.
Jun 19 22:30:52 rav-ThinkPad-E555 pppd[2499]: Terminating on signal 15
Jun 19 22:30:52 rav-ThinkPad-E555 pppd[2499]: Exit.

В качестве сервера выступает роутер mikrotik. Выхлоп mikrotik:

/interface pptp-server server print

enabled: yes
max-mtu: 1450
max-mru: 1450
mrru: disabled
authentication: mschap1,mschap2
keepalive-timeout: 30
default-profile: default-encryption

/ppp profile print detail

0 * name="default" remote-ipv6-prefix-pool=none use-ipv6=yes use-mpls=default use-compression=default use-vj-compression=default use-encryption=default only-one=default change-tcp-mss=yes address-list=""

1 * name="default-encryption" remote-ipv6-prefix-pool=none use-ipv6=yes use-mpls=default use-compression=default use-vj-compression=default use-encryption=yes only-one=default change-tcp-mss=yes address-list=""

P.S. С android и win подключаюсь нормально, соединение не рвется.


Ответ на: комментарий от torm7

«Аналогичный» — это «разрывается соединение с тем же самым логом» или «разрывается соединение, но сообщения в логе немного отличаются»?

redgremlin ★★★★★ ()
Ответ на: комментарий от redgremlin

mppe «Любое»:

Jul  6 13:36:49 rav-ThinkPad-E555 kernel: [ 4829.927912] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Jul  6 13:39:43 rav-ThinkPad-E555 pppd[7225]: Plugin /usr/lib/pppd/2.4.6/nm-pptp-pppd-plugin.so loaded.
Jul  6 13:39:43 rav-ThinkPad-E555 pppd[7225]: pppd 2.4.6 started by root, uid 0
Jul  6 13:39:43 rav-ThinkPad-E555 pppd[7225]: Using interface ppp0
Jul  6 13:39:43 rav-ThinkPad-E555 pppd[7225]: Connect: ppp0 <--> /dev/pts/3
Jul  6 13:39:47 rav-ThinkPad-E555 pppd[7225]: CHAP authentication succeeded
Jul  6 13:39:47 rav-ThinkPad-E555 pppd[7225]: MPPE 128-bit stateless compression enabled
Jul  6 13:39:48 rav-ThinkPad-E555 pppd[7225]: local  IP address 192.168.255.1
Jul  6 13:39:48 rav-ThinkPad-E555 pppd[7225]: remote IP address 192.168.0.1
Jul  6 13:39:48 rav-ThinkPad-E555 pppd[7225]: primary   DNS address 192.168.0.1
Jul  6 13:39:48 rav-ThinkPad-E555 pppd[7225]: secondary DNS address 91.144.186.3
Jul  6 13:40:33 rav-ThinkPad-E555 pppd[7225]: Modem hangup
Jul  6 13:40:33 rav-ThinkPad-E555 pppd[7225]: Connect time 0.8 minutes.
Jul  6 13:40:33 rav-ThinkPad-E555 pppd[7225]: Sent 49628 bytes, received 104331 bytes.
Jul  6 13:40:33 rav-ThinkPad-E555 pppd[7225]: Connection terminated.
Jul  6 13:40:33 rav-ThinkPad-E555 pppd[7225]: Exit.

mppe «128 бит»:

Jul  6 13:43:07 rav-ThinkPad-E555 pppd[7583]: Plugin /usr/lib/pppd/2.4.6/nm-pptp-pppd-plugin.so loaded.
Jul  6 13:43:07 rav-ThinkPad-E555 pppd[7583]: pppd 2.4.6 started by root, uid 0
Jul  6 13:43:07 rav-ThinkPad-E555 pppd[7583]: Using interface ppp0
Jul  6 13:43:07 rav-ThinkPad-E555 pppd[7583]: Connect: ppp0 <--> /dev/pts/3
Jul  6 13:43:11 rav-ThinkPad-E555 pppd[7583]: CHAP authentication succeeded
Jul  6 13:43:11 rav-ThinkPad-E555 pppd[7583]: MPPE 128-bit stateless compression enabled
Jul  6 13:43:12 rav-ThinkPad-E555 pppd[7583]: local  IP address 192.168.255.1
Jul  6 13:43:12 rav-ThinkPad-E555 pppd[7583]: remote IP address 192.168.0.1
Jul  6 13:43:12 rav-ThinkPad-E555 pppd[7583]: primary   DNS address 192.168.0.1
Jul  6 13:43:12 rav-ThinkPad-E555 pppd[7583]: secondary DNS address 91.144.186.3
Jul  6 13:43:53 rav-ThinkPad-E555 pppd[7583]: Modem hangup
Jul  6 13:43:53 rav-ThinkPad-E555 pppd[7583]: Connect time 0.7 minutes.
Jul  6 13:43:53 rav-ThinkPad-E555 pppd[7583]: Sent 26103 bytes, received 28005 bytes.
Jul  6 13:43:53 rav-ThinkPad-E555 pppd[7583]: Connection terminated.
Jul  6 13:43:53 rav-ThinkPad-E555 pppd[7583]: Terminating on signal 15
Jul  6 13:43:53 rav-ThinkPad-E555 pppd[7583]: Exit.

mppe «40 бит»:

Jul  6 13:45:56 rav-ThinkPad-E555 pppd[7906]: Plugin /usr/lib/pppd/2.4.6/nm-pptp-pppd-plugin.so loaded.
Jul  6 13:45:56 rav-ThinkPad-E555 pppd[7906]: pppd 2.4.6 started by root, uid 0
Jul  6 13:45:56 rav-ThinkPad-E555 pppd[7906]: Using interface ppp0
Jul  6 13:45:56 rav-ThinkPad-E555 pppd[7906]: Connect: ppp0 <--> /dev/pts/3
Jul  6 13:45:58 rav-ThinkPad-E555 pppd[7906]: CHAP authentication succeeded
Jul  6 13:45:58 rav-ThinkPad-E555 pppd[7906]: Connection terminated.
Jul  6 13:45:58 rav-ThinkPad-E555 pppd[7906]: Exit.

галка mppe не стоит:

Jul  6 13:47:20 rav-ThinkPad-E555 pppd[7964]: Plugin /usr/lib/pppd/2.4.6/nm-pptp-pppd-plugin.so loaded.
Jul  6 13:47:20 rav-ThinkPad-E555 pppd[7964]: pppd 2.4.6 started by root, uid 0
Jul  6 13:47:20 rav-ThinkPad-E555 pppd[7964]: Using interface ppp0
Jul  6 13:47:20 rav-ThinkPad-E555 pppd[7964]: Connect: ppp0 <--> /dev/pts/3
Jul  6 13:47:21 rav-ThinkPad-E555 pppd[7964]: CHAP authentication succeeded
Jul  6 13:47:21 rav-ThinkPad-E555 pppd[7964]: local  IP address 192.168.255.1
Jul  6 13:47:21 rav-ThinkPad-E555 pppd[7964]: remote IP address 192.168.0.1
Jul  6 13:47:21 rav-ThinkPad-E555 pppd[7964]: primary   DNS address 192.168.0.1
Jul  6 13:47:21 rav-ThinkPad-E555 pppd[7964]: secondary DNS address 91.144.186.3
Jul  6 13:47:21 rav-ThinkPad-E555 pppd[7964]: CCP terminated by peer (No compression negotiated)
Jul  6 13:47:21 rav-ThinkPad-E555 pppd[7964]: Compression disabled by peer.
Jul  6 13:47:42 rav-ThinkPad-E555 pppd[7964]: Modem hangup
Jul  6 13:47:42 rav-ThinkPad-E555 pppd[7964]: Connect time 0.4 minutes.
Jul  6 13:47:42 rav-ThinkPad-E555 pppd[7964]: Sent 31709 bytes, received 25519 bytes.
Jul  6 13:47:42 rav-ThinkPad-E555 pppd[7964]: Connection terminated.
Jul  6 13:47:42 rav-ThinkPad-E555 pppd[7964]: Exit.

torm7 ()

Вроде этот файл тоже как то участвует в процессе.

/etc/ppp/options.pptp:

# Lock the port
lock

# Authentication
# We don't need the tunnel server to authenticate itself
noauth

# We won't do PAP, EAP, CHAP, or MSCHAP, but we will accept MSCHAP-V2
# (you may need to remove these refusals if the server is not using MPPE)
refuse-pap
refuse-eap
refuse-chap
refuse-mschap

# Compression
# Turn off compression protocols we know won't be used
nobsdcomp
nodeflate

# Encryption
# (There have been multiple versions of PPP with encryption support,
# choose with of the following sections you will use.  Note that MPPE
# requires the use of MSCHAP-V2 during authentication)

# http://ppp.samba.org/ the PPP project version of PPP by Paul Mackarras
# ppp-2.4.2 or later with MPPE only, kernel module ppp_mppe.o
# {{{
# Require MPPE 128-bit encryption
#require-mppe-128
# }}}

# http://polbox.com/h/hs001/ fork from PPP project by Jan Dubiec
# ppp-2.4.2 or later with MPPE and MPPC, kernel module ppp_mppe_mppc.o
# {{{
# Require MPPE 128-bit encryption
#mppe required,stateless
# }}}

torm7 ()

Всем спасибо, разобрался. Ошибка была в неправильно выставленном MTU главного интерфейса(железного). Он в NM стоял в «Авто», после уменьшения всё заработало. Обнаружил в логах запись аля:

nm-pptp-service warn[decaps_gre:pptp_gre.c:331]: short read (-1): Message too long
А дальше по инструкции: http://droid-developer.blogspot.ru/2012/04/vpn.html

torm7 ()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.