demonnico / autoddvpn

Automatically exported from code.google.com/p/autoddvpn
1 stars 0 forks source link

关于自动重连 #50

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
請描述一下您進行怎樣的操作之後碰到了問題
1.使用
2.vpn在log中掉線
3.沒有重新連接

你期待是怎樣的結果,然而卻出現了什麼情形?

出現 vpndown.sh start
出現 vpndown.sh end

之後的重新連接,期待重新連接,但是完全沒反應了。
在route的web界面手動運行run.sh
但是只運行到
Let's wart for VPN being connected. 就卡住不動了

重啓route 竟然就連上了

請提供以下資訊:

1. 您的路由器型號:
2. DD-WRT版本:SVN revision 16214
3. 您的作業系統:Mac OS
4. 您的瀏覽器版本:safar 5
5. autoddvpn的連線模式(pptp+wget, pptp+jffs, openvpn+jffs等):pptp+jffs
6. autoddvpn的運行模式,傳統模式(classicMode)還是優雅模式(g
raceMode): classicMode
7. DD-WRT WAN口連線模式是 pptp or dhcp or static :pptp
8. 運行autoddvpn之後DD-WRT 的命令輸出 # route -n  | tail -n 20 :
(以上1-8點必填,否則可能沒辦法即時協助你解決問題)
重啓後還沒vpndown.sh 等重現補上這裡。

如果方便的話,請參考這裡的說明,貼上autoddvpn.log內容
(說明:http://code.google.com/p/autoddvpn/wiki/DEBUG)

最後如果可能的話,請附上截屏或任何可能有幫助的夾檔

我用的就是 puff1984 的vpn,作者在twitter上不是說那个好嗎?

不知道是vpn還是autoddvpn 的問題

Original issue reported on code.google.com by jno...@gmail.com on 24 Feb 2011 at 4:06

GoogleCodeExporter commented 9 years ago
你VPN主機是填寫hostname還是IP?

Original comment by pahud...@gmail.com on 24 Feb 2011 at 5:23

GoogleCodeExporter commented 9 years ago
ip

Original comment by jno...@gmail.com on 24 Feb 2011 at 5:29

GoogleCodeExporter commented 9 years ago
暫時看不大出問題,不過我看到你的DDWRT版本是 SVN revision 
16214
建議試試看15xxx版本 or 14xxx版本試試看

Original comment by pahud...@gmail.com on 24 Feb 2011 at 6:18

GoogleCodeExporter commented 9 years ago
我想知道autoddvpn是掉線重連,無限嘗試
還是嘗試n次後就不再重連了

今天的log

root@DD-WRT:~# tail -f /tmp/autoddvpn.log
[INFO#16857] 25/Feb/2011:15:52:45 make 74.82.1.20 gw 125.37.112.1
[INFO#16857] 25/Feb/2011:15:52:45 delete default gw 125.37.112.1
[INFO#16857] 25/Feb/2011:15:52:45 add default gw 172.23.1.1
[INFO#16857] 25/Feb/2011:15:52:45 adding the static routes, this may take a 
while.
[INFO#16857] 25/Feb/2011:15:53:04 preparing the exceptional routes
[INFO#16857] 25/Feb/2011:15:53:04 exceptional routes disabled.
[INFO#16857] 25/Feb/2011:15:53:04 exceptional routes features detail:  
http://goo.gl/fYfJ
[INFO#16857] 25/Feb/2011:15:53:04 vpnup.sh ended
[INFO#18415] 25/Feb/2011:16:26:12 vpndown.sh started
[INFO#18415] 25/Feb/2011:16:26:29 vpndown.sh ended

root@DD-WRT:~# route -n  | tail -n 20
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
74.82.1.20      125.37.112.1    255.255.255.255 UGH   0      0        0 ppp0
125.37.112.1    0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
125.37.112.1    0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 br0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         125.37.112.1    0.0.0.0         UG    0      0        0 ppp0

[run /jffs/pptp/run.sh at route web interface ]

root@DD-WRT:~# tail -f /tmp/autoddvpn.log
[INFO#16857] 25/Feb/2011:15:53:04 vpnup.sh ended
[INFO#18415] 25/Feb/2011:16:26:12 vpndown.sh started
[INFO#18415] 25/Feb/2011:16:26:29 vpndown.sh ended
[INFO#19912] 25/Feb/2011:16:30:05 log starts
[INFO#19912] 25/Feb/2011:16:30:05 pptp+jffs mode
[INFO#19912] 25/Feb/2011:16:30:05 modifying /tmp/pptpd_client/ip-up
[INFO#19912] 25/Feb/2011:16:30:06 /tmp/pptpd_client/ip-up modified
[INFO#19912] 25/Feb/2011:16:30:06 modifying /tmp/pptpd_client/ip-down
[INFO#19912] 25/Feb/2011:16:30:06 /tmp/pptpd_client/ip-down modified
[INFO#19912] 25/Feb/2011:16:30:06 ALL DONE. Let's wait for VPN being connected.

root@DD-WRT:~# route -n  | tail -n 20
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
74.82.1.20      125.37.112.1    255.255.255.255 UGH   0      0        0 ppp0
125.37.112.1    0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
125.37.112.1    0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 br0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         125.37.112.1    0.0.0.0         UG    0      0        0 ppp0
root@DD-WRT:~# 

然後就卡在
[INFO#19912] 25/Feb/2011:16:30:06 ALL DONE. Let's wait for VPN being connected.

這句了

reboot route就又連上了

Original comment by jno...@gmail.com on 25 Feb 2011 at 8:35

GoogleCodeExporter commented 9 years ago
DDWRT的PPTP client是自己會retry 
connect的,但是PPTP這個協議在DDWRT裡面我觀察比較容易不穩。

當你看到
ALL DONE. Let's wait for VPN being connected.
表示autoddvpn已經准備就緒,一旦pptp連上,取得ppp1這個device的
IP的時候,就會自動觸發vpnup.sh

但一旦VPN斷線,例如網路不穩等情況發生時,ppp1失去了IP,  
則就會觸發vpndown.sh

下次再自動播上,又會vpnup.sh ...

推究你的原因有可能是:
1. 你所在的網路環境跟PPTP VPN server之間網路不穩定
2. DDWRT自帶的PPTP client不穩定
3. DDWRT路由器不穩定

都有可能。

Original comment by pahud...@gmail.com on 25 Feb 2011 at 9:49

GoogleCodeExporter commented 9 years ago
issue #34 和 #50 
都属于我在使用pptp+jffs时候出现的问题,换成openvpn就没有出�
��了。如果没有其它人回报这个问题,建议close

Original comment by jno...@gmail.com on 20 Mar 2011 at 1:38

GoogleCodeExporter commented 9 years ago
/tmp$ cat autoddvpn.log
[INFO#1217] 01/Jan/1970:00:00:23 log starts
[INFO#1217] 01/Jan/1970:00:00:23 getting vpnup.sh
[INFO#1252] 01/Jan/1970:00:00:24 log starts
[INFO#1252] 01/Jan/1970:00:00:24 getting vpnup.sh
[INFO#1252] 01/Jan/1970:00:00:24 getting vpndown.sh
[INFO#1217] 01/Jan/1970:00:00:24 getting vpndown.sh
[INFO#1217] 01/Jan/1970:00:00:25 modifying /tmp/pptpd_client/ip-up
[INFO#1217] 01/Jan/1970:00:00:25 /tmp/pptpd_client/ip-up not exists, sleep 
10sec.
[INFO#1252] 01/Jan/1970:00:00:25 modifying /tmp/pptpd_client/ip-up
[INFO#1252] 01/Jan/1970:00:00:25 /tmp/pptpd_client/ip-up not exists, sleep 
10sec.
[INFO#1217] 01/Jan/1970:00:00:35 /tmp/pptpd_client/ip-up not exists, sleep 
10sec.
[INFO#1252] 01/Jan/1970:00:00:35 /tmp/pptpd_client/ip-up not exists, sleep 
10sec.
[INFO#1217] 01/Jan/1970:00:00:45 /tmp/pptpd_client/ip-up not exists, sleep 
10sec.
[INFO#1252] 01/Jan/1970:00:00:46 /tmp/pptpd_client/ip-up not exists, sleep 
10sec.
[INFO#1217] 01/Jan/1970:00:00:55 /tmp/pptpd_client/ip-up modified
[INFO#1217] 01/Jan/1970:00:00:55 modifying /tmp/pptpd_client/ip-down
[INFO#1217] 01/Jan/1970:00:00:55 /tmp/pptpd_client/ip-down modified
[INFO#1217] 01/Jan/1970:00:00:55 ALL DONE. Let's wait for VPN being connected.
[INFO#1252] 01/Jan/1970:00:00:56 /tmp/pptpd_client/ip-up modified
[INFO#1252] 01/Jan/1970:00:00:56 modifying /tmp/pptpd_client/ip-down
[INFO#1252] 01/Jan/1970:00:00:56 /tmp/pptpd_client/ip-down modified
[INFO#1252] 01/Jan/1970:00:00:56 ALL DONE. Let's wait for VPN being connected.
[INFO#1552] 14/Jul/2012:18:55:11 log starts
[INFO#1552] 14/Jul/2012:18:55:11 getting vpnup.sh
[INFO#1552] 14/Jul/2012:18:55:11 getting vpndown.sh
[INFO#1552] 14/Jul/2012:18:55:11 modifying /tmp/pptpd_client/ip-up
[INFO#1552] 14/Jul/2012:18:55:11 /tmp/pptpd_client/ip-up modified
[INFO#1552] 14/Jul/2012:18:55:11 modifying /tmp/pptpd_client/ip-down
[INFO#1552] 14/Jul/2012:18:55:12 /tmp/pptpd_client/ip-down modified
[INFO#1552] 14/Jul/2012:18:55:12 ALL DONE. Let's wait for VPN being connected.
[INFO#1698] 14/Jul/2012:18:55:16 log starts
[INFO#1698] 14/Jul/2012:18:55:16 getting vpnup.sh
[INFO#1698] 14/Jul/2012:18:55:16 getting vpndown.sh
[INFO#1698] 14/Jul/2012:18:55:16 modifying /tmp/pptpd_client/ip-up
[INFO#1698] 14/Jul/2012:18:55:16 /tmp/pptpd_client/ip-up modified
[INFO#1698] 14/Jul/2012:18:55:16 modifying /tmp/pptpd_client/ip-down
[INFO#1698] 14/Jul/2012:18:55:16 /tmp/pptpd_client/ip-down modified
[INFO#1698] 14/Jul/2012:18:55:17 ALL DONE. Let's wait for VPN being connected.
我总是停在这里,不知道什么原因

Original comment by hejun2002ca@gmail.com on 14 Jul 2012 at 11:00

GoogleCodeExporter commented 9 years ago
WAN口是动态IP

Original comment by hejun2002ca@gmail.com on 14 Jul 2012 at 11:02