Community discussions

MikroTik App
 
User avatar
kevigizmo
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 53
Joined: Mon Dec 19, 2011 3:35 pm
Location: Norfolk, UK
Contact:

dynDNS over PPPoE

Sat Mar 02, 2013 11:21 pm

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 :)
Kev
 
User avatar
dotnet
Frequent Visitor
Frequent Visitor
Posts: 53
Joined: Tue Feb 26, 2013 11:41 am
Location: Chittagong, Bangladesh.

Re: dynDNS over PPPoE

Sun Mar 03, 2013 11:38 am

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
http://wiki.mikrotik.com/wiki/Dynamic_D ... angeIP.com

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

Who is online

Users browsing this forum: No registered users and 4 guests