Routing with 2 ADSL and 1 LTE

Hi,

I have 2 PPPOE connections being made from Mikrotik and 1 LTE modem connected. LTE is the default route. I am manually updating DYNDNS with ip of ADSL 1 so external users can connect using RDP. I am also natting port 3389 to internal server. Problem is traffic comes in over ADSL1 and goes out via LTE. How can I resolve this.

I also have a script to auto update DYNDNS but it uses default route as updating IP. How can i modify the script to get the ip of an interface i choose to use as the updating IP.

here is the 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")
}