找回密码
 注册

QQ登录

只需一步,快速开始

搜索
楼主: cdmke

[脚本] 发一个自写的动态VPN更新脚本(处理服务器是动态IP更新)

  [复制链接]
发表于 2014-11-8 02:14:33 | 显示全部楼层
:local domain "bbs.routerclub.com";  #域名
:local interfaces "pptp-out1";  #接口
:local NewIP [:resolve $domain ];  #解析新的IP
:local pptpIP [/interface pptp-client get [find name=$interfaces] connect-to ]; #获取拔号PPTP IP
if ($NewIP!=$pptpIP) do={/interface pptp-client set name="pptp-out1" connect-to=$NewIP;:log info "IP address changed!" };


注释都去掉就可了。
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-5-18 05:17 , Processed in 0.131076 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表