[操作疑難] RouterOS DDNS 翻牆問題

各位有用routerOS的師兄,你地有無用本身個DDNS (Menu: IP > Cloud)?
有無試過上大陸仲用唔用到?
本來我想用dotTK + cloudflare, 不過我唔識將API寫入routerOS個script...google 過不過全部都係舊API,已經用唔到.

有無師兄可以上開大陸幫手試試?

回覆 1# chaplin_lee

可以用ChangeIP.net.

TOP

回覆 2# 雯雯

我會試下,不過用dotTK+cloudflare 唔洗sub-domain
師兄你有無changeIP 個script?

TOP

回覆 3# chaplin_lee

:global ddnsuser "username"
:global ddnspass "password"
:global ddnshost "DDNS address"
:global ddnsinterface "pppoe-out1"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# END OF USER DEFINED CONFIGURATION
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:global ddnssystem ("mt-" . [/system package get [/system package find name=system] version] )
:global ddnsip [ /ip address get [/ip address find interface=$ddnsinterface] address ]
:global ddnslastip

:if ([:len [/interface find name=$ddnsinterface]] = 0 ) do={ :log info "DDNS: No interface named $ddnsinterface, please check configuration." }

:if ([ :typeof $ddnslastip ] = "nothing" ) do={ :global ddnslastip 0.0.0.0/0 }

:if ([ :typeof $ddnsip ] = "nothing" ) do={

:log info ("DDNS: No ip address present on " . $ddnsinterface . ", please check.")

} else={

  :if ($ddnsip != $ddnslastip) do={

    :log info "DDNS: Sending UPDATE!"
    :log info [ :put [/tool dns-update name=$ddnshost address=[:pick $ddnsip 0 [:find $ddnsip "/"] ] key-name=$ddnsuser key=$ddnspass ] ]
    :global ddnslastip $ddnsip

  } else={

    :log info "DDNS: No changes necessary."

  }

}

# END OF SCRIPT

TOP