我在 /etc/network/interfaces 中配置了 PPTP vpn,方式如下:
auto tunnel
iface tunnel inet ppp
provider server1
链接在启动时或我发出时正确断开ifup tunnel
,但当它失败时它不会自动重新启动,我需要手动启动它!这是我在日志中发现的内容:
pppd[857]: No response to 4 echo-requests
pppd[857]: Serial link appears to be disconnected.
pppd[857]: Connect time 1742.1 minutes.
pppd[857]: Sent 82272 bytes, received 17223 bytes.
pppd[857]: MPPE disabled
pppd[857]: Connection terminated.
pppd[857]: Modem hangup
pptp[833]: anon warn[decaps_hdlc:pptp_gre.c:204]: short read (-1): Input/output error
pptp[833]: anon warn[decaps_hdlc:pptp_gre.c:216]: pppd may have shutdown, see pppd log
pptp[842]: anon log[callmgr_main:pptp_callmgr.c:234]: Closing connection (unhandled)
pptp[842]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 12 'Call-Clear-Request'
pptp[842]: anon log[call_callback:pptp_callmgr.c:79]: Closing connection (call state)
pppd[857]: Exit.
我是否缺少一个可以让它自动重新连接的选项,或者它只是没有实现,而我必须通过 cron 检查 VPN 状态?
答案1
我在对等配置文件中缺少“persist”选项。添加它解决了我的问题