返回列表 發帖

renew public ip script查詢

我現在大陸會連vpn 到香港

但香港IP經常被封

想在香港ping 住連去大6 的vpn tunnel, 當vpn 一斷線香港就會自動轉release and renew IP

想問有沒有ching 有相關經驗or script
想做到自動化..
1.當vpn tunnel ping 不通時
2.香港router 先檢查自身ip
3. loop release and renewip 直至拿到新IP

我現在的做法是在newwatch monitor 大陸router 的ip 192.168.1.2 當down 時就RUN
/ ip dhcp-client release 0
/ ip dhcp-client release [find interface=ether1]

但有個問題, 以上script 只會行一次, 有時不能成功renew hk ip, 要手動按幾次先renew 到public ip

很簡單的要求,樓主的vpn site-to-site應該會使用到profile吧...
何需工作排程? 把renew public工作放到on- ...
gfx86674 發表於 2018-9-6 22:20


好像只會執行一次

但有時release 一次不會 get new public ip

TOP

返回列表