Community discussions

MikroTik App
 
candrian
just joined
Topic Author
Posts: 1
Joined: Sun Apr 05, 2020 1:47 pm

DynDNS Script from Mikrotik Wiki (correction)

Sun Apr 05, 2020 1:58 pm

Hi all,

I'm new to Mikrotik. I just bought the HAP AC2 and i'm on the configuration period. I have set this router as the main router of my home network which also connects to the internet via PPPoE through the ISP modem. I have also set up Pi-Hole as the local DNS. While i was trying to find a script for updating my DynDNS domain i found in the official wiki a page with a script for this purpose. https://wiki.mikrotik.com/wiki/Dynamic_ ... _No-IP_DNS. I tried the script several times with no success but after some debugging i noticed that firstly, the router couldn't resolve the domain (http://dynupdate.no-ip.com/) so i found out that the user must have set a DNS IP address under IP->DNS->Servers (maybe this must only be set up in the case you are using a local DNS as i do) and the second one was that the $previousIP variable in the script it seemed that on each run didn't have the previous value. So i noticed here that the suggested permissions write, test, read wasn't enough for the global variable to be set. So i granted policy permissions also and now everything works.

If the $previousIP is not set then on each run the script will send an ip update request to the DynDNS server even when the ip has not be changed (this is only noticeable though the logs. Otherwise the user is not affected)

So these two are suggestions if you are interested to be added in your official wiki page.

Thanks,
Haris
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3291
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: DynDNS Script from Mikrotik Wiki (correction)

Mon Apr 06, 2020 12:12 pm

You can use MikroTik Colud DNS, its free. Then you can point your dyndns to the MikroTiok clod DNS name. (if its possible)
Or drop dyndns and only use Mikrotik Cloud DNS as your public DNS name.

IP->Cloud [x] DDNS Enable.
Then you should get a fixed DNS name like this:

PublicIP: 65.232.13.123 (your outside IP)
DNS Name: 6f3806exxxxx.sn.mynetname.net (Serial number your router + .sn.mynetname.net)
 
aceror
just joined
Posts: 3
Joined: Sat Apr 11, 2020 12:23 pm

Re: DynDNS Script from Mikrotik Wiki (correction)

Sat Apr 11, 2020 1:44 pm

Hello
Make script call DynDns and paste this

# Set needed variables
:local username "YOURUSERNAME"
:local password "YOURPASSWORD"
:local hostname "YOURHOSTNAME.dyndns.org"

:global dyndnsForce
:global previousIP

# print some debug info
:log info ("UpdateDynDNS: username = $username")
:log info ("UpdateDynDNS: password = $password")
:log info ("UpdateDynDNS: hostname = $hostname")
:log info ("UpdateDynDNS: previousIP = $previousIP")

# get the current IP address from the internet (in case of double-nat)
/tool fetch mode=http address="checkip.dyndns.org" src-path="/" dst-path="/dyndns.checkip.html"
:delay 1
:local result [/file get dyndns.checkip.html contents]

# parse the current IP result
:local resultLen [:len $result]
:local startLoc [:find $result ": " -1]
:set startLoc ($startLoc + 2)
:local endLoc [:find $result "</body>" -1]
:local currentIP [:pick $result $startLoc $endLoc]
:log info "UpdateDynDNS: currentIP = $currentIP"

# Remove the # on next line to force an update every single time - useful for debugging,
# but you could end up getting blacklisted by DynDNS!

#:set dyndnsForce true

# Determine if dyndns update is needed
# more dyndns updater request details http://www.dyndns.com/developers/specs/syntax.html

:if (($currentIP != $previousIP) || ($dyndnsForce = true)) do={
:set dyndnsForce false
:set previousIP $currentIP
:log info "$currentIP or $previousIP"
/tool fetch user=$username password=$password mode=http address="members.dyndns.org" \
src-path="nic/update?system=dyndns&hostname=$hostname&myip=$currentIP&wildcard=no" \
dst-path="/dyndns.txt"
:delay 1
:local result [/file get dyndns.txt contents]
:log info ("UpdateDynDNS: Dyndns update needed")
:log info ("UpdateDynDNS: Dyndns Update Result: ".$result)
:put ("Dyndns Update Result: ".$result)
} else={
:log info ("UpdateDynDNS: No dyndns update needed")
}

then run this in command
/system scheduler
add interval=1m name=DynDns on-event=DynDns policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api start-time=startup
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3291
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: DynDNS Script from Mikrotik Wiki (correction)

Sun Apr 12, 2020 12:32 pm

Thanks for the script.
Use code tags. Select text and click the </> button.

Like this: (with tabs as well)
# Set needed variables
	:local username "YOURUSERNAME"
	:local password "YOURPASSWORD"
	:local hostname "YOURHOSTNAME.dyndns.org"

	:global dyndnsForce
	:global previousIP

# print some debug info
	:log info ("UpdateDynDNS: username = $username")
	:log info ("UpdateDynDNS: password = $password")
	:log info ("UpdateDynDNS: hostname = $hostname")
	:log info ("UpdateDynDNS: previousIP = $previousIP")

# get the current IP address from the internet (in case of double-nat)
	/tool fetch mode=http address="checkip.dyndns.org" src-path="/" dst-path="/dyndns.checkip.html"
	:delay 1
	:local result [/file get dyndns.checkip.html contents]

# parse the current IP result
	:local resultLen [:len $result]
	:local startLoc [:find $result ": " -1]
	:set startLoc ($startLoc + 2)
	:local endLoc [:find $result "</body>" -1]
	:local currentIP [:pick $result $startLoc $endLoc]
	:log info "UpdateDynDNS: currentIP = $currentIP"

# Remove the # on next line to force an update every single time - useful for debugging,
# but you could end up getting blacklisted by DynDNS!

#:set dyndnsForce true

# Determine if dyndns update is needed
# more dyndns updater request details http://www.dyndns.com/developers/specs/syntax.html

	:if (($currentIP != $previousIP) || ($dyndnsForce = true)) do={
		:set dyndnsForce false
		:set previousIP $currentIP
		:log info "$currentIP or $previousIP"
		/tool fetch user=$username password=$password mode=http address="members.dyndns.org" \
		src-path="nic/update?system=dyndns&hostname=$hostname&myip=$currentIP&wildcard=no" \
		dst-path="/dyndns.txt"
		:delay 1
		:local result [/file get dyndns.txt contents]
		:log info ("UpdateDynDNS: Dyndns update needed")
		:log info ("UpdateDynDNS: Dyndns Update Result: ".$result)
		:put ("Dyndns Update Result: ".$result)
	} else={
		:log info ("UpdateDynDNS: No dyndns update needed")
	}
 
tuxedo21
just joined
Posts: 1
Joined: Sat Feb 20, 2021 4:56 pm

Re: DynDNS Script from Mikrotik Wiki (correction)

Sat Feb 20, 2021 5:57 pm

hi I am new here, I got software routeros 4.86.1 and in my IP section, I did not see "IP cloud" feature in the list , I like to use my dynamic service with dyndns, can anyone can help me to get this feature back to IP section ?
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3291
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: DynDNS Script from Mikrotik Wiki (correction)

Tue Feb 23, 2021 11:19 am

I guess, you have 6.48.1 and Cloud should be there.

In Winbox (3.27) it looks like this:
cloud.jpg
cloud.jpg
You do not have the required permissions to view the files attached to this post.
 
texmeshtexas
Member Candidate
Member Candidate
Posts: 151
Joined: Sat Oct 11, 2008 11:17 pm

Re: DynDNS Script from Mikrotik Wiki (correction)

Tue Mar 02, 2021 7:09 am

I noticed that if I changed the IP in my dyndns.org account. This script would not correct it.
To fix that, I made these changes.

:local dyndnsForce
:local previousIP [resolve $hostname]

Now the script truly compares the routes current IP with that resolved by $hostname
 
imamic
just joined
Posts: 18
Joined: Fri Jan 14, 2022 9:52 am

Re: DynDNS Script from Mikrotik Wiki (correction)

Fri Jan 14, 2022 9:53 am

Hi guys,

Thanks for the script, it works. How to hide credentials in LOG file?
Every minute he sends user/pass/hostname to log file.

Thanks for the help
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3291
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: DynDNS Script from Mikrotik Wiki (correction)

Fri Jan 14, 2022 1:16 pm

Remove one or all of these lines:
# print some debug info
	:log info ("UpdateDynDNS: username = $username")
	:log info ("UpdateDynDNS: password = $password")
	:log info ("UpdateDynDNS: hostname = $hostname")
	:log info ("UpdateDynDNS: previousIP = $previousIP")
 
imamic
just joined
Posts: 18
Joined: Fri Jan 14, 2022 9:52 am

Re: DynDNS Script from Mikrotik Wiki (correction)

Fri Jan 14, 2022 2:23 pm

Great!

Thanks for your selfless help :)
 
knifehandz
just joined
Posts: 1
Joined: Sun Jun 26, 2022 11:48 am

Re: DynDNS Script from Mikrotik Wiki (correction)

Sun Jun 26, 2022 11:55 am

Just came across this and the script is really helpful!

Would like to share a modified version that uses the new API (using Client Update Key) and gives a warning if forced update is turned on in case anyone is interested.

Tested with RouterOS 7.2.3
# Set needed variables
	:local username "DYN_USER_NAME"
	:local clientkey "DYN_CLIENT_KEY"
	:local hostname "HOST_TO_UPDATE"

	:global dyndnsForce
	:global previousIP

# get the current IP address from the internet (in case of double-nat)
	/tool fetch mode=http address="checkip.dyndns.org" src-path="/" dst-path="/dyndns.checkip.html"
	:delay 1
	:local result [/file get dyndns.checkip.html contents]

# parse the current IP result
	:local resultLen [:len $result]
	:local startLoc [:find $result ": " -1]
	:set startLoc ($startLoc + 2)
	:local endLoc [:find $result "</body>" -1]
	:local currentIP [:pick $result $startLoc $endLoc]
	:log info "UpdateDynDNS: currentIP = $currentIP"

# Remove the # on next line to force an update every single time - useful for debugging,
# but you could end up getting blacklisted by DynDNS!

#:set dyndnsForce true

# Determine if dyndns update is needed
# more dyndns updater request details https://help.dyn.com/remote-access-api/perform-update/
	:log info "UpdateDynDNS: previousIP = $previousIP"
	:if ($dyndnsForce = true) do={ :log warning "UpdateDynDNS: Forced update on" }

	:if (($currentIP != $previousIP) || ($dyndnsForce = true)) do={
		:set dyndnsForce false
		:set previousIP $currentIP

		/tool fetch mode=https \
		url="https://$username:$clientkey@members.dyndns.org/v3/update?hostname=$hostname&myip=$currentIP" \ 
		dst-path="/dyndns.txt"

		:delay 1
		:local result [/file get dyndns.txt contents]
		:log info ("UpdateDynDNS: Dyndns update needed")
		:log info ("UpdateDynDNS: Dyndns Update Result: ".$result)
		:put ("Dyndns Update Result: ".$result)
	} else={
		:log info ("UpdateDynDNS: No dyndns update needed")
	}
 
imamic
just joined
Posts: 18
Joined: Fri Jan 14, 2022 9:52 am

Re: DynDNS Script from Mikrotik Wiki (correction)

Thu Nov 23, 2023 11:09 am

Hi everyone,

I'm currently facing an issue with my MikroTik router after updating the firmware to version 7.12.1 a few days ago. I'm using the latest script with a DNS client key, and since the update, the DynDNS is not updating correctly.

The strange part is that the router indicates a successful update, showing the new IP, but when I check on the DynDNS website, the new IP is not assigned. I've already tried generating a new key, but unfortunately, that didn't resolve the issue.

I'm reaching out to the community to see if anyone else is experiencing similar problems or has any insights into resolving this issue. Could it be a problem on the DynDNS side, or is there something specific to the MikroTik FW 7.12.1 update that might be causing this discrepancy?

I appreciate any assistance or advice you can provide.

Thank you in advance for your help.
You do not have the required permissions to view the files attached to this post.
 
maxb
newbie
Posts: 34
Joined: Wed Feb 12, 2014 4:42 am

Re: DynDNS Script from Mikrotik Wiki (correction)

Mon Dec 18, 2023 3:49 pm

Hi everyone,

I'm currently facing an issue with my MikroTik router after updating the firmware to version 7.12.1 a few days ago. I'm using the latest script with a DNS client key, and since the update, the DynDNS is not updating correctly.

The strange part is that the router indicates a successful update, showing the new IP, but when I check on the DynDNS website, the new IP is not assigned. I've already tried generating a new key, but unfortunately, that didn't resolve the issue.

I'm reaching out to the community to see if anyone else is experiencing similar problems or has any insights into resolving this issue. Could it be a problem on the DynDNS side, or is there something specific to the MikroTik FW 7.12.1 update that might be causing this discrepancy?

I appreciate any assistance or advice you can provide.

Thank you in advance for your help.
I'm facing this exact same problem.
 
nbajkovec
just joined
Posts: 1
Joined: Wed Sep 05, 2018 1:22 pm

Re: DynDNS Script from Mikrotik Wiki (correction)

Thu Dec 21, 2023 9:49 am

I'm facing the same issue, worked fine untill update to 7.11.2 version. Has anyone found a solution for the problem?
 
Patty
just joined
Posts: 1
Joined: Fri Dec 22, 2023 12:21 pm

Re: DynDNS Script from Mikrotik Wiki (correction)

Fri Dec 22, 2023 12:31 pm

Hey, sorry for my possibly bad English, I use a translator.
I did the update to 7.13 yesterday and also had problems with the script execution for dyndns.
I was able to solve the problem by activating "FTP" in the script.
Problem.png
Solution.png
I hope that this is perhaps also your problem and can be remedied.

Greetings Patty
You do not have the required permissions to view the files attached to this post.
Last edited by Patty on Fri Dec 22, 2023 12:33 pm, edited 1 time in total.
 
Benqer
just joined
Posts: 4
Joined: Fri Sep 18, 2020 6:24 pm

Re: DynDNS Script from Mikrotik Wiki (correction)

Sat Dec 23, 2023 10:44 pm

With "ftp" the script don't work too, but only for IPv6.
IPv4 works fine.
 
User avatar
qatar2022
Member Candidate
Member Candidate
Posts: 141
Joined: Mon Aug 24, 2020 11:12 am

Re: DynDNS Script from Mikrotik Wiki (correction)

Sun Dec 24, 2023 6:28 am

I'm facing this exact same problem.
 
macobi
just joined
Posts: 2
Joined: Tue Dec 26, 2023 12:59 pm

Re: DynDNS Script from Mikrotik Wiki (correction)

Tue Dec 26, 2023 1:00 pm

im facing the same issue.

any solutions already available?

got ROS 7.13 running and got a dyndns account

thx and BR
Last edited by macobi on Tue Dec 26, 2023 1:12 pm, edited 1 time in total.
 
Kobold81
just joined
Posts: 3
Joined: Tue Aug 10, 2021 12:11 am

Re: DynDNS Script from Mikrotik Wiki (correction)

Fri Dec 29, 2023 8:46 pm

I face the same problem, thought that was my misonfiguration.

[/ip address get [find where interface=$theinterface] value-name=address] does also not show my current ip.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: DynDNS Script from Mikrotik Wiki (correction)

Sat Dec 30, 2023 1:35 pm

Interface can have multiple addresses, so the script is bad at the start...
 
Kobold81
just joined
Posts: 3
Joined: Tue Aug 10, 2021 12:11 am

Re: DynDNS Script from Mikrotik Wiki (correction)

Sat Dec 30, 2023 2:45 pm

Your statement is correct, but the cli command does not return any address. If it would return multiple, I could select the correct one (in this use case that would be strange) . But it returns nothing for any interface. It did work until 7.12

So the questions is: what is the solution....
 
User avatar
diamuxin
Member
Member
Posts: 319
Joined: Thu Sep 09, 2021 5:46 pm
Location: Alhambra's City

Re: DynDNS Script from Mikrotik Wiki (correction)

Sun Dec 31, 2023 1:07 pm

With the latest versions of RouterOS the "fetch" command does not work https anymore.

Image

Try this: (Something similar happened to me with a script)
/tool fetch mode=https \

# change to:

/tool fetch mode=http \
 
macobi
just joined
Posts: 2
Joined: Tue Dec 26, 2023 12:59 pm

Re: DynDNS Script from Mikrotik Wiki (correction)

Sun Dec 31, 2023 3:08 pm

Hi folks,

looks like that Router OS 7.14beta4 fixes that bug:

https://mikrotik.com/download/changelog ... lease-tree

anybody already able to test?

BR and happy new year to all
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: DynDNS Script from Mikrotik Wiki (correction)

Sun Dec 31, 2023 6:04 pm

With the latest versions of RouterOS the "fetch" command does not work https anymore.
False... and define what is "latest versions" for you.

7.13 terminal code

[vmtest@] > :put ([/tool fetch url="https://upgrade.mikrotik.com/routeros/NEWESTa7.stable" as-value output=user]->"data")
7.13 1702545848

The script is bad implemented at the start, if it just download from one "url" is not needed any mode/src/etc. frills

And at the time I write, https://checkip.dyndns.org/ do not work at all, not even on other systems
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19100
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: DynDNS Script from Mikrotik Wiki (correction)

Sun Dec 31, 2023 7:44 pm

Kitty has claws, do not mess with it, even with only one eye open you will get hurt, thinking your script knowledge is somehow better, such a comedian. You do know that cat is just Yoda in disguise.
 
User avatar
diamuxin
Member
Member
Posts: 319
Joined: Thu Sep 09, 2021 5:46 pm
Location: Alhambra's City

Re: DynDNS Script from Mikrotik Wiki (correction)

Mon Jan 01, 2024 1:07 pm

False... and define what is "latest versions" for you.
uff I can't get used to those manners ;-) but I like him...

My answer is based on my own experience (when switching to 7.13) and that's why I wanted to help, nothing more. At the time it didn't work with "mode=https" and switching to http fixed it. Now users report that with the latest beta it is fixed.
*) fetch - fixed fetch when using "src-path" with HTTP/HTTPS modes (introduced in v7.13);
Happy new year and please, it doesn't cost work to be a little kind.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: DynDNS Script from Mikrotik Wiki (correction)

Mon Jan 01, 2024 1:47 pm

uff I can't get used to those manners ;-) but I like him...

Happy new year and please, it doesn't cost work to be a little kind.
It probably depends on the fact that I am NOT a native English speaker and I don't use automatic translators... :lol: At least if I make a mistake it's my fault...
And in any case, whether or not it seems like an offense, at least compared to others (not present in this topic so far) at least I try to explain my reasons...


it doesn't cost work to be a little kind
Please try to understand my previous sentences...

Happy Birthday to You too! And to the Others!
 
optio
Long time Member
Long time Member
Posts: 655
Joined: Mon Dec 26, 2022 2:57 pm

Re: DynDNS Script from Mikrotik Wiki (correction)

Mon Jan 01, 2024 10:12 pm

My answer is based on my own experience (when switching to 7.13) and that's why I wanted to help, nothing more. At the time it didn't work with "mode=https" and switching to http fixed it. Now users report that with the latest beta it is fixed.
*) fetch - fixed fetch when using "src-path" with HTTP/HTTPS modes (introduced in v7.13);
Why use mode or any other param that is part of url like address, port and src-path for http(s) fetch? Url as single argument is enough, url schema sets mode if not set and other params are all part of url.
 
User avatar
tdeak
just joined
Posts: 21
Joined: Wed Jun 14, 2017 2:40 pm
Location: Hungary

Re: DynDNS Script from Mikrotik Wiki (correction)

Tue Jan 23, 2024 1:01 pm

This is a tested and working script if anyone looking for a solution:

Tested on Mikrotik RouterOS: 7.12.1
# Set needed variables
	:global username "your-login-name"
	:global password "your-password"
	:global hostname "your-dyndns"

	:global dyndnsForce
	:global previousIP

# print some debug info
	:log info ("UpdateDynDNS: username = $username")
	:log info ("UpdateDynDNS: password = $password")
	:log info ("UpdateDynDNS: hostname = $hostname")
	:log info ("UpdateDynDNS: previousIP = $previousIP")

# get the current IP address from the internet (in case of double-nat)
	/tool fetch mode=http address="checkip.dyndns.org" src-path="/" dst-path="/dyndns.checkip.html"
	:delay 1
	:local result [/file get dyndns.checkip.html contents]

# parse the current IP result
	:local resultLen [:len $result]
	:local startLoc [:find $result ": " -1]
	:set startLoc ($startLoc + 2)
	:local endLoc [:find $result "</body>" -1]
	:local currentIP [:pick $result $startLoc $endLoc]
	:log info "UpdateDynDNS: currentIP = $currentIP"

# Remove the # on next line to force an update every single time - useful for debugging,
# but you could end up getting blacklisted by DynDNS!

#:set dyndnsForce true

# Determine if dyndns update is needed
# more dyndns updater request details http://www.dyndns.com/developers/specs/syntax.html

	:if (($currentIP != $previousIP) || ($dyndnsForce = true)) do={
		:set dyndnsForce false
		:set previousIP $currentIP
		:log info "$currentIP or $previousIP"
		/tool fetch user=$username password=$password mode=https address="members.dyndns.org" \
		src-path="nic/update?system=dyndns&hostname=$hostname&myip=$currentIP&wildcard=no" \
		dst-path="/dyndns.txt"
		:delay 1
		:local result [/file get dyndns.txt contents]
		:log info ("UpdateDynDNS: Dyndns update needed")
		:log info ("UpdateDynDNS: Dyndns Update Result: ".$result)
		:put ("Dyndns Update Result: ".$result)
	} else={
		:log info ("UpdateDynDNS: No dyndns update needed")
	}
 
 
tareqbd
just joined
Posts: 6
Joined: Thu Aug 24, 2023 9:29 pm

Re: DynDNS Script from Mikrotik Wiki (correction)

Tue Mar 26, 2024 5:15 am

Thanks for the script.
Use code tags. Select text and click the </> button.

Like this: (with tabs as well)
# Set needed variables
	:local username "YOURUSERNAME"
	:local password "YOURPASSWORD"
	:local hostname "YOURHOSTNAME.dyndns.org"

	:global dyndnsForce
	:global previousIP

# print some debug info
	:log info ("UpdateDynDNS: username = $username")
	:log info ("UpdateDynDNS: password = $password")
	:log info ("UpdateDynDNS: hostname = $hostname")
	:log info ("UpdateDynDNS: previousIP = $previousIP")

# get the current IP address from the internet (in case of double-nat)
	/tool fetch mode=http address="checkip.dyndns.org" src-path="/" dst-path="/dyndns.checkip.html"
	:delay 1
	:local result [/file get dyndns.checkip.html contents]

# parse the current IP result
	:local resultLen [:len $result]
	:local startLoc [:find $result ": " -1]
	:set startLoc ($startLoc + 2)
	:local endLoc [:find $result "</body>" -1]
	:local currentIP [:pick $result $startLoc $endLoc]
	:log info "UpdateDynDNS: currentIP = $currentIP"

# Remove the # on next line to force an update every single time - useful for debugging,
# but you could end up getting blacklisted by DynDNS!

#:set dyndnsForce true

# Determine if dyndns update is needed
# more dyndns updater request details http://www.dyndns.com/developers/specs/syntax.html

	:if (($currentIP != $previousIP) || ($dyndnsForce = true)) do={
		:set dyndnsForce false
		:set previousIP $currentIP
		:log info "$currentIP or $previousIP"
		/tool fetch user=$username password=$password mode=http address="members.dyndns.org" \
		src-path="nic/update?system=dyndns&hostname=$hostname&myip=$currentIP&wildcard=no" \
		dst-path="/dyndns.txt"
		:delay 1
		:local result [/file get dyndns.txt contents]
		:log info ("UpdateDynDNS: Dyndns update needed")
		:log info ("UpdateDynDNS: Dyndns Update Result: ".$result)
		:put ("Dyndns Update Result: ".$result)
	} else={
		:log info ("UpdateDynDNS: No dyndns update needed")
	}
I have two nic(S)/WAN. how can i define failover nic in this script?

Who is online

Users browsing this forum: No registered users and 24 guests