LINUX.ORG.RU

Проблема: VPN не держит соединение


0

0

Прошу помощи в диагностике и решении появившейся проблемы с VPN. До недавнего времени всё работало как часы, но потом появились проблемы. Причина мне непонятна, так как настройки соединения я не менял.

У провайдера VPN, запущенный на Windows. Имеем домашний компьютер: Linux debian 2.6.8-2-386 #1 Thu May 19 17:40:50 JST 2005 i686 GNU/Linux

поднят pppd с опциями

name xxxxx

remotename PPTP

+chap

debug

#mtu 1372

#mru 1500

persist

#maxfail 0

lcp-echo-interval 60

lcp-echo-failure 4

defaultroute

pty "pptp 10.255.255.xx --nolaunchpppd"

#require-mppe-128

file /etc/ppp/options.pptp

ipparam provider

Нормально устанавливается соединение, прописывается маршрут в таблицу

eth1 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx inet addr:10.221.2.xx Bcast:10.221.3.255 Mask:255.255.254.0 inet6 addr: fe80::204:76ff:fea2:b09/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2321377 errors:0 dropped:0 overruns:1 frame:0 TX packets:1659703 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:161329236 (153.8 MiB) TX bytes:100069352 (95.4 MiB) Interrupt:201 Base address:0xd000

ppp0 Link encap:Point-to-Point Protocol inet addr:10.255.21.xxx P-t-P:10.255.254.xx Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:4 errors:0 dropped:0 overruns:0 frame:0 TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:157 (157.0 b) TX bytes:88 (88.0 b)

Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 10.255.255.xx 10.221.2.254 255.255.255.255 UGH 0 0 0 eth1 10.255.254.xx * 255.255.255.255 UH 0 0 0 ppp0 10.221.2.0 * 255.255.254.0 U 0 0 0 eth1 default 10.255.254.xx 0.0.0.0 UG 0 0 0 ppp0

Спустя 3-4 мин соединение падает, потом устанавливается вновь. В syslog имеем такие вот сообщения:

Feb 16 18:55:12 localhost pppd[4216]: sent [LCP EchoRep id=0x21 magic=0xf58da95e f5 8d a9 5e] Feb 16 18:55:22 localhost pppd[4216]: rcvd [LCP EchoReq id=0x22 magic=0x9bf8dda4 f5 8d a9 5e] Feb 16 18:55:22 localhost pppd[4216]: sent [LCP EchoRep id=0x22 magic=0xf58da95e f5 8d a9 5e] Feb 16 18:55:32 localhost pptp[6769]: anon log[ctrlp_disp:pptp_ctrl.c:912]: Call disconnect notification received (call id 36185) Feb 16 18:55:32 localhost pptp[6769]: anon log[ctrlp_disp:pptp_ctrl.c:770]: Received Stop Control Connection Request. Feb 16 18:55:32 localhost pptp[6769]: anon log[ctrlp_rep:pptp_ctrl.c:243]: Sent control packet type is 4 'Stop-Control-Connection-Reply' Feb 16 18:55:32 localhost pptp[6769]: anon log[call_callback:pptp_callmgr.c:77]: Closing connection Feb 16 18:55:32 localhost pppd[4216]: Script pptp 10.255.255.21 --nolaunchpppd finished (pid 6763), status = 0x0 Feb 16 18:56:02 localhost pppd[4216]: sent [LCP EchoReq id=0x32 magic=0xf58da95e] Feb 16 18:57:02 localhost pppd[4216]: sent [LCP EchoReq id=0x33 magic=0xf58da95e] Feb 16 18:58:02 localhost pppd[4216]: sent [LCP EchoReq id=0x34 magic=0xf58da95e] Feb 16 18:59:02 localhost pppd[4216]: No response to 4 echo-requests Feb 16 18:59:02 localhost pppd[4216]: Serial link appears to be disconnected. Feb 16 18:59:02 localhost pppd[4216]: Connect time 53.0 minutes. Feb 16 18:59:02 localhost pppd[4216]: Sent 3670 bytes, received 2923 bytes. Feb 16 18:59:02 localhost pppd[4216]: Script /etc/ppp/ip-down started (pid 6849) Feb 16 18:59:02 localhost pppd[4216]: sent [LCP TermReq id=0x46 "Peer not responding"] Feb 16 18:59:02 localhost pppd[4216]: Script /etc/ppp/ip-down finished (pid 6849), status = 0x0 Feb 16 18:59:05 localhost pppd[4216]: sent [LCP TermReq id=0x47 "Peer not responding"] Feb 16 18:59:08 localhost pppd[4216]: Connection terminated. Feb 16 18:59:08 localhost pppd[4216]: tcflush failed: Input/output error Feb 16 18:59:08 localhost pppd[4216]: Modem hangup Feb 16 18:59:08 localhost pppd[4216]: using channel 33 Feb 16 18:59:08 localhost pppd[4216]: Using interface ppp0 Feb 16 18:59:08 localhost pppd[4216]: Connect: ppp0 <--> /dev/pts/35 Feb 16 18:59:08 localhost pptp[6868]: anon log[main:pptp.c:243]: The synchronous pptp option is NOT activated Feb 16 18:59:08 localhost pptp[6874]: anon log[ctrlp_rep:pptp_ctrl.c:243]: Sent control packet type is 1 'Start-Control-Connection-Request' Feb 16 18:59:08 localhost pptp[6874]: anon log[ctrlp_disp:pptp_ctrl.c:721]: Received Start Control Connection Reply Feb 16 18:59:08 localhost pptp[6874]: anon log[ctrlp_disp:pptp_ctrl.c:755]: Client connection established. Feb 16 18:59:09 localhost pppd[4216]: sent [LCP ConfReq id=0x48 <asyncmap 0x0> <magic 0xe80d9ed7> <pcomp> <accomp>] Feb 16 18:59:09 localhost pptp[6874]: anon log[ctrlp_rep:pptp_ctrl.c:243]: Sent control packet type is 7 'Outgoing-Call-Request' Feb 16 18:59:09 localhost pptp[6874]: anon log[ctrlp_disp:pptp_ctrl.c:841]: Received Outgoing Call Reply. Feb 16 18:59:09 localhost pptp[6874]: anon log[ctrlp_disp:pptp_ctrl.c:880]: Outgoing call established (call ID 0, peer's call ID 36254). Feb 16 18:59:11 localhost pppd[4216]: rcvd [LCP ConfReq id=0x1 <auth chap MD5> <magic 0x9c298aec>] Feb 16 18:59:11 localhost pppd[4216]: sent [LCP ConfAck id=0x1 <auth chap MD5> <magic 0x9c298aec>] Feb 16 18:59:12 localhost pppd[4216]: sent [LCP ConfReq id=0x48 <asyncmap 0x0> <magic 0xe80d9ed7> <pcomp> <accomp>] Feb 16 18:59:12 localhost pppd[4216]: rcvd [LCP ConfAck id=0x48 <asyncmap 0x0> <magic 0xe80d9ed7> <pcomp> <accomp>] Feb 16 18:59:12 localhost pppd[4216]: sent [LCP EchoReq id=0x0 magic=0xe80d9ed7] Feb 16 18:59:12 localhost pppd[4216]: rcvd [CHAP Challenge id=0x1 <cfcef3f5b1192ea9d71ca002cb8e3e08>, name = "Pu2851Unlim"] Feb 16 18:59:12 localhost pppd[4216]: sent [CHAP Response id=0x1 <e05285ec84b98f90cb2b34e114119d37>, name = "xxxxxx"] Feb 16 18:59:12 localhost pppd[4216]: rcvd [LCP EchoRep id=0x0 magic=0x9c298aec] Feb 16 18:59:12 localhost pppd[4216]: rcvd [CHAP Success id=0x1 ""] Feb 16 18:59:12 localhost pppd[4216]: CHAP authentication succeeded Feb 16 18:59:12 localhost pppd[4216]: sent [IPCP ConfReq id=0x2e <compress VJ 0f 01> <addr 10.255.21.xxx>] Feb 16 18:59:12 localhost pppd[4216]: rcvd [IPCP ConfReq id=0x1 <addr 10.255.254.21>] Feb 16 18:59:12 localhost pppd[4216]: sent [IPCP ConfAck id=0x1 <addr 10.255.254.21>] Feb 16 18:59:12 localhost pppd[4216]: rcvd [IPCP ConfRej id=0x2e <compress VJ 0f 01>] Feb 16 18:59:12 localhost pppd[4216]: sent [IPCP ConfReq id=0x2f <addr 10.255.21.195>] Feb 16 18:59:12 localhost pppd[4216]: rcvd [IPCP ConfAck id=0x2f <addr 10.255.21.195>] Feb 16 18:59:12 localhost pppd[4216]: local IP address 10.255.21.xxx Feb 16 18:59:12 localhost pppd[4216]: remote IP address 10.255.254.xx Feb 16 18:59:12 localhost pppd[4216]: Script /etc/ppp/ip-up started (pid 6881) Feb 16 18:59:12 localhost pppd[4216]: Script /etc/ppp/ip-up finished (pid 6881), status = 0x0 Feb 16 18:59:13 localhost pppd[4216]: rcvd [LCP EchoReq id=0x1 magic=0x9c298aec e8 0d 9e d7] Feb 16 18:59:13 localhost pppd[4216]: sent [LCP EchoRep id=0x1 magic=0xe80d9ed7 e8 0d 9e d7] Feb 16 18:59:23 localhost pppd[4216]: rcvd [LCP EchoReq id=0x2 magic=0x9c298aec e8 0d 9e d7] Feb 16 18:59:23 localhost pppd[4216]: sent [LCP EchoRep id=0x2 magic=0xe80d9ed7 e8 0d 9e d7]

В чём проблема? Помогите, пожалуйста, разобраться!


Прошу прощения за отсутствие форматирования, вот исправленный вариант:

Linux debian 2.6.8-2-386 #1 Thu May 19 17:40:50 JST 2005 i686 
GNU/Linux

поднят pppd с опциями

name xxxxx

remotename PPTP

+chap

debug

#mtu 1372

#mru 1500

persist

#maxfail 0

lcp-echo-interval 60

lcp-echo-failure 4

defaultroute

pty "pptp 10.255.255.xx --nolaunchpppd"

#require-mppe-128

file /etc/ppp/options.pptp

ipparam provider

Нормально устанавливается соединение, прописывается маршрут в таблицу

eth1      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
          inet addr:10.221.2.xx  Bcast:10.221.3.255
          Mask:255.255.254.0
          inet6 addr: fe80::204:76ff:fea2:b09/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2321377 errors:0 dropped:0 overruns:1 frame:0
          TX packets:1659703 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:161329236 (153.8 MiB)  TX bytes:100069352 (95.4 MiB)
          Interrupt:201 Base address:0xd000 

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:10.255.21.xxx  P-t-P:10.255.254.xx  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:157 (157.0 b)  TX bytes:88 (88.0 b)



Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.255.255.xx   10.221.2.254    255.255.255.255 UGH       0 0          0 eth1
10.255.254.xx   *               255.255.255.255 UH        0 0          0 ppp0
10.221.2.0      *               255.255.254.0   U         0 0          0 eth1
default         10.255.254.xx   0.0.0.0         UG        0 0          0 ppp0

Спустя 3-4 мин соединение падает, потом устанавливается вновь.
В syslog имеем такие вот сообщения:


Feb 16 18:55:12 localhost pppd[4216]: sent [LCP EchoRep id=0x21 magic=0xf58da95e f5 8d a9 5e]
Feb 16 18:55:22 localhost pppd[4216]: rcvd [LCP EchoReq id=0x22 magic=0x9bf8dda4 f5 8d a9 5e]
Feb 16 18:55:22 localhost pppd[4216]: sent [LCP EchoRep id=0x22 magic=0xf58da95e f5 8d a9 5e]
Feb 16 18:55:32 localhost pptp[6769]: anon log[ctrlp_disp:pptp_ctrl.c:912]: Call disconnect notification received (call id 36185)
Feb 16 18:55:32 localhost pptp[6769]: anon log[ctrlp_disp:pptp_ctrl.c:770]: Received Stop Control Connection Request.
Feb 16 18:55:32 localhost pptp[6769]: anon log[ctrlp_rep:pptp_ctrl.c:243]: Sent control packet type is 4 'Stop-Control-Connection-Reply' 
Feb 16 18:55:32 localhost pptp[6769]: anon log[call_callback:pptp_callmgr.c:77]: Closing connection
Feb 16 18:55:32 localhost pppd[4216]: Script pptp 10.255.255.21 --nolaunchpppd finished (pid 6763), status = 0x0
Feb 16 18:56:02 localhost pppd[4216]: sent [LCP EchoReq id=0x32 magic=0xf58da95e]
Feb 16 18:57:02 localhost pppd[4216]: sent [LCP EchoReq id=0x33 magic=0xf58da95e]
Feb 16 18:58:02 localhost pppd[4216]: sent [LCP EchoReq id=0x34 magic=0xf58da95e]
Feb 16 18:59:02 localhost pppd[4216]: No response to 4 echo-requests
Feb 16 18:59:02 localhost pppd[4216]: Serial link appears to be disconnected.
Feb 16 18:59:02 localhost pppd[4216]: Connect time 53.0 minutes.
Feb 16 18:59:02 localhost pppd[4216]: Sent 3670 bytes, received 2923 bytes.
Feb 16 18:59:02 localhost pppd[4216]: Script /etc/ppp/ip-down started (pid 6849)
Feb 16 18:59:02 localhost pppd[4216]: sent [LCP TermReq id=0x46 "Peer not responding"]
Feb 16 18:59:02 localhost pppd[4216]: Script /etc/ppp/ip-down finished (pid 6849), status = 0x0
Feb 16 18:59:05 localhost pppd[4216]: sent [LCP TermReq id=0x47 "Peer not responding"]
Feb 16 18:59:08 localhost pppd[4216]: Connection terminated.
Feb 16 18:59:08 localhost pppd[4216]: tcflush failed: Input/output error
Feb 16 18:59:08 localhost pppd[4216]: Modem hangup
Feb 16 18:59:08 localhost pppd[4216]: using channel 33
Feb 16 18:59:08 localhost pppd[4216]: Using interface ppp0
Feb 16 18:59:08 localhost pppd[4216]: Connect: ppp0 <--> /dev/pts/35
Feb 16 18:59:08 localhost pptp[6868]: anon log[main:pptp.c:243]: The synchronous pptp option is NOT activated 
Feb 16 18:59:08 localhost pptp[6874]: anon log[ctrlp_rep:pptp_ctrl.c:243]: Sent control packet type is 1 'Start-Control-Connection-Request' 
Feb 16 18:59:08 localhost pptp[6874]: anon log[ctrlp_disp:pptp_ctrl.c:721]: Received Start Control Connection Reply
Feb 16 18:59:08 localhost pptp[6874]: anon log[ctrlp_disp:pptp_ctrl.c:755]: Client connection established.
Feb 16 18:59:09 localhost pppd[4216]: sent [LCP ConfReq id=0x48 <asyncmap 0x0> <magic 0xe80d9ed7> <pcomp> <accomp>]
Feb 16 18:59:09 localhost pptp[6874]: anon log[ctrlp_rep:pptp_ctrl.c:243]: Sent control packet type is 7 'Outgoing-Call-Request' 
Feb 16 18:59:09 localhost pptp[6874]: anon log[ctrlp_disp:pptp_ctrl.c:841]: Received Outgoing Call Reply.
Feb 16 18:59:09 localhost pptp[6874]: anon log[ctrlp_disp:pptp_ctrl.c:880]: Outgoing call established (call ID 0, peer's call ID 36254). 
Feb 16 18:59:11 localhost pppd[4216]: rcvd [LCP ConfReq id=0x1 <auth chap MD5> <magic 0x9c298aec>]
Feb 16 18:59:11 localhost pppd[4216]: sent [LCP ConfAck id=0x1 <auth chap MD5> <magic 0x9c298aec>]
Feb 16 18:59:12 localhost pppd[4216]: sent [LCP ConfReq id=0x48 <asyncmap 0x0> <magic 0xe80d9ed7> <pcomp> <accomp>]
Feb 16 18:59:12 localhost pppd[4216]: rcvd [LCP ConfAck id=0x48 <asyncmap 0x0> <magic 0xe80d9ed7> <pcomp> <accomp>]
Feb 16 18:59:12 localhost pppd[4216]: sent [LCP EchoReq id=0x0 magic=0xe80d9ed7]
Feb 16 18:59:12 localhost pppd[4216]: rcvd [CHAP Challenge id=0x1 <cfcef3f5b1192ea9d71ca002cb8e3e08>, name = "Pu2851Unlim"]
Feb 16 18:59:12 localhost pppd[4216]: sent [CHAP Response id=0x1 <e05285ec84b98f90cb2b34e114119d37>, name = "xxxxxx"]
Feb 16 18:59:12 localhost pppd[4216]: rcvd [LCP EchoRep id=0x0 magic=0x9c298aec]
Feb 16 18:59:12 localhost pppd[4216]: rcvd [CHAP Success id=0x1 ""]
Feb 16 18:59:12 localhost pppd[4216]: CHAP authentication succeeded
Feb 16 18:59:12 localhost pppd[4216]: sent [IPCP ConfReq id=0x2e <compress VJ 0f 01> <addr 10.255.21.xxx>]
Feb 16 18:59:12 localhost pppd[4216]: rcvd [IPCP ConfReq id=0x1 <addr 10.255.254.21>]
Feb 16 18:59:12 localhost pppd[4216]: sent [IPCP ConfAck id=0x1 <addr 10.255.254.21>]
Feb 16 18:59:12 localhost pppd[4216]: rcvd [IPCP ConfRej id=0x2e <compress VJ 0f 01>]
Feb 16 18:59:12 localhost pppd[4216]: sent [IPCP ConfReq id=0x2f <addr 10.255.21.195>]
Feb 16 18:59:12 localhost pppd[4216]: rcvd [IPCP ConfAck id=0x2f <addr 10.255.21.195>]
Feb 16 18:59:12 localhost pppd[4216]: local  IP address 10.255.21.xxx
Feb 16 18:59:12 localhost pppd[4216]: remote IP address 10.255.254.xx
Feb 16 18:59:12 localhost pppd[4216]: Script /etc/ppp/ip-up started (pid 6881)
Feb 16 18:59:12 localhost pppd[4216]: Script /etc/ppp/ip-up finished (pid 6881), status = 0x0
Feb 16 18:59:13 localhost pppd[4216]: rcvd [LCP EchoReq id=0x1 magic=0x9c298aec e8 0d 9e d7]
Feb 16 18:59:13 localhost pppd[4216]: sent [LCP EchoRep id=0x1 magic=0xe80d9ed7 e8 0d 9e d7]
Feb 16 18:59:23 localhost pppd[4216]: rcvd [LCP EchoReq id=0x2 magic=0x9c298aec e8 0d 9e d7]
Feb 16 18:59:23 localhost pppd[4216]: sent [LCP EchoRep id=0x2 magic=0xe80d9ed7 e8 0d 9e d7]

В чём проблема? Помогите, пожалуйста, разобраться!

caelum
() автор топика

Try to use iface ppp+ when you are making tunnel (not IP).

I had this problem some days ago. I used a VPN connection under windows and wasn't able to use under linux. The ISP sysadmin explained to me that there is a bug in pppd and the decision is above menshioned (don't use the option defaultroute, after making connection add route - /sbin/route add default dev ppp0.

Sorry, I understand Russian but can't write in this language.

Good luck!

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