routeros

局域网的routeros中设置花生壳

南笙酒味 提交于 2019-12-03 14:57:36
  routeros可以运行花生壳,但是在花生壳的官方脚本中,routeros是默认作为上网路由器的。   (花生壳官方文档: http://service.oray.com/question/869.html ) { local ipaddr local server "http://ddns.oray.com" local domain "域名" local par "/ph/update\?&hostname=$domain&myip=$ipaddr" local users "用户名" local paswd "密码" :set ipaddr [/ip address get [/ip address find interface=pppoe-out1] address] :set ipaddr [:pick $ipaddr 0 ([len $ipaddr] -3)] /tool fetch url=($server . $par) mode=http user=$users password=$paswd }   从第8行代码可以看出,该脚本是将pppoe-out1接口的IP当作公网IP,也就是说routeros必须是上网路由器,该脚本才能生效。   但是如果routeros是在局域网里面(例如routeros作为vpn服务器),外面还有一层路由器,那这个脚本就必须做修改