The problem is that everytime the router restarts we get a different external IP address, we have a DynDNS free account with a script that runs each reboot to update theDynDNS hostname, how can we put a variable like $currentIP. In place of the 180.180.127.xxx in the script.
:if (($currentIP != $previousIP) || ($dyndnsForce = true)) do={
:set dyndnsForce false
:set previousIP $currentIP
/tool fetch user=$username password=$password mode=http address=“members.dyndns.org” src-path=“/nic/update?hostname=$hostname&myip=$currentIP” dst-path=“/dyndns.txt”
: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”)
What I would like to do is put the variable? $currentIP into the Port Forwarding script as so that every time the IP changes the port forward script will update.
1 - Fibreoptic internet going to Modem
2 - Modem linked to Eth1/PoE port of Mikrotik router81
3 - DVR hooked up to Eth4 port of MikroTik router
4 - Linksys Wireless router hooked up to Eth2 port of MikroTik router
In the MikroTik router we have the above DynDNS script running at boot time on the router, this seems to be working, we have a port forward script running at boot time on the router this has the problem as described iin above post, we now have discovered a further little hiccup.
We can access the DVR directly using it’s local IP address and port 81 from within the LAN
We can access the DVR directly using it’s DynDNS.org alias and port 81 from within the LAN
We can NOT access the DVR from outside the LAN using it’s DynDNS.org alias and port 81 (i.e. from another network) over the internet, we get error page not found
We can access the router using theDynDNS alias from outside the LAN using it’s DynDNS.org alias and get the router home page, obviously something is awry in my script
This problem is getting somewhat critical as we had it working as aboveuntil the ISP in it’s infinite wisdon decided to come in and replace the MikroTik router with one of it’s own POS routers. We are now discussing with the customer is whether to change ISP as one of the other ISP’s offers the same or similar package with a combined cable modem/wireless router, and I have configured these with the DVR on numerous occassions with no hassles.