login to mikrotik via no-ip.org

Good day can anyone tell me what to do to be able to login to my mikrotik from outside my network?Example if I’m out of town and want to check something on my routerboard?

Do you have a public IP on your router? If you do is it static?

Yes I do and no its not static

First you will need to do this so you can get to the router.

http://wiki.mikrotik.com/wiki/Dynamic_DNS_Update_Script_for_DNSoMatic.com_behind_NAT

Where you wanting to access things behind the router or the router itself?

Can this work with no-ip.org aswell.

DNS o Matic does.

Here is a new one that is for No-IP
http://forum.mikrotik.com/t/dynamic-dns-update-script-for-no-ip-dns-behind-nat/56765/1

Thanks for the feedback so far, can i just copy and past the script?

Is this all i do? how do i access the mikrotik now? from winbox and what do i type in?

Sorry for all the questions but mikrotik is new for me.

From Winbox you will type in the domain you created with No-IP. That should take you directly to the public IP of your router.

I tried not working, is there something else i must do?

Please type “/export compact” in your RouterOS command line interface, and paste output here. make sure you are running RouterOS v5.17 before you do that, as Export Compact could be missing in earlier RouterOS versions.

Is this what it should look like

#Dynamic DNS Update Script for No-IP DNS behind nat

Set needed variables

:local username “agrilan”
:local password “”
:local host “agrilan.no-ip.org

:global previousIP

print some debug info

:log info (“Update No-IP DNS: username = $username”)
:log info (“Update No-IP DNS: hostname = $host”)
:log info (“Update No-IP DNS: previousIP = $previousIP”)

behind nat - get the publòic address using dyndns url http://checkip.dyndns.org

/tool fetch mode=http address=“checkip.dyndns.org” src-path=“/” dst-path=“/dyndns.checkip.html”
: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 “No-IP DNS: currentIP = $currentIP”

:if ($currentIP != $previousIP) do={
:log info “No-IP: Current IP $currentIP is not equal to previous IP, update needed”
:set previousIP $currentIP
:local url “http://dynupdate.no-ip.com/nic/update\3Fmyip=$currentIP&hostname=$host
:log info “No-IP DNS: Sending update for $host”
/tool fetch url=$url user=$username password=$password mode=http dst-path=(“no-ip_ddns_update.txt”)
:log info “No-IP DNS: Host $host updated on No-IP with IP $currentIP”
}
else={
:log info "No-IP: update not needed "
}

end

Did the script run properly and update No-IP? Also, can you post /ip firewall export

/export compact would be better, as there might be some other thing we are missing

touche :slight_smile:

/ip firewall connection tracking
set enabled=yes generic-timeout=10m icmp-timeout=10s tcp-close-timeout=10s
tcp-close-wait-timeout=10s tcp-established-timeout=1d
tcp-fin-wait-timeout=10s tcp-last-ack-timeout=10s
tcp-syn-received-timeout=5s tcp-syn-sent-timeout=5s tcp-syncookie=no
tcp-time-wait-timeout=10s udp-stream-timeout=3m udp-timeout=10s
/ip firewall nat
add action=masquerade chain=srcnat disabled=no
/ip firewall service-port
set ftp disabled=no ports=21
set tftp disabled=no ports=69
set irc disabled=no ports=6667
set h323 disabled=no
set sip disabled=no ports=5060,5061
set pptp disabled=no

how do i know if script ran correctly

anyone

Does No-IP show the public IP of your router?

were do i see that? sorry I’m a bir clueless