|
![]() |
#1 |
Premium
Datum registracije: Jun 2007
Lokacija: ZG
Postovi: 133
|
Mikrotik i dyndns
Ima li netko iskustva konfiguriranja mikrotika na dyndns tako da se na njega mogu spojiti iz vana? Dakle, koristim SXT seriju 5GHz i spojen je preko ethernet porta na T-Com ruter. Lokalno sve funkcionira, no htio bih mu na neki način pristupati sa vanjske lokacije. |
![]() |
![]() |
![]() |
#2 | |
Laughing Man
Datum registracije: Sep 2005
Lokacija: Volim grah koji peče
Postovi: 3,040
|
Ja koristim freedns na mikrotiku, ali ddns ti je na wikiju bolje podržan. Dakle imaš skripte, gui nema. Probaj i njihov forum, možda ima nešto jednostavnije od ovog. Vjerujem da ti treba ovaj drugi link. http://wiki.mikrotik.com/wiki/Dynami...ipt_for_dynDNS http://wiki.mikrotik.com/wiki/Dynami...DNS_behind_NAT http://wiki.mikrotik.com/wiki/Scripts#General
__________________
Citiraj:
|
|
![]() |
![]() |
|
|
Oglas
|
|
![]() |
#3 |
Premium
Datum registracije: Nov 2006
Lokacija: HR
Postovi: 4,679
|
Code:
# Set needed variables :local username TVOJ_USER :local password TVOJ_PASS :local hostname TVOJ.dyndns.tv :global dyndnsForce :global previousIP # print some debug info :log info ("UpdateDynDNS: username = $username") :log info ("UpdateDynDNS: password = $password") :log info ("UpdateDynDNS: hostname = $hostname") :log info ("UpdateDynDNS: previousIP = $previousIP") # 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" :delay 1 :local result [/file get dyndns.checkip.html contents] # parse the current IP result :local resultLen [:len $result] :local startLoc [:find $result ": " -1] :set startLoc ($startLoc + 2) :local endLoc [:find $result " |
" -1]
:local 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!
#:set dyndnsForce true
# Determine if dyndns update is needed
# more dyndns updater request details http://www.dyndns.com/developers/specs/syntax.html
:if (($currentIP != $previousIP) || ($dyndnsForce = true)) do={
:set dyndnsForce false
:set previousIP $currentIP
:log info "$currentIP or $previousIP"
/tool fetch user=$username password=$password mode=http address="members.dyndns.org" \
src-path="nic/update?system=dyndns&hostname=$hostname&myip=$currentIP&wildcard=no" \
dst-path="/dyndns.txt"
:delay 1
: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")
}
i to ti ide pod skriptu
dakle
ako ides preko web gui
system>>script
https://www.dropbox.com/s/262p0ierp5...44.37.png?dl=0
i još ti treba schedule da provjerava ip
https://www.dropbox.com/s/0onvmdr59m...46.12.png?dl=0
sa time da moj mikrotik poziva net PPPoE pa je odmah dostupan, tako da sam ja moral u firewall stavit blokade
a ti moras u modem preusmjerit port 80 ili winbox 8291 na taj mikrotik
![]() |
#6 |
fx
Datum registracije: Sep 2007
Lokacija: zagreb
Postovi: 234
|
Moras mu pustit port na routeru. Koji isp imas i kako se spajas. Najbolje ti je slozit ppoe na mikrotiku. A dyndns ako imas free account izbjegavaj, uzmi changeip.net adresu, slozi skriptu za to + skriptu za reconnect ppoea ako si na dslu u vrijeme koje zelis i gg, mogu ti teamviewerom pokazat i objasnit sto i kako podesit. |
![]() |
![]() |
![]() |
#9 |
Premium
Datum registracije: May 2004
Lokacija: Rijeka
Postovi: 2,217
|
Vec neko vrijeme nisam na mikrotiku pa se masu toga nesjecam ali htjeo sam ti skrenuti paznju da dosta iskon, t-com rutera danas ima u sebi podrsku za dyndns, noip i slicne servise sto je zgodno. Ja imam RPI koji nisam htjeo opterecivati i sa dinamicim IP klijentima nego mi to odradjuje direktno iskon router. |
![]() |
![]() |
|
|
Oglas
|
|
![]() |
|
|