Hi,
I have 2 ADSL routers in bridge mode and 1 LTE modem. Mikrotik makes the 2 PPPOE connections. default route is LTE. I am having 2 issues.
-
I am manually updating DYNDNS with the ip of ADSL1 as I want external users to use remote desktop. I am nattting port 3389 to an internal server. The router has a default route to LTE so all internet browsing will use LTE. How can I route traffic coming from ADSL1 back out via ADSL1 and if it comes in on ADSL2 it must route back out ADSL2. Currently no one can connect becuase their traffic goes via individual routes.
-
I have a Dyndns script but it uses the default route as the updating IP. Anyone that can help me modify it so I can choose which interface must be used?
Here is my script :
Set needed variables
:global username "bla"
:global password "bla"
:global hostname "bla.dyndns.org"
:global dyndnsForce
:global previousIP
:global resolvedIP [:resolve $hostname]
print some debug info WHEN YOU F___ THIS UP... THIS WILL HELP YOU FIND WHERE.
:log info ("UpdateDynDNS: username = $username")
:log info ("UpdateDynDNS: password = $password")
:log info ("UpdateDynDNS: hostname = $hostname")
:log info ("UpdateDynDNS: previousIP = $previousIP")
:log info ("UpdateDynDNS: resolvedIP = $resolvedIP")
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"
:global result [/file get dyndns.checkip.html contents]
parse the current IP result
:global resultLen [:len $result]
:global startLoc [:find $result ": " -1]
:set startLoc ($startLoc + 2)
:global endLoc [:find $result "" -1]
:global 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!
Edit: Not really needed anymore... the result is not equal... Update will happen.
#:set dyndnsForce true
Determine if dyndns update is needed
more dyndns updater request details http://www.dyndns.com/developers/specs/syntax.html
#This is where we check the DNS record against actual result. Thanks to jimstolz76
:if (($currentIP != $resolvedIP) || ($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"
:global result [/file get dyndns.txt contents]
:log info ("UpdateDynDNS: Dyndns update needed")
:log info ("Thanks Springs! Update Result: " . $result)
:put ("Dyndns Update Result: " . $result)
} else= {
:log info ("UpdateDynDNS: No dyndns update needed")
}