system - scheduler - name随便写 - interval 00:30:00
on event 如下
:log info "DDNS: Begin"
:global ddns-user "用户名"
:global ddns-pass "密码"
:global ddns-host "*1"
:global ddns-interface "ADSL"(默认的名字是PPPOE OUT后改的ADSL)
:global ddns-ip [ /ip address get [/ip address find interface=$ddns-interface] address ]
:if ([ :typeof $ddns-lastip ] = nil ) do={ :global ddns-lastip 0.0.0.0/0 }
:if ([ :typeof $ddns-ip ] = nil ) do={
:log info ("DDNS: No ip address present on " . $ddns-interface . ", please check.")
} else={
:if ($ddns-ip != $ddns-lastip) do={
:log info "DDNS: Sending UPDATE!"
:log info [ /tool dns-update name=$ddns-host address=[:pick $ddns-ip 0 [:find $ddns-ip "/"] ] key-name=$ddns-user key=$ddns-pass ]
:global ddns-lastip $ddns-ip
} else={
:log info "DDNS: No change"
}
}
:log info "DDNS: End"
在终端可以填写,也可以脚本运行。
域名转向,要通过ipdns设置!用使用dns缓存来实现转向!但要求客户端的dns设置为路由器的网关![admin@office]
/ip
dns
static>
prinFlags:
D
-
dynamic,
X
-
disabled,
R
-
regexp
#
NAME
ADDRESS
TTL
0
www.163.com
12.200.13.254
1d
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)