dynDNS over PPPoE

Hi All,

I’m looking at sorting out a dynDNS account for a remote site with obviously a dynamic public address on the WAN,

the only issue I see at the moment is alot of the scripts I’ve seen have all been for other types of services / interfaces

the MT is using PPPoE on the WAN (in this case a RB751 with the PPPoE running on Ether1)

How would I go about getting the dynDNS stuff to work in this kind of setup?

Cheers all :slight_smile:
Kev

CONFIGURE DDNS SCRIPT AND SCHEDULER ON MIKROTIK

ddns-script-modem-in-pppoe-mode- code. (For your copy & paste facility)

:global ddnsuser "user-id from changeip.com"
:global ddnspass "passwd"
:global ddnshost "full hostname"
:global ddnsinterface "ether1"

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

END OF USER DEFINED CONFIGURATION

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:global ddnssystem ("mt-" . [/system package get [/system package find name=system] version] )
:global ddnsip [ /ip address get [/ip address find interface=$ddnsinterface] address ]
:global ddnslastip

:if ([:len [/interface find name=$ddnsinterface]] = 0 ) do={ :log info "DDNS: No interface named $ddnsinterface, please check configuration." }

:if ([ :typeof $ddnslastip ] = "nothing" ) do={ :global ddnslastip 0.0.0.0/0 }

:if ([ :typeof $ddnsip ] = "nothing" ) do={

:log info ("DDNS: No ip address present on " . $ddnsinterface . ", please check.")

} else={

:if ($ddnsip != $ddnslastip) do={

:log info "DDNS: Sending UPDATE!"
:log info [ :put [/tool dns-update name=$ddnshost address=[:pick $ddnsip 0 [:find $ddnsip "/"] ] key-name=$ddnsuser key=$ddnspass ] ]
:global ddnslastip $ddnsip

} else={

:log info "DDNS: No changes necessary."

}

}

END OF SCRIPT



To verify that the script is pasted and working properly,
Goto SYSTEMS > SCRIPTS , and double click on the DDNS to view its contents, Just verify it everything is in place.

ADDING SCHEDULER (So it can update record after every 5 minutes)

Also add this in scheduler so it can run after every 5 minutes, you can adjust it as per your requirement.

/system scheduler
add disabled=no interval=5m name="Run DDNS every 5 minutes" on-event=update-ddns policy=
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api start-date=mar/03/2013 start-time=15:00:00

Following Script have been taken from

NOTE:
Make sure you change the user id + password + host name to match the same you have entered at the time of registration. Also Make sure that you change the INTERFACE setting.


Best regards