add for mikrotik
add for mikrotik
- Accueil
- Espace Client
- Community Forum
- Services
- Dynamic DNS Service
- add for mikrotik
- Community Forum
- add for mikrotik
Topic: add for mikrotik
1) add a script called Dynu.----------:global ddnsuser "userdynu":global ddnspass "passdynu":global theinterface "lan name":global ddnshost "hostname":global ipddns [:resolve $ddnshost];:global ipfresh [ /ip address get [/ip address find interface=$theinterface ] address ]:if ([ :typeof $ipfresh ] = nil ) do={:log info ("dynu: No ip address on $theinterface .")} else={:for i from=( [:len $ipfresh] - 1) to=0 do={:if ( [:pick $ipfresh $i] = "/") do={:set ipfresh [:pick $ipfresh 0 $i];}}:if ($ipddns != $ipfresh) do={:log info ("dynu: IP-dynu = $ipddns"):log info ("dynu: IP-Fresh = $ipfresh"):log info "dynu: Update IP needed, Sending UPDATE...!":global str "/nic/update?hostname=$ddnshost&myip=$ipfresh"/tool fetch address=api.dynu.com src-path=$str mode=http user=$ddnsuser password=$ddnspass dst-path=("/Dynu.".$ddnshost):delay 1:global str [/file find name="Dynu.$ddnshost"];/file remove $str:global ipddns $ipfresh:log info "dynu: IP updated to $ipfresh!"} else={:log info "dynu: dont need changes";}}--------------Please change the values in bold with your account details. Please note that your username can be found in 'Contact Details' section in Dynu control panel.For more information, you may refer to our IP update protocol at https://www.dynu.com/Resources/API 2) After manually tested that it works, you can add a script to run the update every 5 minutes:/system scheduler add comment="Update Dynu DDNS" disabled=no interval=5m \ name=Dynu on-event=Dynu policy=read,write,test
Reply with quote | Report
Author | Topic: add for mikrotik |
---|---|
wesam alazade Joined: 17/08/2015 |
add for mikrotik lundi 17 août 2015 21:13
how to add dns for mikrotik server
|
timothytw Joined: 02/05/2002 |
add for mikrotik mardi 18 août 2015 12:37
1) add a script called Dynu.----------:global ddnsuser "userdynu":global ddnspass "passdynu":global theinterface "lan name":global ddnshost "hostname":global ipddns [:resolve $ddnshost];:global ipfresh [ /ip address get [/ip address find interface=$theinterface ] address ]:if ([ :typeof $ipfresh ] = nil ) do={:log info ("dynu: No ip address on $theinterface .")} else={:for i from=( [:len $ipfresh] - 1) to=0 do={:if ( [:pick $ipfresh $i] = "/") do={:set ipfresh [:pick $ipfresh 0 $i];}}:if ($ipddns != $ipfresh) do={:log info ("dynu: IP-dynu = $ipddns"):log info ("dynu: IP-Fresh = $ipfresh"):log info "dynu: Update IP needed, Sending UPDATE...!":global str "/nic/update?hostname=$ddnshost&myip=$ipfresh"/tool fetch address=api.dynu.com src-path=$str mode=http user=$ddnsuser password=$ddnspass dst-path=("/Dynu.".$ddnshost):delay 1:global str [/file find name="Dynu.$ddnshost"];/file remove $str:global ipddns $ipfresh:log info "dynu: IP updated to $ipfresh!"} else={:log info "dynu: dont need changes";}}--------------Please change the values in bold with your account details. Please note that your username can be found in 'Contact Details' section in Dynu control panel.For more information, you may refer to our IP update protocol at https://www.dynu.com/Resources/API 2) After manually tested that it works, you can add a script to run the update every 5 minutes:/system scheduler add comment="Update Dynu DDNS" disabled=no interval=5m \ name=Dynu on-event=Dynu policy=read,write,test
|
It is currently samedi 23 novembre 2024 10:08 US Mountain Standard Time
samedi 23 novembre 2024 10:08