linode VPS, Ubuntu 10.04. 按照这个教程架设的VPN:
http://b.gkp.cc/2010/06/19/setup-ipsec-l2tp-on-centos-55/
到
『
之后就可以启动 l2tp 了,先用 debug 方式启动,有错误可以直接在 console 看到
xl2tpd -D
』
这一步时出问题了, 无法连接.
使用iPhone, 联通3G线路连接时手机提示:
通讯设备已中断了您的连接. 请重试连接. 如果问题继续存在, 请验证您的设置.
服务器端日志如下:
4 xl2tpd[8677]: control_finish: Peer requested tunnel 6 twice, ignoring second one.
5 xl2tpd[8677]: Connection established to 112.224.2.14, 57587. Local: 2475, Remote: 6 (ref=0/0). LNS session is 'default'
6 xl2tpd[8677]: start_pppd: I'm running:
7 xl2tpd[8677]: "/usr/sbin/pppd"
8 xl2tpd[8677]: "passive"
9 xl2tpd[8677]: "nodetach"
10 xl2tpd[8677]: "10.1.2.1:10.1.2.2"
11 xl2tpd[8677]: "refuse-pap"
12 xl2tpd[8677]: "refuse-chap"
13 xl2tpd[8677]: "auth"
14 xl2tpd[8677]: "debug"
15 xl2tpd[8677]: "file"
16 xl2tpd[8677]: "/etc/ppp/options.xl2tpd"
17 xl2tpd[8677]: "/dev/pts/1"
18 xl2tpd[8677]: Call established with 112.224.2.14, Local: 58053, Remote: 6675, Serial: 1
19 /usr/sbin/pppd: In file /etc/ppp/options.xl2tpd: unrecognized option 're-mschap-v2'
20 xl2tpd[8677]: child_handler : pppd exited for call 6675 with code 2
21 xl2tpd[8677]: call_close: Call 58053 to 112.224.2.14 disconnected
22 xl2tpd[8677]: write_packet: tty is not open yet.
23 xl2tpd[8677]: result_code_avp: result code out of range (768 58053 14). Ignoring.
24 xl2tpd[8677]: control_finish: Connection closed to 112.224.2.14, serial 1 ()
25 xl2tpd[8677]: Terminating pppd: sending TERM signal to pid 8685
26 xl2tpd[8677]: pppd 8685 successfully terminated
27 xl2tpd[8677]: result_code_avp: result code out of range (256 58053 14). Ignoring.
28 xl2tpd[8677]: control_finish: Peer tried to disconnect without specifying result code.
29 xl2tpd[8677]: get_call: can't find call 58053 in tunnel 2475
30 (ref=0/0)xl2tpd[8677]: check_control: Received out of order control packet on tunnel 6 (got 4, expected 6)
31 xl2tpd[8677]: get_call: can't find call 58053 in tunnel 2475
32 (ref=0/0)xl2tpd[8677]: check_control: Received out of order control packet on tunnel 6 (got 4, expected 6)
33 xl2tpd[8677]: get_call: can't find call 58053 in tunnel 2475
34 (ref=0/0)xl2tpd[8677]: check_control: Received out of order control packet on tunnel 6 (got 4, expected 6)
35 xl2tpd[8677]: get_call: can't find call 58053 in tunnel 2475
36 (ref=0/0)xl2tpd[8677]: check_control: Received out of order control packet on tunnel 6 (got 4, expected 6)
37 xl2tpd[8677]: get_call: can't find call 58053 in tunnel 2475
38 (ref=0/0)xl2tpd[8677]: check_control: Received out of order control packet on tunnel 6 (got 4, expected 6)
39 xl2tpd[8677]: get_call: can't find call 58053 in tunnel 2475
40 (ref=0/0)xl2tpd[8677]: check_control: Received out of order control packet on tunnel 6 (got 4, expected 6)
41 xl2tpd[8677]: get_call: can't find call 58053 in tunnel 2475
42 (ref=0/0)xl2tpd[8677]: check_control: Received out of order control packet on tunnel 6 (got 4, expected 6)
43 xl2tpd[8677]: get_call: can't find call 58053 in tunnel 2475
44 (ref=0/0)xl2tpd[8677]: check_control: Received out of order control packet on tunnel 6 (got 4, expected 6)
45 xl2tpd[8677]: Maximum retries exceeded for tunnel 2475. Closing.
46 xl2tpd[8677]: Connection 6 closed to 112.224.2.14, port 57587 (Timeout)
47 xl2tpd[8677]: Unable to deliver closing message for tunnel 2475. Destroying anyway.
又尝试使用电信线路连接, 同样无法连接, 日志如下:
xl2tpd[8677]: control_finish: Peer requested tunnel 7 twice, ignoring second one.
xl2tpd[8677]: check_control: Received out of order control packet on tunnel 7 (got 2, expected 1)
xl2tpd[8677]: handle_packet: bad control packet!
xl2tpd[8677]: Connection established to 218.23.115.121, 55546. Local: 27794, Remote: 7 (ref=0/0). LNS session is 'default'
xl2tpd[8677]: start_pppd: I'm running:
xl2tpd[8677]: "/usr/sbin/pppd"
xl2tpd[8677]: "passive"
xl2tpd[8677]: "nodetach"
xl2tpd[8677]: "10.1.2.1:10.1.2.2"
xl2tpd[8677]: "refuse-pap"
xl2tpd[8677]: "refuse-chap"
xl2tpd[8677]: "auth"
xl2tpd[8677]: "debug"
xl2tpd[8677]: "file"
xl2tpd[8677]: "/etc/ppp/options.xl2tpd"
xl2tpd[8677]: "/dev/pts/1"
xl2tpd[8677]: Call established with 218.23.115.121, Local: 56872, Remote: 42431, Serial: 1
/usr/sbin/pppd: In file /etc/ppp/options.xl2tpd: unrecognized option 're-mschap-v2'
xl2tpd[8677]: child_handler : pppd exited for call 42431 with code 2
xl2tpd[8677]: read_packet: Error 9 (Bad file descriptor)
xl2tpd[8677]: read_packet: Error 9 (Bad file descriptor)
xl2tpd[8677]: read_packet: Error 9 (Bad file descriptor)
xl2tpd[8677]: read_packet: Error 9 (Bad file descriptor)
xl2tpd[8677]: read_packet: Error 9 (Bad file descriptor)
xl2tpd[8677]: read_packet: Error 9 (Bad file descriptor)
xl2tpd[8677]: read_packet: Error 9 (Bad file descriptor)
xl2tpd[8677]: read_packet: Error 9 (Bad file descriptor)
xl2tpd[8677]: read_packet: Error 9 (Bad file descriptor)
xl2tpd[8677]: read_packet: Error 9 (Bad file descriptor)
xl2tpd[8677]: read_packet: Error 9 (Bad file descriptor)
xl2tpd[8677]: read_packet: Too many errors. Declaring call dead.
xl2tpd[8677]: network_thread: tossing read packet, error = Bad file descriptor (9). Closing call.
xl2tpd[8677]: call_close: Call 56872 to 218.23.115.121 disconnected
xl2tpd[8677]: write_packet: tty is not open yet.
xl2tpd[8677]: result_code_avp: result code out of range (768 27749 14). Ignoring.
xl2tpd[8677]: control_finish: Connection closed to 218.23.115.121, serial 1 (Bad file descriptor)
xl2tpd[8677]: Terminating pppd: sending TERM signal to pid 8705
xl2tpd[8677]: pppd 8705 successfully terminated
xl2tpd[8677]: result_code_avp: result code out of range (256 27749 14). Ignoring.
xl2tpd[8677]: control_finish: Peer tried to disconnect without specifying result code.
xl2tpd[8677]: get_call: can't find call 56872 in tunnel 27794
(ref=0/0)xl2tpd[8677]: check_control: Received out of order control packet on tunnel 7 (got 4, expected 6)
xl2tpd[8677]: get_call: can't find call 56872 in tunnel 27794
(ref=0/0)xl2tpd[8677]: check_control: Received out of order control packet on tunnel 7 (got 4, expected 6)
xl2tpd[8677]: get_call: can't find call 56872 in tunnel 27794
(ref=0/0)xl2tpd[8677]: check_control: Received out of order control packet on tunnel 7 (got 4, expected 6)
xl2tpd[8677]: get_call: can't find call 56872 in tunnel 27794
(ref=0/0)xl2tpd[8677]: check_control: Received out of order control packet on tunnel 7 (got 4, expected 6)
xl2tpd[8677]: get_call: can't find call 56872 in tunnel 27794
(ref=0/0)xl2tpd[8677]: check_control: Received out of order control packet on tunnel 7 (got 4, expected 6)
xl2tpd[8677]: get_call: can't find call 56872 in tunnel 27794
(ref=0/0)xl2tpd[8677]: check_control: Received out of order control packet on tunnel 7 (got 4, expected 6)
xl2tpd[8677]: get_call: can't find call 56872 in tunnel 27794
(ref=0/0)xl2tpd[8677]: check_control: Received out of order control packet on tunnel 7 (got 4, expected 6)
xl2tpd[8677]: get_call: can't find call 56872 in tunnel 27794
(ref=0/0)xl2tpd[8677]: check_control: Received out of order control packet on tunnel 7 (got 4, expected 6)
xl2tpd[8677]: Maximum retries exceeded for tunnel 27794. Closing.
xl2tpd[8677]: Connection 7 closed to 218.23.115.121, port 55546 (Timeout)
xl2tpd[8677]: Unable to deliver closing message for tunnel 27794. Destroying anyway.
这是什么原因呢?