WIFIHELL - 科技改变生活

 找回密码
 注册WIFIHELL

QQ登录

只需一步,快速开始

开启左侧

MIKROTIK CHANGEIP DDNS

[复制链接]
222ba 发表于 2018-5-23 09:53:42 | 显示全部楼层 |阅读模式

注册WIFIHELL,浏览更多技术贴!

您需要 登录 才可以下载或查看,没有账号?注册WIFIHELL

x
  1. :local ddnsuser "CHANGEIP_USERNAME"
  2. :local ddnspass "CHANGEIP_PASSWORD"
  3. :local ddnshost "CHANGEIP_YOUR_DOMAIN_NAME"
  4. :local ddnsinterface "WAN_INTERFACE"
  5. :global ddnslastip
  6. :global ddnsip [ /ip address get [find interface=$ddnsinterface disabled=no] address ]
  7. :if ([ :typeof $ddnslastip ] = nil ) do={ :global ddnslastip 0.0.0.0/0 }

  8. :if ([ :typeof $ddnsip ] = nil ) do={
  9. :log info ("DDNS: No ip address present on " . $ddnsinterface . ", please check.") } else={
  10. :if ($ddnsip != $ddnslastip) do={
  11. :log info "DDNS: Sending UPDATE!"
  12. :log info [ /tool dns-update name=$ddnshost address=[:pick $ddnsip 0 [:find $ddnsip "/"] ] key-name=$ddnsuser key=$ddnspass ]
  13. :global ddnslastip $ddnsip } else={
  14. :log info "DDNS: No change" }
  15. }
复制代码


WIFIHELL | 万丰乐活 2020开启新的征程,好货不断!
关闭

站点推荐上一条 /1 下一条

万丰乐活

GMT+8, 2024-12-22 12:09

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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