先到www.changeip.com注册个动态域名.
然后到邮箱激活.
然后到 Winbox-system-Scheduler-添加:Name:随便 Interval:多少时间检测一次IP我设为00:20:00
在 On Event: 里写入下面的
=============================================================
:log info "DDNS: Begin"
:global ddns-user "用户名"
:global ddns-pass "密码"
:global ddns-host "*1"
:global ddns-interface "外线接入名(如adsl1)"
: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"
:global ddns-interface [ /interface find type=pppoe-out ]"pppoe-out 的名字"
:global ddns-ip [ /ip address get [/ip address find interface=$ddns-interface] address ]
/tool dns-update name=*1 address=[:pick $ddns-ip 0 [:find $ddns-ip "/"] ] key-name=用户名 key=密码
在做一个NETWATCH
让他每次自动进行修正IP地址,若你的网关不通,可以用DNS