Community discussions

MikroTik App

Search found 1971 matches

  • 1
  • 2
  • 3
  • 4
  • 5
  • 7
by Jotne
Mon Mar 08, 2021 10:32 pm
Forum: RouterOS v7 BETA
Topic: v7.1beta4 [bug] export hangs / slow [SOLVED]
Replies: 7
Views: 687

Re: v7.1beta4 [bug] export hangs / slow [SOLVED]

You can use
/export verbose
Works, but may give you to much :)
by Jotne
Mon Mar 08, 2021 10:29 pm
Forum: General
Topic: Netflix not loading
Replies: 4
Views: 289

Re: Netflix not loading

Default router config should work fine.
Try remove Router and connect PC directly to ISP and then see if it works fine to rule out Router problems.
by Jotne
Mon Mar 08, 2021 10:26 pm
Forum: Beginner Basics
Topic: Firewall config
Replies: 6
Views: 302

Re: Firewall config

As anav say, its not clear what you have and what you like to setup. Try to avoid double nat.
Make a drawing and post you complete configuration /export hide-sensitive

Da kan vi kanskje hjelpe deg :)
by Jotne
Mon Mar 08, 2021 10:14 pm
Forum: General
Topic: Trying to make MAC Filtering work to REMOVE devices
Replies: 4
Views: 235

Re: Trying to make MAC Filtering work to REMOVE devices

Simple solution.

Add a DHCP reservation for the mac you like to block and give it IP 127.0.0.1

This will not prevent user from setting IP manually. Same with mac, even if you block a mac, for many devices you can just set a new mac your self and you bypass mac filtering.
by Jotne
Mon Mar 08, 2021 8:46 pm
Forum: General
Topic: Security audit of a router
Replies: 2
Views: 156

Re: Security audit of a router

Not possible to give a simple answer, but hare are some I have done. a. Log all changes to your router. (I do use splunk, see my signature) b. Do not open your router for outside change access (Winbox/SSH/Telnet ++), if you need to do it, use VPN, if that can not be done: ---1. Use another port than...
by Jotne
Mon Mar 08, 2021 2:06 pm
Forum: Announcements
Topic: v6.49beta [testing] is released!
Replies: 48
Views: 9982

Re: v6.49beta [testing] is released!

Version 6.49beta22 has been released.
I do not see any information about DoH memory leak fix.
So it's still not fixed?
by Jotne
Sun Mar 07, 2021 8:25 pm
Forum: Scripting
Topic: modify a 3rd part script [SOLVED]
Replies: 9
Views: 578

Re: modify a 3rd part script [SOLVED]

I have no problem with this list with 17000 DNS host on my hEX At the same time I have a fw rule that block all IP that tries any blocked port on my router for 24 hour. This list has between 7000 and 15000 IP at the same time as the DNS block list. What did eat my memory is the DoH that has a memory...
by Jotne
Sun Mar 07, 2021 5:53 pm
Forum: Scripting
Topic: SRC Address for Email
Replies: 1
Views: 102

Re: SRC Address for Email

So if wan2 goes down, you will not get any email at all since only wan2 can send email?
by Jotne
Sun Mar 07, 2021 5:49 pm
Forum: Scripting
Topic: modify a 3rd part script [SOLVED]
Replies: 9
Views: 578

Re: modify a 3rd part script [SOLVED]

Its not my script, just cleaned it up some. Script do download from internet a list of around 17000 DNS pointers that are added to your router. Example this list likes to block CNN, it will add your your router www.cnn.com with an ip of 127.0.0.1 So if you do visit at site that like to open at 3rd p...
by Jotne
Sat Mar 06, 2021 4:43 pm
Forum: Scripting
Topic: since in netwatch
Replies: 9
Views: 450

Re: since in netwatch

So you like a sms when connection to pppoe client goes down and when it comes up?
No need to look at line or ip, just look at /ppp active and see when pppoe is up or down, then send email while status changes.
by Jotne
Sat Mar 06, 2021 3:54 pm
Forum: Scripting
Topic: since in netwatch
Replies: 9
Views: 450

Re: since in netwatch

As long as you do use ppp its either for L2TP ipsec or PPoE or other, you will see the users up-time with the command: /ppp active print. What I do not understand is why you try to use netwatch. No need to look at /ppp secret . Only if you like to get a list of all users online or not. You can also ...
by Jotne
Sat Mar 06, 2021 3:08 pm
Forum: Scripting
Topic: modify a 3rd part script [SOLVED]
Replies: 9
Views: 578

Re: modify a 3rd part script [SOLVED]

If you like to remove a group of DNS you could add a linke like this: ip dns static remove [find where name~"googleadservices"] See complete script. # Script to download adblock list # https://www.micu.eu/adblock/adblock.php # :log warning "starting adblock update" :delay 2 :log ...
by Jotne
Sat Mar 06, 2021 12:20 pm
Forum: Scripting
Topic: since in netwatch
Replies: 9
Views: 450

Re: since in netwatch

You did not reply to what the goal is. Time since what?
Can you not use the uptime in ppp active?
And what is your configuration of netwatch?
Some manual setup stuff, or some scripted thing.
by Jotne
Sat Mar 06, 2021 10:51 am
Forum: Scripting
Topic: since in netwatch
Replies: 9
Views: 450

Re: since in netwatch

What are you trying to do, what is the goal? Do you need client uptime? Also use better formatting (tab etc) and code tags when posing code. </> button above the post. Do not quote the whole post above your. Reply using Post Reply under the post. You are also overuse the on-error . It will not fail ...
by Jotne
Fri Mar 05, 2021 10:18 pm
Forum: Scripting
Topic: Email Script When Interface Status Change (Running or Not Running) [SOLVED]
Replies: 12
Views: 662

Re: Email Script When Interface Status Change (Running or Not Running) [SOLVED]

Its written in the post. it will run the line :put "change to xxxx", that can be change to email a message. Replace with some like these two lines /tool e-mail send to=youremail@gmail.com subject="Host is D own" from=youremail@gmail.com port=587 start-tls=yes user=youremail@gmail...
by Jotne
Fri Mar 05, 2021 5:17 pm
Forum: Scripting
Topic: Email Script When Interface Status Change (Running or Not Running) [SOLVED]
Replies: 12
Views: 662

Re: Email Script When Interface Status Change (Running or Not Running) [SOLVED]

Anav did send me a private email to my email asking for something.
It has nothing to do with this post :)
by Jotne
Fri Mar 05, 2021 3:57 pm
Forum: Scripting
Topic: Email Script When Interface Status Change (Running or Not Running) [SOLVED]
Replies: 12
Views: 662

Re: Email Script When Interface Status Change (Running or Not Running) [SOLVED]

You can send email directly to user when they have added email to their profile.
by Jotne
Thu Mar 04, 2021 9:30 pm
Forum: RouterOS v7 BETA
Topic: v7.1beta4 [development] is released!
Replies: 186
Views: 24850

Re: v7.1beta4 [development] is released!

Still not mentioned that it has alpha/beta quality firmware.
Nearly all electronic product I do buy, I need to upgrade before use, but this product does not have any released firmware and that is not very good.
by Jotne
Thu Mar 04, 2021 9:24 pm
Forum: Scripting
Topic: Email Script When Interface Status Change (Running or Not Running) [SOLVED]
Replies: 12
Views: 662

Re: Email Script When Interface Status Change (Running or Not Running) [SOLVED]

:global currentIP; ... This script tests the for change of IP, not if interface is running or not that Op requested. This will test status of interface ether1. If status changes, it will run the line :put "change to xxxx" , that can be change to email a message. :global ifstatus :if ([/in...
by Jotne
Thu Mar 04, 2021 12:11 pm
Forum: RouterOS v7 BETA
Topic: v7.1beta4 [development] is released!
Replies: 186
Views: 24850

Re: v7.1beta4 [development] is released!

You will not get any answer on this, but since they have sold product that can not use version 6.x, only 7.x, it should not be to may years to wait.
by Jotne
Wed Mar 03, 2021 3:47 pm
Forum: RouterOS v7 BETA
Topic: v7.1beta4 [development] is released!
Replies: 186
Views: 24850

Re: v7.1beta4 [development] is released!

I currently run 7.1beta5 and have the following issue:
Do you have a not yet released version from MT?
by Jotne
Wed Mar 03, 2021 8:07 am
Forum: Scripting
Topic: else -if
Replies: 6
Views: 340

Re: else -if

Then you just use and &&
:if ($test1="true"&&test2="true") do={
   # do some here
}
PS no need to quote the whole post above your. Use Post Reply button at the bottom of the post
by Jotne
Tue Mar 02, 2021 11:26 pm
Forum: Scripting
Topic: else -if
Replies: 6
Views: 340

Re: else -if

Script can be used to nearly all tings, but do not use ping to test for ip up, use netwatch.
https://wiki.mikrotik.com/wiki/Manual:Tools/Netwatch

Do search forum here for example
by Jotne
Tue Mar 02, 2021 3:53 pm
Forum: Scripting
Topic: Find a network for an ip address which you don't know [SOLVED]
Replies: 4
Views: 241

Re: Find a network for an ip address which you don't know [SOLVED]

Where do you find the partial address 192.168.1. ?
What gives this type of output?
by Jotne
Tue Mar 02, 2021 3:31 pm
Forum: Scripting
Topic: else -if
Replies: 6
Views: 340

Re: else -if

Yes you can use as many if and else you like.

Example
:if (version>=6.5) do={
	# Do some stuff
} else={
	# Do some other stuff
	:if (host=27) do={
		# Do some other stuff here
	}
}
by Jotne
Tue Mar 02, 2021 10:57 am
Forum: Scripting
Topic: Advanced kid control script help
Replies: 2
Views: 115

Re: Advanced kid control script help

Nearly everything can be down with script, but this sounds some complicated.
If I start to block my kids internet, they will use their cellular or their friends cellular internet ...
by Jotne
Tue Mar 02, 2021 10:21 am
Forum: Scripting
Topic: Excluding dynamic entries from [ find ]
Replies: 3
Views: 177

Re: Excluding dynamic entries from [ find ]

Or you can use on-error.
But above solutions are better.

Not sure why you like to remove all firewall rules, can you explain what is the goal with this?
by Jotne
Mon Mar 01, 2021 10:28 pm
Forum: Scripting
Topic: check non-active PPPoE users
Replies: 4
Views: 218

Re: check non-active PPPoE users

This should give you a start. Problem is that when you try to get status from a user that is not found in /ppp active , the command will fail and break the script. To overcome this we do use on-error that will run when user is not online and command above fails. This gives all user status :local sta...
by Jotne
Mon Mar 01, 2021 7:08 pm
Forum: Scripting
Topic: check non-active PPPoE users
Replies: 4
Views: 218

Re: check non-active PPPoE users

The secret can be used for PPPoE, L2TP, ++ and Any.
So its not easy to differentiate between what user is what. To see user who is online you can just look at active connection and PPPoE service.

Using Splunk you can graph the online users. Script would be ok if you only have PPPoE users.
by Jotne
Mon Mar 01, 2021 3:33 pm
Forum: Scripting
Topic: Manipulating and comparing dates / manual wrong?
Replies: 3
Views: 172

Re: Manipulating and comparing dates / manual wrong?

If time has been available in epoc time and shown in readable format in view, calculation of time would have been easy.
by Jotne
Mon Mar 01, 2021 12:13 pm
Forum: Scripting
Topic: Manipulating and comparing dates / manual wrong?
Replies: 3
Views: 172

Re: Manipulating and comparing dates / manual wrong?

Is there a way to do what I want to do without a lot of rocket science? It can be done, buts not simple. You have to take care that in current day format of log are no equal as the rest of the logs. I have commented this several time. https://forum.mikrotik.com/viewtopic.php?p=828794#p828794 MT sho...
by Jotne
Sun Feb 28, 2021 2:50 pm
Forum: Scripting
Topic: How to control the alarm beep sound of mikrotik?
Replies: 3
Views: 197

Re: How to control the alarm beep sound of mikrotik?

Here you have som fun for your Router.

https://wiki.mikrotik.com/wiki/Super_Mario_Theme

Add this to a script and run it.
by Jotne
Sun Feb 28, 2021 10:37 am
Forum: Scripting
Topic: Remove decimal [SOLVED]
Replies: 2
Views: 186

Re: Remove decimal [SOLVED]

This loops trough the string and remove all the dots, then convert it to a number. { :local version [/system package update get installed-version] :local numVersion :for i from=0 to=([:len $version]-1) do={ :local tmp [:pick $version $i] :if ($tmp !=".") do={ :set numVersion "$numVers...
by Jotne
Fri Feb 26, 2021 1:38 pm
Forum: Scripting
Topic: what i do wrong [SOLVED]
Replies: 2
Views: 178

Re: what i do wrong [SOLVED]

Some investigation shows that the output of your command do have spaces. "1234" bytes shows as "1 234" https://forum.mikrotik.com/viewtopic.php?t=122489 I have cleaned up the script in that thread some. Cut and past this to command line. (to create a function) :global removeSpace...
by Jotne
Fri Feb 26, 2021 10:31 am
Forum: Scripting
Topic: modify a 3rd part script [SOLVED]
Replies: 9
Views: 578

Re: modify a 3rd part script [SOLVED]

You are welcome. PS no need to quote the post above you. Use the Post Reply button under det post Here is how it looks like after 15 hours of use. 445 blocked access on 124 different sites. (Using Splunk see my signature) block.jpg Top blocked site: site count settings-win.data.microsoft.com 44 www....
by Jotne
Thu Feb 25, 2021 10:31 pm
Forum: Scripting
Topic: modify a 3rd part script [SOLVED]
Replies: 9
Views: 578

Re: modify a 3rd part script [SOLVED]

Cleaned up the original script some (better tabs, removed not needed ;) and added example to remove stuff from the list. # Script to download adblock list # https://www.micu.eu/adblock/adblock.php # :log warning "starting adblock update" :delay 2 :log warning "downloading adblock"...
by Jotne
Thu Feb 25, 2021 5:37 pm
Forum: Scripting
Topic: modify a 3rd part script [SOLVED]
Replies: 9
Views: 578

Re: modify a 3rd part script [SOLVED]

If it s just to remove an entry from the DNS list, add this to the bottom of the script.
ip dns static remove [find where name="aarki.com"] 
Take care, this script will remove all DNS you have added your self with IP 127.0.0.1
by Jotne
Thu Feb 25, 2021 11:48 am
Forum: Scripting
Topic: Global variable not retained in script [SOLVED]
Replies: 2
Views: 151

Re: Global variable not retained in script [SOLVED]

You need to declare global variable at the top of the script, or else it does not work. I did just post the same answer yesterday: https://forum.mikrotik.com/viewtopic.php?f=9&t=172891 :global gIsReconnecting /log info message="gIsReconnecting before: $gIsReconnecting" :if ( $gIsReconn...
by Jotne
Tue Feb 23, 2021 10:42 pm
Forum: Scripting
Topic: Script Contents Run Manually but Not from Run Script Button [SOLVED]
Replies: 2
Views: 202

Re: Script Contents Run Manually but Not from Run Script Button [SOLVED]

Simple to solve. You need to declare the global variable before it can be seen by a script, so change to: :global RadIncReq :global RadIncReqLast :if ($RadIncReq>$RadIncReqLast) do={ /tool fetch mode=https url="https://hooks.slack.com/services/real-token-removed" http-method=post http-data...
by Jotne
Tue Feb 23, 2021 5:39 pm
Forum: Scripting
Topic: get src ip from destination in firewall
Replies: 3
Views: 187

Re: get src ip from destination in firewall

You are missing quotes. Try
:put [/ip firewall nat find where dst-address="192.168.0.0/16"]
So this should give what you looking for:
:put [/ip firewall nat get [find where dst-address="192.168.0.0/16"] src-address] 
by Jotne
Tue Feb 23, 2021 1:09 pm
Forum: Scripting
Topic: get src ip from destination in firewall
Replies: 3
Views: 187

Re: get src ip from destination in firewall

Do you get any output from running this form command prompt
:put [/ip firewall nat find where dst-address=192.168.0.0/16]
by Jotne
Tue Feb 23, 2021 11:33 am
Forum: Scripting
Topic: Disable/Enable of port
Replies: 1
Views: 108

Re: Disable/Enable of port

This will disable interface and wait two seconds before it set to enable when there are noe link. I would have examined what the problem is and try to solve it before adding some script like this. Schedule it to run every 1 min (f.eks) /interface ethernet monitor ether3 once do={ :if ($status = &quo...
by Jotne
Tue Feb 23, 2021 11:19 am
Forum: Scripting
Topic: DynDNS Script from Mikrotik Wiki (correction)
Replies: 6
Views: 3926

Re: DynDNS Script from Mikrotik Wiki (correction)

I guess, you have 6.48.1 and Cloud should be there.

In Winbox (3.27) it looks like this:
cloud.jpg
cloud.jpg
by Jotne
Tue Feb 23, 2021 11:13 am
Forum: Scripting
Topic: Troubleshoot Script
Replies: 1
Views: 78

Re: Troubleshoot Script

Master/slave interface are no longer used in newer software.

So downgrade your device to 6.40.2. Install working config (config in this post).
Upgrade to lastes RouterOS (6.47.9 or 6.48.1)
Then export your config with the new interface setting configured correctly.
by Jotne
Tue Feb 23, 2021 11:06 am
Forum: Scripting
Topic: LTE Network mode check
Replies: 5
Views: 2138

Re: LTE Network mode check

by Jotne
Mon Feb 22, 2021 11:08 pm
Forum: Scripting
Topic: Two Scripts need deciphering.
Replies: 4
Views: 248

Re: Two Scripts need deciphering.

Nested if is no problem, some like this should do:
:if (test1="yes") do={
	if (test2="no) do={
		:put "test1=yes and test2=no"
		}
	}
by Jotne
Mon Feb 22, 2021 12:39 pm
Forum: Scripting
Topic: Interface Rate script
Replies: 2
Views: 193

Re: Interface Rate script

This should help you out some. F.eks your default speed on ethernet 1 is 1Gbps speed. Add this to a script, and schedule it to run every minute. Change this part ":put "ether1 is NOT 1Gbps" to some that sends email (do a search here on the forum on how to send email) /interface ethern...
by Jotne
Sun Feb 21, 2021 5:54 pm
Forum: Scripting
Topic: Something will makes me crazy with tool/netwatch
Replies: 3
Views: 223

Re: Something will makes me crazy with tool/netwatch

You should try to fix the problem with device disconnect (if possible) instead of rebooting the router.
PS No need to quote the post above you. Use <Post Reply> button.
by Jotne
Sun Feb 21, 2021 10:26 am
Forum: Useful user articles
Topic: Tool: Using Splunk to analyse MikroTik logs 3.2 (Graphing everything) Topic is solved
Replies: 373
Views: 160180

Re: Tool: Using Splunk to analyse MikroTik logs 3.2 (Graphing everything) Topic is solved

Splunk for MikroTik updated to v3.2 This version contains most tweaks and fixes. To upgrade, delete the folder /splunk/etc/app/Mikrotik Then install the unpacked spl (use winrar/winzip) file, install app from "Manage app" -> "Install app from file" To get the most out of this ver...
by Jotne
Fri Feb 19, 2021 2:47 pm
Forum: Announcements
Topic: v6.48.1 [stable] is released!
Replies: 104
Views: 20206

Re: v6.48.1 [stable] is released!

So if you have no control of the client, webproxy is useless.
by Jotne
Fri Feb 19, 2021 8:03 am
Forum: Announcements
Topic: v6.48.1 [stable] is released!
Replies: 104
Views: 20206

Re: v6.48.1 [stable] is released!

As far as I understand, webproxy does not work on https site, so there are no use for it any more since nearly all site are https.
by Jotne
Thu Feb 18, 2021 9:02 pm
Forum: Scripting
Topic: How to convert any error log to script ?!
Replies: 2
Views: 197

Re: How to convert any error log to script ?!

Look at these posts:
viewtopic.php?t=140640
viewtopic.php?t=158680
May also be other good posts.
by Jotne
Thu Feb 18, 2021 1:44 pm
Forum: Scripting
Topic: Importing a hAP AC lite script into the hAP AC^2?
Replies: 8
Views: 347

Re: Importing a hAP AC lite script into the hAP AC^2?

Ok, so you have posted config of the router, not a script.

Id the problem is to get config from old router to new router, try to copy group by group of commands until it fails.
Then post her what does fail.

As Normis writes, the config should be rather equal on those two boxes.
by Jotne
Thu Feb 18, 2021 11:52 am
Forum: Scripting
Topic: Importing a hAP AC lite script into the hAP AC^2?
Replies: 8
Views: 347

Re: Importing a hAP AC lite script into the hAP AC^2?

And how does the script looks like?

Post it using code tags button </>
Cut and past scrip to post, select script and click the code button above the post.
by Jotne
Wed Feb 17, 2021 12:57 pm
Forum: RouterOS v7 BETA
Topic: v7.1beta4 [development] is released!
Replies: 186
Views: 24850

Re: v7.1beta4 [development] is released!

Maybe this discussion should be in another thread?
by Jotne
Mon Feb 15, 2021 10:50 pm
Forum: Scripting
Topic: ARP Watch Script
Replies: 6
Views: 3320

Re: ARP Watch Script

Script is ok, but do miss som = after do.
I do mostly get the same information from my DHCP script.
This script do also get the interface or bridge info and info from devices with static IP.
DHCP gives more info about the device.
by Jotne
Mon Feb 15, 2021 1:14 pm
Forum: Scripting
Topic: ARP Watch Script
Replies: 6
Views: 3320

Re: ARP Watch Script

It was posted in 2013, so not sure OP is still using this forum :) In short, it just create and updates an arp table list that sends log and email when new stuff appears or changes. Se my comments in the script (just a quick review, may be som errors.) PS you can also send the DHCP logs to get more ...
by Jotne
Sun Feb 14, 2021 12:39 pm
Forum: Scripting
Topic: How can I sum the limits-at of all child queues?
Replies: 6
Views: 427

Re: How can I sum the limits-at of all child queues?

What not continue in this thread?
viewtopic.php?f=9&t=172555
by Jotne
Sat Feb 13, 2021 8:05 pm
Forum: Scripting
Topic: Sum values obtained with foreach
Replies: 3
Views: 251

Re: Sum values obtained with foreach

Split the data inn to two variables (do not need to use global her so use local variable)
Then sum up
https://wiki.mikrotik.com/wiki/Manual:S ... _Operators
by Jotne
Sat Feb 13, 2021 5:19 pm
Forum: Announcements
Topic: v6.47.9 [long-term] is released!
Replies: 65
Views: 12997

Re: v6.47.9 [long-term] is released!

Didn't memory issue appear in 6.48 branch, not 6.47? I upgraded all my devices to 6.47.9 with no immediate issues. Memory leakage may have come with the fist version of 6.47 (that wast the first with DoH support), but since not everyone measure memory level its not easy say when it was there first ...
by Jotne
Fri Feb 12, 2021 11:49 pm
Forum: Announcements
Topic: v6.47.9 [long-term] is released!
Replies: 65
Views: 12997

Re: v6.47.9 [long-term] is released!

With 6.47.9, there is currently no indication of memory leaking when DoH is used.
That is a plus, but strange it was not in the change log.
by Jotne
Fri Feb 12, 2021 10:31 am
Forum: Wireless Networking
Topic: use Mikrotik as wireless ethernet bridge
Replies: 11
Views: 5057

Re: use Mikrotik as wireless ethernet bridge

An update on this. You will not get this to work as an transparent bridge with other devices like Cisco. Read about 802.11 limitations for L2 bridging here: https://wiki.mikrotik.com/wiki/Manual:Wireless_Station_Modes Workaround is to use NAT on AP. Client will work, but then its not a true bridge.
by Jotne
Thu Feb 11, 2021 9:48 pm
Forum: Announcements
Topic: v6.47.9 [long-term] is released!
Replies: 65
Views: 12997

Re: v6.47.9 [long-term] is released!

I did not find where to report bugs so...
Correct is to send this to support@mikrotik.com
This forum is mostly a user forum.
by Jotne
Wed Feb 10, 2021 9:57 pm
Forum: Scripting
Topic: local dictionary variable persisting between runs [SOLVED]
Replies: 14
Views: 930

Re: local dictionary variable persisting between runs [SOLVED]

Its not irrelevant. To solve problem its good to have as much information as possible. There even may be an other much better solution that OP has thought of
by Jotne
Wed Feb 10, 2021 11:00 am
Forum: Scripting
Topic: Ipv6 good firewall rules?
Replies: 2
Views: 214

Re: Ipv6 good firewall rules?

You have posted this in the script section on the forum so you may not get as many reply as you like.
RB has a set of default rules for ipv6 that works fine.
by Jotne
Wed Feb 10, 2021 10:57 am
Forum: Announcements
Topic: v6.48.1 [stable] is released!
Replies: 104
Views: 20206

Re: v6.48.1 [stable] is released!

it's better?
I do see the same on my RB 750G v3
Why do not not see Temperature/Voltage? I do see it on 6.48.0
Have you also upgraded routerboard firmware to 6.48.1 and rebootet?
by Jotne
Wed Feb 10, 2021 10:53 am
Forum: Scripting
Topic: local dictionary variable persisting between runs [SOLVED]
Replies: 14
Views: 930

Re: local dictionary variable persisting between runs [SOLVED]

Why do you like to store this on the router? Why not use a Radius server.
by Jotne
Tue Feb 09, 2021 10:54 pm
Forum: Scripting
Topic: local dictionary variable persisting between runs [SOLVED]
Replies: 14
Views: 930

Re: local dictionary variable persisting between runs [SOLVED]

What I'm actually trying to do is somethng like this. I have a function that returns a dictionary based on preset values, depending on what's requested. Not all entries have the same keys present. For example, a directory listing with name, phones, addresses and other info. Bob has a name, address ...
by Jotne
Tue Feb 09, 2021 10:46 pm
Forum: Scripting
Topic: Automatic startup mikrotik
Replies: 3
Views: 295

Re: Automatic startup mikrotik

Hello,
Is there any way to startup a mikrotik with a script, or somethings?
Should be simple to just write a script that disable/enable interfaces on the router. No need to shutdown/boot the router.
by Jotne
Tue Feb 09, 2021 12:17 pm
Forum: Announcements
Topic: v6.47.9 [long-term] is released!
Replies: 65
Views: 12997

Re: v6.47.9 [long-term] is released!

Do a search in goolge (or at the forum) for "mikrotik doh memory leak"
Yes it work, but have a look of used memory every day and you see it goes up and down.

Eks
viewtopic.php?p=804384#p804384
by Jotne
Tue Feb 09, 2021 12:13 pm
Forum: Scripting
Topic: Please help to see this script for batch adding add-list [SOLVED]
Replies: 3
Views: 271

Re: Please help to see this script for batch adding add-list [SOLVED]

:for i from=1 to=50 do:{/ip firewall address-list add list="user_$i" address="172.16.1.$(($i*5)-4)-172.16.1.$($i*5)"} At least on bug in you line. Do needs = behind it. :for i from=1 to=50 do={/ip firewall address-list add list="user_$i" address="172.16.1.$(($i*5)...
by Jotne
Tue Feb 09, 2021 11:53 am
Forum: Announcements
Topic: v6.47.9 [long-term] is released!
Replies: 65
Views: 12997

Re: v6.47.9 [long-term] is released!

I cant see memory leak on DoH is in the fixed log!!!
Until its fixed, I do not recommend use DoH
by Jotne
Mon Feb 08, 2021 6:32 pm
Forum: Announcements
Topic: v6.48.1 [stable] is released!
Replies: 104
Views: 20206

Re: v6.48.1 [stable] is released!

What is this option for then ??? You should not trust it, alt least not from public internet. Some time ago thousands of router was hacked trough bug in software using WinBox port!!!! From internet, you should use VPN. I VPN is not an option at all, then follow this: 1. Use another port than defaul...
by Jotne
Mon Feb 08, 2021 12:56 pm
Forum: Scripting
Topic: Login Script - Sent empty Mail
Replies: 2
Views: 168

Re: Login Script - Sent empty Mail

Can you post the script from cli using /export
Hard to read it this way.
by Jotne
Fri Feb 05, 2021 1:35 pm
Forum: Scripting
Topic: Print Command
Replies: 4
Views: 1414

Re: Print Command

Not exactly sure what you like to do. This will get all interface in to array list and then print it: { :local list /interface ethernet :foreach i in=[find] do={ :set list ($list,[get $i name]) } :put $list } ether1;ether2;ether3;ether4;ether5 I do not think you can use as-value with multi line. Thi...
by Jotne
Fri Feb 05, 2021 11:54 am
Forum: Announcements
Topic: v6.48.1 [stable] is released!
Replies: 104
Views: 20206

Re: v6.48.1 [stable] is released!

Is DoH memory leakage fix?
by Jotne
Fri Feb 05, 2021 10:52 am
Forum: RouterOS v7 BETA
Topic: v7.1beta4 [development] is released!
Replies: 186
Views: 24850

Re: v7.1beta4 [development] is released!

Looks like export still hangs... Can confirm, tested on hAP ac^2 with clean and minimal configuration (around 20 lines) # feb/05/2021 09:48:31 by RouterOS 7.1beta4 # software id = C38F-6NNH # # model = RBD52G-5HacD2HnD # serial number = BEED0Bxxxxxx /interface bridge add name=bridge1 vlan-filtering...
by Jotne
Wed Feb 03, 2021 9:16 pm
Forum: Announcements
Topic: v6.49beta [testing] is released!
Replies: 48
Views: 9982

Re: v6.49beta [testing] is released!

No fix for DoH memory leak yet? I agree, I was also waiting for a DoH memory leak fix. I am waiting for a DoH memory fix for 6.48 not a new beta. Also waiting for 7.x release not a new 6.49beta Fix what is broken before a sending out a new beta release for a new train. This version does nearly not ...
by Jotne
Wed Feb 03, 2021 12:28 pm
Forum: Announcements
Topic: v6.48 [stable] is released!
Replies: 324
Views: 62405

Re: v6.48 [stable] is released!

They need to get v7 out, since they have sold routers with v7 beta on it. As we all know, beta should not be used in production.
+1 for stop 6.x train and keep focus and get v7 out.
by Jotne
Wed Feb 03, 2021 9:48 am
Forum: Announcements
Topic: v6.48 [stable] is released!
Replies: 324
Views: 62405

Re: v6.48 [stable] is released!

Proud zero since 2013 ;)
You have then been here long (since 27 Sep 2013, 11:24) and not posted much :)
If I look at your statistic, you have 6 post , first post 12.01.2021 (But there may be other counting errors)
by Jotne
Tue Feb 02, 2021 7:25 pm
Forum: Announcements
Topic: v6.48 [stable] is released!
Replies: 324
Views: 62405

Re: v6.48 [stable] is released!

Hmm, are some wrong with the forum as well? (or just in this thread)

Both Cray, morphema and stevenb are all listed with Posts: 0
by Jotne
Tue Feb 02, 2021 7:19 pm
Forum: Scripting
Topic: undefined variables
Replies: 6
Views: 1735

Re: undefined variables

Its already posted above on how to test for a variable.
:if ( $strVar = "" ) do= { .... }
by Jotne
Tue Feb 02, 2021 8:29 am
Forum: Scripting
Topic: local dictionary variable persisting between runs [SOLVED]
Replies: 14
Views: 930

Re: local dictionary variable persisting between runs [SOLVED]

Not sure what you try to do. What is your goal? Have a look at the variable test after each run and you see that it will be updated. So you are actually editing the test variable/script for each run. You are adding new kv pair to the variable value within the script. 1 run. ;(eval / (eval /localname...
by Jotne
Sat Jan 30, 2021 1:12 pm
Forum: Scripting
Topic: Persistent Environment Variables
Replies: 4
Views: 486

Re: Persistent Environment Variables

OP did not want a script or using scheduling.

I agree that there should be a way to set persistent variables that survives reboot.
You can add a fw rule it stays trough a reboot, so should a persistent variable do as well.
by Jotne
Tue Jan 26, 2021 6:58 pm
Forum: Scripting
Topic: Script Error
Replies: 3
Views: 265

Re: Script Error

Since all are done in the same command folder you can go to the command folder and shorten all commands. Eks: :local testDomain "www.google.com" /ip firewall nat :if ([get [find comment="DNS - Redirect all DNS requests to pihole"] disabled] = false) do={ :do { :resolve $testDomai...
by Jotne
Tue Jan 26, 2021 8:45 am
Forum: RouterOS v7 BETA
Topic: Any chance to install ROS6 on Chateau 12?
Replies: 6
Views: 948

Re: Any chance to install ROS6 on Chateau 12?

I am some surprised that MT sells product with only Beta software. This tells me that MT must speed up in releasing v7. Not sure if that is good or bad for the release of v7.
by Jotne
Tue Jan 26, 2021 8:38 am
Forum: Scripting
Topic: PPPOE with auto mangle and queue tree
Replies: 4
Views: 330

Re: PPPOE with auto mangle and queue tree

Why not set limit to profile and add user to various profile groups with different speed limit?
by Jotne
Tue Jan 26, 2021 8:34 am
Forum: Scripting
Topic: Admin script in jobs after log in [SOLVED]
Replies: 4
Views: 404

Re: Admin script in jobs after log in [SOLVED]

On what version do you see this problem? Older version of Mikrotik are vulnerable for attack using Winbox. What are listed in the Script tab? Upgrade all routers to at least 6.45, I would suggest 6.47.9 Do you have access to the router using public IP to Winbox? You should use VPN instead. If you ne...
by Jotne
Thu Jan 21, 2021 5:18 pm
Forum: Beginner Basics
Topic: Find specific NAT rule
Replies: 7
Views: 506

Re: Find specific NAT rule

You need to find the rule, then set the port, so Set command /ip firewall nat set "rule number" to-port=12345 To find the "rule number" /ip firewall nat find where comment="TEST RULE" So combined /ip firewall nat set [/ip firewall nat find where comment="TEST RULE&...
by Jotne
Tue Jan 19, 2021 11:01 am
Forum: Scripting
Topic: Static Ip hostname insert into comment
Replies: 1
Views: 185

Re: Static Ip hostname insert into comment

Just some comment to your script. No need for ; after each line. Only when there are multiple commands on same line. Loops are normally in {} , not [] . (I see that it works). If you go to a location like /ip dhcp-server lease , you can skip the path for the rest of the line where its used. /ip dhcp...
by Jotne
Sat Jan 16, 2021 8:41 am
Forum: Scripting
Topic: Enable winbox service via api
Replies: 18
Views: 1206

Re: Enable winbox service via api

you can use console cable login
Do the 960pgs has console cable. I do not see that on any picture of it.
https://mikrotik.com/product/RB960PGS
by Jotne
Fri Jan 15, 2021 8:53 pm
Forum: Scripting
Topic: Enable winbox service via api
Replies: 18
Views: 1206

Re: Enable winbox service via api

Via Lan, you should normally be able to use Winbox, if some one has not shut that down.
by Jotne
Fri Jan 15, 2021 9:42 am
Forum: Beginner Basics
Topic: Find specific NAT rule
Replies: 7
Views: 506

Re: Find specific NAT rule

To use it in a script, use find: /ip firewall nat find where dst-port="55882" To test it out and see what rune number it is: :put [/ip firewall nat find where dst-port="55882"] But in a script rule number changes, so to get the line: :put [/ip firewall nat get [/ip firewall nat f...
by Jotne
Fri Jan 15, 2021 8:17 am
Forum: Scripting
Topic: Enable winbox service via api
Replies: 18
Views: 1206

Re: Enable winbox service via api

Take care. You should not have any port open over the internet open for management. Nor SSH/Winbox or API. (many MT Router has been hacked this way) Using VPN i an ok solution (with certificates) If that cant be done and you need a port open over internet. 1. Use another port than default. 2. Use po...
by Jotne
Thu Jan 14, 2021 9:14 pm
Forum: Scripting
Topic: Scripting - FIND with Wildcard
Replies: 11
Views: 12475

Re: Scripting - FIND with Wildcard

Double escape the dot. You can also remove the ; at end of each line (only needed when multiple commands on same line). { :local mm "01" :local yyyy 2021 :foreach FILE in=[/file find name~"^disk1/backups/$yyyy-$mm/.+\\.txt\$" ] do={ :local name [/file get $FILE name] :put $name }...
by Jotne
Wed Jan 13, 2021 11:34 pm
Forum: Scripting
Topic: local server failover
Replies: 3
Views: 361

Re: local server failover

This may do. (Not tested) Avoid having multiple commands on same line and use tab for if and tests. Looks better and easier to read. Script should only run change to up part if it was down before, and not all time. :local status true :if ([/ping 192.168.0.249 count=5]=0) do={ :log info "SERVER1...
by Jotne
Wed Jan 13, 2021 3:54 pm
Forum: Scripting
Topic: Mail DHCP-leases
Replies: 3
Views: 325

Re: Mail DHCP-leases

You also do not need ; at end of all line. Semicolon need to be used when you have multiple commands on same line. Add TAB for all loops etc. Makes it simpler to read and understand. :local i :local hostip :local hostname :local dhcplist "" :local date [/system clock get date] :local time ...
by Jotne
Sat Jan 09, 2021 9:43 am
Forum: Announcements
Topic: MikroTik newsletter November 2020 (#98)
Replies: 64
Views: 13865

Re: MikroTik newsletter November 2020 (#98)

This seems to be some off topic for "MikroTik newsletter November 2020 " create a new thread.
by Jotne
Fri Jan 08, 2021 7:52 pm
Forum: Beginner Basics
Topic: Basic Understanding Bridge, VLAN, Switch, ... [SOLVED]
Replies: 23
Views: 1848

Re: Basic Understanding Bridge, VLAN, Switch, ... [SOLVED]

Have a look at my thread here:
viewtopic.php?t=138232
I did learn how the new one bridge for all vlan did work, step by step.
by Jotne
Wed Jan 06, 2021 9:51 pm
Forum: Scripting
Topic: reboot router if pppoe server client count=0
Replies: 3
Views: 322

Re: reboot router if pppoe server client count=0

So when router comes up, it will still have client count=0 and will be rebootet again? Bootloop.
You should try to fix/find the problem so you do not need reboot.
by Jotne
Tue Jan 05, 2021 6:49 pm
Forum: RouterOS v7 BETA
Topic: v7.1beta3 [development] is released!
Replies: 262
Views: 43126

Re: v7.1beta3 [development] is released!

I had to revert back to beta2 for the following reasons:
It sounds like you are using it in a production environment? This is just beta. :)
by Jotne
Mon Jan 04, 2021 2:14 pm
Forum: Announcements
Topic: v6.48 [stable] is released!
Replies: 324
Views: 62405

Re: v6.48 [stable] is released!

This is most likely due to DoH function, because my secondary router wAP ac don't have same problem.
If you did read this thread, you will see that I posted the same here:
viewtopic.php?p=837044#p837044

MT will try to fix it for the next release.
by Jotne
Sun Jan 03, 2021 9:32 am
Forum: Announcements
Topic: v6.48 [stable] is released!
Replies: 324
Views: 62405

Re: v6.48 [stable] is released!

Image
Do not post link to image. Upload them to the forum use the Attachments button below the post window. It will then stay in the forum.
by Jotne
Sat Jan 02, 2021 9:46 pm
Forum: Announcements
Topic: v6.48 [stable] is released!
Replies: 324
Views: 62405

Re: v6.48 [stable] is released!

6.46.8 LTS --> 6.48 Stable --> 6.46.8 LTS
Did you also upgrade the firmware.
by Jotne
Thu Dec 31, 2020 8:10 am
Forum: Announcements
Topic: v6.48 [stable] is released!
Replies: 324
Views: 62405

Re: v6.48 [stable] is released!

Found change in logging that was not mention in the DHCP logs. &MT Please also list these type of changes as well, since my Splunk for Mikrotik did stop showing DHCP logs due to this. Its positive that you finally have stated to clean up the logs mess :) https://forum.mikrotik.com/viewtopic.php?...
by Jotne
Wed Dec 30, 2020 1:06 pm
Forum: Scripting
Topic: Pseudo Random Number Generator Script (Mersenne Twister)
Replies: 10
Views: 9957

Re: Pseudo Random Number Generator Script (Mersenne Twister)

Use Certificate generator to make your random number.

viewtopic.php?t=164114

Script here:
viewtopic.php?p=824660#p824660
by Jotne
Wed Dec 30, 2020 12:56 pm
Forum: Announcements
Topic: v6.48 [stable] is released!
Replies: 324
Views: 62405

Re: v6.48 [stable] is released!

DoH does definitely have a memory problem. After turning it off for one day, this is how my memory logs looks like on my hEX.
Support case created. SUP-37699
.
memory2.jpg
by Jotne
Tue Dec 29, 2020 4:17 pm
Forum: Announcements
Topic: v6.48 [stable] is released!
Replies: 324
Views: 62405

Re: v6.48 [stable] is released!

DoH Turned off, so will see after some days if memory stabilise it self.

@Normis. Thanks, Image uploaded :)
by Jotne
Tue Dec 29, 2020 2:57 pm
Forum: Announcements
Topic: v6.48 [stable] is released!
Replies: 324
Views: 62405

Re: v6.48 [stable] is released!

DoH related memory leak reported in SUP-31833 is not fixed in this release.
Hmm, you can guess from the graph when I turned on DoH!!
Open space at the end is when I upgraded to 6.48 and you see memory goes up after upgrade as well.
memory.jpg
by Jotne
Sun Dec 27, 2020 8:42 pm
Forum: General
Topic: Mikrotik device behind limited ISP modem
Replies: 15
Views: 1111

Re: Mikrotik device behind limited ISP modem

For option 2, do you mean to bridge all interfaces and assign an IP to the bridge
on the same subnet as the ISP device?
Yes. Your MT Router will just be a switch with management.
by Jotne
Sun Dec 27, 2020 1:06 pm
Forum: Scripting
Topic: Search and select best AP !!!
Replies: 3
Views: 404

Re: Search and select best AP !!!

Best in what way. Largest? Most powerfull? Fewest clients connected?

Client will normally select the most powerfull access point by it self.
by Jotne
Sat Dec 26, 2020 9:38 pm
Forum: General
Topic: Mikrotik device behind limited ISP modem
Replies: 15
Views: 1111

Re: Mikrotik device behind limited ISP modem

There are two way to get rid of double nat.
1. ISP sets its modem in bridge mode.
2. You du use your MikroTik router as an Bridge/Switch, no nat at all.
by Jotne
Fri Dec 25, 2020 7:42 pm
Forum: Scripting
Topic: Auto update problems
Replies: 3
Views: 445

Re: Auto update problems

Here is an good example why you should not auto upgrade.

viewtopic.php?p=836297#p836297
by Jotne
Fri Dec 25, 2020 7:33 pm
Forum: Scripting
Topic: Getting wireless interface rx signal-strength
Replies: 14
Views: 5931

Re: Getting wireless interface rx signal-strength

Every thing you get an output from can be sent as an email. I have not worked with email sending, so cant help you with that part. Have seen various post here on the forum on how to setup email, so should be possible. I do use Splunk to monitor this. There I can look at any give time period. If you ...
by Jotne
Thu Dec 24, 2020 5:31 pm
Forum: General
Topic: Difference between Winbox and Terminal
Replies: 5
Views: 483

Re: Difference between Winbox and Terminal

No, there are lots of stuff in mixed places there as well. PPPoE Server are just one of them.
Same with the logging prefix that I was told in an Support request that they will lock at and maybe fix......
by Jotne
Thu Dec 24, 2020 8:18 am
Forum: Scripting
Topic: Auto update problems
Replies: 3
Views: 445

Re: Auto update problems

Ï would never ever do an auto upgrade on routerOS. There has been so many times that stuff has gone wrong after update. You should have some form of remote check. If external webserver says no, do not update, if yes, then update should be done. This way you could delay update until you are sure you ...
by Jotne
Thu Dec 24, 2020 7:59 am
Forum: General
Topic: Difference between Winbox and Terminal
Replies: 5
Views: 483

Re: Difference between Winbox and Terminal

Yes I did find it, but should be simple for MT to fix it, so why not?
by Jotne
Wed Dec 23, 2020 7:57 pm
Forum: General
Topic: Difference between Winbox and Terminal
Replies: 5
Views: 483

Difference between Winbox and Terminal

Why are not the configuration at the same location in Winbox and Terminal. This is just one of many example. PPPoE Server Winbox its located under PPP menu Telnet , you find it under /interface pppoe-server In Winbox there are an Interface menu, so why no PPPoE Server? In Telnet there are a PPP menu...
by Jotne
Wed Dec 23, 2020 1:24 pm
Forum: Announcements
Topic: v6.48 [stable] is released!
Replies: 324
Views: 62405

Re: v6.48 [stable] is released!

Nice Christmas present :)
by Jotne
Sun Dec 20, 2020 5:27 pm
Forum: Scripting
Topic: Verify presence of intercafe in interface list
Replies: 1
Views: 268

Re: Verify presence of intercafe in interface list

To see if you have interface ether5
/interface find where name=ether5
by Jotne
Sun Dec 20, 2020 5:14 pm
Forum: Scripting
Topic: Fail Variable declaration sintax from manual
Replies: 6
Views: 458

Re: Fail Variable declaration sintax from manual

Or
{ 
  :local myVar
  :set $myVar "Some data"
  :put $myVar
  :log info $myVar
}
Both :set myVar "my value" and :set $myVar "my value" does work fine.
by Jotne
Sat Dec 19, 2020 12:31 pm
Forum: General
Topic: Blocking facebook
Replies: 14
Views: 26745

Re: Blocking facebook

This does not prevent me from setting my own DNS in my host file. But if you at the same time redirect all DNS 53 to your server, it may help some.
But if I install DoH on my PC, I bypass this easily.
by Jotne
Fri Dec 18, 2020 6:17 pm
Forum: Useful user articles
Topic: Tool: Using Splunk to analyse MikroTik logs 3.2 (Graphing everything) Topic is solved
Replies: 373
Views: 160180

Re: Tool: Using Splunk to analyse MikroTik logs 3.1 (Graphing everything) Topic is solved

You could try this:
/system logging
add action=logserver prefix=MikroTik topics=dhcp
add action=logserver prefix=MikroTik topics=!debug,!dns
To exclude DNS logs from MT.
by Jotne
Wed Dec 16, 2020 11:31 pm
Forum: General
Topic: Help with IPv6 setup
Replies: 8
Views: 610

Re: Help with IPv6 setup

Edit: And of course the service on server must listen on IPv6 address, it's not always automatic.
That is just one of the problem. The other is that I use an ipv4 HAProxy server.
So will have to look at how to solve that.
by Jotne
Wed Dec 16, 2020 9:38 pm
Forum: General
Topic: Help with IPv6 setup
Replies: 8
Views: 610

Re: Help with IPv6 setup

Thanks again.

That did work.

For some reason I lost my Hairpin nat.

Edit, I do see when I try to ping a DNS name of an inside IP, it now reply on IPv6. Hairpin was configured for IPv4, so need some more investigation :)
by Jotne
Wed Dec 16, 2020 8:54 pm
Forum: General
Topic: Help with IPv6 setup
Replies: 8
Views: 610

Re: Help with IPv6 setup

Wow, that was simple. Seems to work. So now I have to study how stuff works.

Thanks.

Do not see ny filter rules in the ipv6 firewall filter rules.
by Jotne
Wed Dec 16, 2020 8:00 pm
Forum: General
Topic: Help with IPv6 setup
Replies: 8
Views: 610

Help with IPv6 setup

My ISP now give me IPv6. I have setup /ip dhcp client and do get an valid IPv6 addres. From router I am able to ping other IPv6. So then what is the next step to get the inside to work. Routing(do I need NAT), IPv6 DHCP server, firewall. Any one have a simple working setup or link to some? I do find...
by Jotne
Sat Dec 12, 2020 4:10 pm
Forum: Scripting
Topic: Block youtube,FB and games
Replies: 8
Views: 1329

Re: Block youtube,FB and games

HTTPS does not work with proxy server. HTTP do.
by Jotne
Wed Dec 09, 2020 5:54 pm
Forum: Scripting
Topic: Block youtube,FB and games
Replies: 8
Views: 1329

Re: Block youtube,FB and games

If this is an work environment, you can use SSL decrytion:
https://www.websense.com/content/suppor ... nable.aspx
You will in this case need to have control of all clients.
by Jotne
Wed Dec 09, 2020 3:04 pm
Forum: Scripting
Topic: Block youtube,FB and games
Replies: 8
Views: 1329

Re: Block youtube,FB and games

As long a client uses HTTPS, its close to impossible to block FB etc. L7 blocking does not work
You can try to add IP range to block liste, but IP may be used to other services and IP may change.
Block DNS will not work, client can use DOH etc.
VPN will bypass any block.
by Jotne
Wed Dec 02, 2020 3:05 pm
Forum: Scripting
Topic: To retain variable's values after reboot
Replies: 20
Views: 5324

Re: To retain variable's values after reboot

Can you show any other scripting language or programming language where defined variables magically restores their values from previous script instance, without saving data to file, registry or database? If you want to save something handle it in your code. That is not important. From my time with ...
by Jotne
Tue Dec 01, 2020 6:47 pm
Forum: Scripting
Topic: To retain variable's values after reboot
Replies: 20
Views: 5324

Re: To retain variable's values after reboot

How com storing a variable inn to the script section is less crazy than storing it in a l7 rule?
Could you post an example?

Why not just retain variable after reboot when its stored as a global variable?
by Jotne
Mon Nov 23, 2020 9:11 pm
Forum: Scripting
Topic: Removing Certificate [SOLVED]
Replies: 4
Views: 501

Re: Removing Certificate [SOLVED]

Just a comment to:
/certificate remove [ find ]
This will remove all certificate, if that is your intention

If you just want to remove some:
/certificate remove  [find where name~"cert_name"]
by Jotne
Mon Nov 23, 2020 8:51 pm
Forum: Scripting
Topic: delete address-list the best way
Replies: 5
Views: 17689

Re: delete address-list the best way

Did a test on my RB750Gv3 with an access liste with 8400 ip address, it did take just 5-6 seconds. Test was to fast done so I did not get any CPU load So I think that is is not a problem with newer routers. /ip firewall address-list remove [/ip firewall address-list find list="FW_Block_unkown_p...
by Jotne
Mon Nov 23, 2020 8:38 pm
Forum: Scripting
Topic: Get MAC address [SOLVED]
Replies: 4
Views: 509

Re: Get MAC address [SOLVED]

As Jonah writes, never ever use the ID of any object directly, it will change from time to time. Only use global variable if you need variables to work in other scripts or you like to save it outside the script for later use. So: { :local mac [/interface ethernet get [find where name="ether1&qu...
by Jotne
Sat Nov 21, 2020 1:13 pm
Forum: Announcements
Topic: MikroTik newsletter November 2020 (#98)
Replies: 64
Views: 13865

Re: MikroTik newsletter November 2020 (#98)

Please stop quoting the quoted post.

There is a big POST REPLY button blow the post. Use it reply.
If you need to quote, select only the part of the post needed to understand what your reply to.
by Jotne
Tue Nov 17, 2020 8:04 am
Forum: Scripting
Topic: Password, Pin and and Hash
Replies: 6
Views: 682

Re: Password, Pin and and Hash

Nice script. This is some that should be included in RouterOS as default. As for the script, you are not consistent with semicolon ; at the end of each line. Its only needed when there are multiple commands on same line, so it could be removed. Eks with ; :set $baseString $1; and without ; :set $has...
by Jotne
Sun Nov 15, 2020 5:39 pm
Forum: Scripting
Topic: how to get log records for last 5 mins?
Replies: 11
Views: 2739

Re: how to get log records for last 5 mins?

Hi Jotne, Thanks for the reply ! It doesn't work on mine. nov/14 21:09:57 system,info,account user brg3466 logged in from 192.168.3.25 via telnet nov/14 21:16:04 system,info,account user brg3466 logged out from 192.168.3.25 via telnet [brg3466@MikroTik] > /log pr where time>([/system clock get time...
by Jotne
Sun Nov 15, 2020 8:25 am
Forum: Scripting
Topic: how to get log records for last 5 mins?
Replies: 11
Views: 2739

Re: how to get log records for last 5 mins?

Works fine on my 6.47.7, but if there are no log last 5 min you do not get anything. PS this will not work 4 min past midnight, since date/time format changes for events. MT should change to use RFC-3164 time format everywhere. PS2, to handle lots of log, see mye Splunk fro Mikrotik, see my signature.
by Jotne
Wed Nov 11, 2020 5:51 pm
Forum: RouterOS v7 BETA
Topic: v7.1beta2 [development] is released!
Replies: 387
Views: 97358

Re: v7.1beta2 [development] is released!

I'm not an rookie.
With only 4 post here, its not easy to see :)
by Jotne
Tue Nov 10, 2020 11:39 pm
Forum: RouterOS v7 BETA
Topic: v7.1beta2 [development] is released!
Replies: 387
Views: 97358

Re: v7.1beta2 [development] is released!

Backup are used when the hardware and router os software are the same. You can try to export config and import all or if that fails, use part and part until it fails.
by Jotne
Sun Nov 08, 2020 11:50 am
Forum: Scripting
Topic: Saving SNMP to variable
Replies: 3
Views: 372

Re: Saving SNMP to variable

Only way I know is via file... Thanks for this suggestion. I did send a request about this to MT Support SUP-33094 Having a lot of file write may wear out the flash? Every command on RouterOS should be able to store data to all type of storage (Flash/Variable/log/syslog ++) So to get it to syslog i...
by Jotne
Fri Nov 06, 2020 10:24 pm
Forum: Announcements
Topic: v6.47.7 [stable] is released!
Replies: 45
Views: 11906

Re: v6.47.7 [stable] is released!

I'm tired of asking to fix snmp in the 6.47 branch.
You have sent this to support?
by Jotne
Fri Nov 06, 2020 10:12 pm
Forum: Scripting
Topic: Saving SNMP to variable
Replies: 3
Views: 372

Saving SNMP to variable

I do try to save output of Tool SNMP to a variable or send it to syslog. It does not seem to work: I need to store/send to log, the the output of: /tool snmp-walk community=public version=2c address=127.0.0.1 oid=1.3.6.1.2.1.1 Tried this, but just give output to console. { :local test [/tool snmp-wa...
by Jotne
Fri Nov 06, 2020 8:47 pm
Forum: Scripting
Topic: Mikrotik Bandwidth Monitoring for DHCP Clients
Replies: 3
Views: 560

Re: Mikrotik Bandwidth Monitoring for DHCP Clients

Just some minor observations. Every new client will create two permanent mangle rule, that stay there even after reboot. So if you have many clients that comes and goes, it will be lots of rules :) Reset script clear counters on all mangle rules, not hust the Bandwidth counter rules. May be fixed by...
by Jotne
Fri Nov 06, 2020 8:45 am
Forum: Scripting
Topic: Mikrotik Bandwidth Monitoring for DHCP Clients
Replies: 3
Views: 560

Re: Mikrotik Bandwidth Monitoring for DHCP Clients

Very interesting idea and a some good work. I do us Splunk for this, (see my signature) that logs everything in to a graphs gui. But for small scale, home use this is nice. One thing I do miss is that the script should also log each user bandwidth, so you can go back and see what clients used all yo...
by Jotne
Wed Nov 04, 2020 7:38 pm
Forum: General
Topic: Does quouting quotes of quotes in consecutive post make any sense?
Replies: 38
Views: 2908

Re: Does quouting quotes of quotes in consecutive post make any sense?

oldfashioned silver theme which is just shorter. With the old theme its easy to see what thread you have posted inn. I do not think you see that at all on the default theme. Look at the small red star at the post icon on the top post at the "Does Quoting ....." You can see with new style ...
by Jotne
Tue Nov 03, 2020 8:09 pm
Forum: General
Topic: Does quouting quotes of quotes in consecutive post make any sense?
Replies: 38
Views: 2908

Re: v6.46.8 [long-term] is released!

Autist, don't you bother about persons that sometime get upset for nothing. I am one of this nice guy, trying to help out whenever I can, BUT I am also one that get irritated when quoting the quoting the quote.... The problem is that some does not know how to post before get educated, or they just ...
by Jotne
Sun Nov 01, 2020 5:13 pm
Forum: Announcements
Topic: v6.47.7 [stable] is released!
Replies: 45
Views: 11906

Re: v6.47.7 [stable] is released!

Upgraded from 6.45.7 to 6.47.7 on an 750Gv3 with lots of configuration. All seems to work fine.
by Jotne
Sun Nov 01, 2020 1:21 pm
Forum: Scripting
Topic: Global var empty when scripting, but exist in terminal. [SOLVED]
Replies: 3
Views: 450

Re: Global var empty when scripting, but exist in terminal. [SOLVED]

Here is two way to set a global variable: { :global test set $test "my data" } { :global test "my data" } This will not work in a script to get the variable in a script, may work from terminal: { :put $test } You need to declare the variable in the script so it knows about it, so...
by Jotne
Tue Oct 27, 2020 9:54 am
Forum: Scripting
Topic: One line password generation without fetch tool
Replies: 16
Views: 1816

Re: One line password generation without fetch tool

Thanks for the work with the password script. MT should add some like this as an built inn function :)

PS You do not need the \ after do and else or at end of line if its a new command.
do={ \ -> do={
by Jotne
Tue Oct 27, 2020 9:49 am
Forum: Scripting
Topic: useful scripts and simple functions
Replies: 2
Views: 2196

Re: useful scripts and simple functions

You do not need to use ; at end of each line, only when separating multiple commands on same line. Not sure if you can on git post with indentation, but it looks better. And long line makes it hard to read, Eks :do {:if (!any($F->"$f")) do={:if ([:len $F]=0) do={:set $F [:toarray "&qu...
by Jotne
Sun Oct 25, 2020 11:34 pm
Forum: Announcements
Topic: v6.47.6 [stable] is released!
Replies: 39
Views: 7961

Re: v6.47.6 [stable] is released!

:set currentIP [/ip cloud get public-address] is no longer working - "currentIP" gets set to a null string, even though "/ip cloud print" shows the correct value for public-address. You do declare the variable before you are using it? Try cut/paste this to a terminal windows (wi...
by Jotne
Fri Oct 23, 2020 8:52 am
Forum: Announcements
Topic: v6.47.6 [stable] is released!
Replies: 39
Views: 7961

Re: v6.47.6 [stable] is released!

And also fix the log naming as I have posted both here and to support email before. (fix it for the new v7 as an minimum) https://forum.mikrotik.com/viewtopic.php?f=2&t=124291 3 years and nothing has been done!!! Look at this line: system;error;critical error while running customized default con...
by Jotne
Thu Oct 22, 2020 12:14 pm
Forum: Scripting
Topic: One line password generation without fetch tool
Replies: 16
Views: 1816

Re: One line password generation without fetch tool

Thanks for the script. Tested and also work on beta 7. Just for my way to use script, I have removed all ; and the not needed \ after "do=" and used tab to get better indent. # generate password: { :set $pwdLength 5 # From this string the password is formed. :set $pwdComposedOff "!&am...
by Jotne
Fri Oct 09, 2020 6:30 pm
Forum: Scripting
Topic: Torrent blocking working in y2020
Replies: 20
Views: 6701

Re: Torrent blocking working in y2020

If you go to some PitateBay proxy or other Torrent site they tell you to not download if you do not use a VPN, and with VPN your rules does not work at all.
by Jotne
Wed Oct 07, 2020 9:49 pm
Forum: Scripting
Topic: Script doensn't working on a router without Wireless
Replies: 5
Views: 604

Re: Script doensn't working on a router without Wireless

You need to declare variable before using set. I have no wifi router at the moment, so can not test it fully, but this runs without error on my test router: [ :local wifistatus :local registeredclients :local overalltxccq :local channel2 :local noisefloor :do { :if ([:len [/interface wireless find ]...
by Jotne
Mon Oct 05, 2020 8:19 pm
Forum: Scripting
Topic: Script modem reboot
Replies: 5
Views: 480

Re: Script modem reboot

If you can not figure out what the problem hang is, then change modem, change ISP.
Rebooting should not be needed.
by Jotne
Mon Oct 05, 2020 3:32 pm
Forum: Scripting
Topic: Script modem reboot
Replies: 5
Views: 480

Re: Script modem reboot

Here is the solution for you:
power adapter.jpg
http://www.networktechinc.com/control-power.html#tab-5

Connect this power adapter on the power for the modem. Then set it to auto ping an IP address.
If ping stops, then the adapter power cycle the modem.
by Jotne
Sat Oct 03, 2020 9:06 pm
Forum: Scripting
Topic: Torrent blocking working in y2020
Replies: 20
Views: 6701

Re: Torrent blocking working in y2020

So if the speed limit is 100 kph and I have a car that can run 200 kph, we need to close the road?
Torrent are not illegal, sharing copyright material are.
Closing one service just move user to another :)
by Jotne
Sat Oct 03, 2020 8:59 am
Forum: Scripting
Topic: Script doensn't working on a router without Wireless
Replies: 5
Views: 604

Re: Script doensn't working on a router without Wireless

on-error needs to be connected to the :do block, not the :if command My routers that do not have wifi accept the wireless command with out error so I do get: No active wifi interfaces Also use code tags <\> button while posting to more easy see the structure of your code (using tab) Since this code...
by Jotne
Sat Oct 03, 2020 8:31 am
Forum: Scripting
Topic: View log file
Replies: 3
Views: 334

Re: View log file

See my signature on how I do use Splunk to handle log files. I do not know how to use API.
by Jotne
Sat Oct 03, 2020 8:28 am
Forum: Scripting
Topic: Scripting Engine bug or am I missing something?
Replies: 2
Views: 272

Re: Scripting Engine bug or am I missing something?

This can not bee your whole script? It do miss an end }

You are using variable the wrong way, see my post yesterday here:
viewtopic.php?p=820135#p820135
by Jotne
Fri Oct 02, 2020 12:31 pm
Forum: Scripting
Topic: How to log Wireless Registration table information locally
Replies: 12
Views: 5029

Re: How to log Wireless Registration table information locally

I wanted to log Tx/Rx signal strength, Tx/Rx CCQ, Signal to Noise and some other parameter from Wireless Registration Table in a log file stored locally. Hi. If you look at link in my Signature, you will find link to Splunk with MikroTik. There you store all log information externally and graph it ...
by Jotne
Fri Oct 02, 2020 11:26 am
Forum: Scripting
Topic: Cool scripts
Replies: 2
Views: 444

Re: Cool scripts

- Commenting interfaces based on looking up the hostname of what is connected to a port on Bridge -> Hosts This should be easy to do, but what with: * Client do changes, so interface needs to be updated by a schedule and then interface name would change. * What if there are multiple clients? (Switc...
by Jotne
Fri Oct 02, 2020 10:57 am
Forum: Scripting
Topic: Need help picking Array Values []
Replies: 2
Views: 411

Re: Need help picking Array Values []

You are handling the variables the wrong way. Correct way are to declare the variable, set it and then print/log. I always use wrap code with [] and cut paste code to terminal to test it. So this does work: [ :local attackip :local logEntryMessage "<110.54.203.170>: user ppp1 authentication fai...
by Jotne
Tue Sep 29, 2020 3:00 pm
Forum: Announcements
Topic: v6.47.4 [stable] is released!
Replies: 68
Views: 16674

Re: v6.47.4 [stable] is released!

I cant install current frmwre to hAP lite "smips".
no space! =(
Install an older/smaller version of the software like 6.44.x then upgrade
by Jotne
Mon Sep 21, 2020 1:16 pm
Forum: Scripting
Topic: Torrent blocking working in y2020
Replies: 20
Views: 6701

Re: Torrent blocking working in y2020

Im uTorrent
Options->Prefences->BitTorrent-Protocol Encryption set it to Enabled, then test if your rule still blocks it.
by Jotne
Sun Sep 20, 2020 3:53 pm
Forum: Useful user articles
Topic: Tool: Using Splunk to analyse MikroTik logs 3.2 (Graphing everything) Topic is solved
Replies: 373
Views: 160180

Re: Tool: Using Splunk to analyse MikroTik logs 3.1 (Graphing everything) Topic is solved

Did this solution work with splunk linux docker version as well ? In my case, splunk receives mikrotik syslog data but in this plugin shows no devices All message need to be tagged "MikroTik", so message should look like this using this search: index=* (section 2b) dns MikroTik : done que...
by Jotne
Tue Sep 15, 2020 11:31 pm
Forum: RouterOS v7 BETA
Topic: v7.1beta2 [development] is released!
Replies: 387
Views: 97358

Re: v7.1beta2 [development] is released!

I guess you have opened the admin (web/winbox/ssh or other) from internet.
Do you use VPN or secure your ruter better.
by Jotne
Mon Sep 14, 2020 12:07 pm
Forum: Announcements
Topic: v6.46.7 [long-term] is released!
Replies: 45
Views: 11577

Re: v6.46.7 [long-term] is released!

Wow, i thought MT had forgotten the 6.46 train.
For long time it as not been listed under "ANNOUNCEMENTS" section, so you had to search for it to find it.
by Jotne
Fri Sep 11, 2020 11:16 am
Forum: General
Topic: Logging prefix is a mess
Replies: 7
Views: 2586

Re: Logging prefix is a mess

When using external logging tools like Splunk to analyse logs, this old and messy format gives a lot of extra work.
I have sent this request two times to MikroTik so they know about it.
by Jotne
Fri Sep 04, 2020 8:07 am
Forum: Announcements
Topic: v6.47.3 [stable] is released!
Replies: 50
Views: 11412

Re: v6.47.3 [stable] is released!

Note to self - never upgrade ROS unless you are on site.
That is why I always let it go some weeks before I upgrade, and only after testing it on a similar device that has same config and software version.
by Jotne
Wed Aug 26, 2020 7:47 pm
Forum: Announcements
Topic: v6.47.2 [stable] is released!
Replies: 90
Views: 18410

Re: v6.47.2 [stable] is released!

@trancenet and other regarding 5Ghz DFS legal compliance. This has nothing to do with 6.47.2 It was change several version back, so trancenet did only see this because he skipped many upgrade. No, I have always the latest (stable) version, I did not skip new updates. The problem appeared only after...
by Jotne
Tue Aug 25, 2020 10:23 pm
Forum: Announcements
Topic: v6.47.2 [stable] is released!
Replies: 90
Views: 18410

Re: v6.47.2 [stable] is released!

@trancenet and other regarding 5Ghz DFS legal compliance. This has nothing to do with 6.47.2 It was change several version back, so trancenet did only see this because he skipped many upgrade.
by Jotne
Mon Aug 24, 2020 10:31 pm
Forum: Announcements
Topic: v6.47.2 [stable] is released!
Replies: 90
Views: 18410

Re: v6.47.2 [stable] is released!

I will never update to a new version again! Did you try to setup the config from scratch, or did you just upgrade and it stopped working. I have seen some stuff changes when upgrade so you need to manually configure it to get it working. If 5 GHz did stops working for every one, 6.47.2 would be rem...
by Jotne
Mon Aug 24, 2020 12:06 pm
Forum: Scripting
Topic: ASK [random wifi password generator]
Replies: 41
Views: 9448

Re: ASK [random wifi password generator]

Instead of relay on an external service to get password, you can use this solution.
viewtopic.php?f=9&t=164114
by Jotne
Mon Aug 24, 2020 12:05 pm
Forum: Scripting
Topic: random wifi password
Replies: 19
Views: 50174

Re: random wifi password

Instead of relay on an external service to get password, you can use this solution.
viewtopic.php?f=9&t=164114
by Jotne
Mon Aug 24, 2020 11:50 am
Forum: Scripting
Topic: My Backup file contains malicious scripts
Replies: 5
Views: 836

Re: My Backup file contains malicious scripts

Do you have any admin possibility from the internet? If so that is a way inn. VPN is the only good solution for remote admin.
What version did your router have? Old version should be upgraded.
by Jotne
Fri Aug 21, 2020 8:22 pm
Forum: RouterOS v7 BETA
Topic: v7.1beta2 [development] is released!
Replies: 387
Views: 97358

Re: v7.1beta2 [development] is released!

any hint on how to flash this on a HAP MINI? On previous beta, it said internal storage is not enough to upgrade... it's a brand new model, factory Do a search on this forum and you find many answer. Netinstall is one way. You can also downgrade to an older version that is much smaller, like some 6...
by Jotne
Fri Aug 21, 2020 10:41 am
Forum: Announcements
Topic: v6.47.2 [stable] is released!
Replies: 90
Views: 18410

Re: v6.47.2 [stable] is released!

hAP Lite - not enough space for upgrade
Downgrade to an older smaller version like 6.44, then upgrade to latest. PS this may give problem with your current configuration.
by Jotne
Tue Aug 18, 2020 11:00 pm
Forum: Scripting
Topic: [Script] Automatically change DNS if Pi-hole is no longer working
Replies: 23
Views: 4317

Re: [Script] Automatically change DNS if Pi-hole is no longer working

Can i change mac address automatically by script on every day?..
Yes it can be do.
Post it as a new question.
by Jotne
Tue Aug 18, 2020 11:22 am
Forum: General
Topic: Feature requests
Replies: 1302
Views: 311953

Re: Feature requests

If the reboot reason is written to the log before syslog is up and running, it will not send it out externally. So you need to look in local logs.
by Jotne
Tue Aug 11, 2020 8:23 am
Forum: Beginner Basics
Topic: Netwatch and SNMP monitoring
Replies: 2
Views: 865

Re: Netwatch and SNMP monitoring

I would think its better to use syslog for this.
In a script, run the ping test, if it fail, send a syslog to a monitoring system.

Have a look at my Syslog -> Splunk post linked in my signature.
by Jotne
Wed Aug 05, 2020 9:12 am
Forum: General
Topic: iOS14 "Use Private Address" Random MAC (Default) and Hotspot
Replies: 3
Views: 1993

Re: iOS14 "Use Private Address" Random MAC (Default) and Hotspot

It will see the IOS devices as a new device every time it changes its mac address. So if you have some in your system that are dependent of the mac address, it will break. That will be hostspot where you have whitelist mac, static IP for devices like i do ++ I did find this list: 1 Users are always ...
by Jotne
Sun Aug 02, 2020 3:10 pm
Forum: Useful user articles
Topic: Tool: Using Splunk to analyse MikroTik logs 3.2 (Graphing everything) Topic is solved
Replies: 373
Views: 160180

Re: Tool: Using Splunk to analyse MikroTik logs 3.1 (Graphing everything) Topic is solved

It did work with 7.0 beta, have not had time to look at 7.1 Most negative thing with the new >= 7.0 beta 8 is that they have removed accounting. We now have to use Netflow to log detailed data. This gives around 10 times larger logs, and need extra port not just syslog port. Much more complicated se...
by Jotne
Fri Jul 31, 2020 7:42 am
Forum: General
Topic: DNS resolution vulnerability
Replies: 14
Views: 2686

Re: DNS resolution vulnerability

To all. Look at the date of the thread. For some reason alfred998 responded to a thread that is 1 1/2 year old. Where m4rk did not post his config. I guess he did see that and left the thread.
by Jotne
Thu Jul 30, 2020 8:17 am
Forum: General
Topic: Mikrotik OS 6.45.6 Hacked
Replies: 11
Views: 9708

Re: Mikrotik OS 6.45.6 Hacked

I guess you all had router opened for remote access using winbox, ssh, telnet or web access. Winbox was hacked some time back and are fixed in later version. (lots of scan was done to the winbox port 8291, so 2. in list below would have helped) VPN is the best option for remote access to the router....
by Jotne
Tue Jul 28, 2020 8:13 am
Forum: General
Topic: Add DNS over HTTPS (DoH) support
Replies: 135
Views: 101917

Re: Add DNS over HTTPS (DoH) support

00:01:00
Every minute.
by Jotne
Tue Jul 28, 2020 8:10 am
Forum: Scripting
Topic: Loop through submenus [SOLVED]
Replies: 3
Views: 1112

Re: Loop through submenus [SOLVED]

Why do you need to delete these filter/nat rules?
Post example comments.
by Jotne
Tue Jul 28, 2020 8:07 am
Forum: Scripting
Topic: Script to Reboot Routerboard
Replies: 16
Views: 40081

Re: Script to Reboot Routerboard

Adding reboot does just remove symptoms of a problem. Fix the problem. Upgrade to a good version.
by Jotne
Mon Jul 27, 2020 10:30 am
Forum: Scripting
Topic: ASK [random wifi password generator]
Replies: 41
Views: 9448

Re: ASK [random wifi password generator]

You need to try an test and learn some scripting.
I just give you idea on how to solve it.

your_profile need to be set to an real profile.
by Jotne
Mon Jul 27, 2020 8:15 am
Forum: General
Topic: Add emoji to the ssid name
Replies: 27
Views: 8636

Re: Add emoji to the ssid name

4) You will see it on your mobile phone:
And as well in Windows 10
Wifi.jpg
by Jotne
Mon Jul 27, 2020 8:05 am
Forum: Scripting
Topic: ASK [random wifi password generator]
Replies: 41
Views: 9448

Re: ASK [random wifi password generator]

Some like this?
{
:local new ([/certificate scep-server otp generate minutes-valid=0 as-value]->"password")
:interface wireless security-profiles set your_profile wpa2-pre-shared-key="$new"
}
by Jotne
Sun Jul 26, 2020 6:40 pm
Forum: Scripting
Topic: ASK [random wifi password generator]
Replies: 41
Views: 9448

Re: ASK [random wifi password generator]

If you use the time base password script it will be the same all time.
Did you try this?

viewtopic.php?p=807658
by Jotne
Sat Jul 25, 2020 9:35 pm
Forum: General
Topic: Add emoji to the ssid name
Replies: 27
Views: 8636

Re: Add emoji to the ssid name

Cool SSID showing up on your pc/phone.

Like this ssid:
I am happy :)
by Jotne
Sat Jul 25, 2020 4:56 pm
Forum: General
Topic: Add emoji to the ssid name
Replies: 27
Views: 8636

Re: Add emoji to the ssid name

And you tried with what version?
by Jotne
Fri Jul 24, 2020 5:46 pm
Forum: Scripting
Topic: One line password generation without fetch tool
Replies: 16
Views: 1816

Re: One line password generation without fetch tool

wow, this was interesting. Seems to generate a random hex string on 20 character each time its run. Should be fine as a password. It seems to store each run in this view for some time: /certificate scep-server otp print # PASSWORD EXPIRES USED 0 677d57c658119f4f8804 0s no 1 bd4a331ef703af86d1ac 0s n...
by Jotne
Fri Jul 24, 2020 5:28 pm
Forum: Scripting
Topic: Script for mass reboot
Replies: 2
Views: 715

Re: Script for mass reboot

Why? Reboot should not be needed.
by Jotne
Fri Jul 24, 2020 3:21 pm
Forum: Scripting
Topic: Auto Delete User Script
Replies: 7
Views: 2663

Re: Auto Delete User Script

Problem with RouterOS is that it does not follow any standard time format. I have made a script that convert date/time to epoc that can be used to calculate time difference. This is some that MT should add as a standard.
by Jotne
Thu Jul 23, 2020 9:22 am
Forum: Scripting
Topic: Regular Expressions modificators?
Replies: 3
Views: 1539

Re: Regular Expressions modificators?

$str~"^OK(\r|\n|\r\n|\$)"
Since there are lots of or and it only match the \r\n
This could be used as well
$str~"^OK\r\n"
But it depends on your real input as well.
by Jotne
Wed Jul 22, 2020 8:43 pm
Forum: Useful user articles
Topic: Tool: Using Splunk to analyse MikroTik logs 3.2 (Graphing everything) Topic is solved
Replies: 373
Views: 160180

Re: Tool: Using Splunk to analyse MikroTik logs 3.1 (Graphing everything) Topic is solved

Problem is that if you do use longer name, RouterOS starts to chop off characters. So to solve this MikroTik needs to modify the RouterOS.
This is why I in first post added sample on how to name the filter rules to have some contoll.
by Jotne
Mon Jul 20, 2020 11:32 pm
Forum: Beginner Basics
Topic: Webfig login hack
Replies: 14
Views: 6432

Re: Webfig login hack

I guess you post will be reported and deleted. Who do you expect someone reply to your post using this type of language. Starting by calling MT Routers a pieces of shit. A better question would be: I have a remote router (mine) that I have lost password to. Is there a way to enter it, maybe using a ...
by Jotne
Mon Jul 20, 2020 8:21 am
Forum: Scripting
Topic: Script that creates a new virtual AP
Replies: 1
Views: 751

Re: Script that creates a new virtual AP

This is not tested and my need some modification /interface wireless security-profiles add authentication-types=wpa2-psk eap-methods="" management-protection=allowed mode=dynamic-keys name=\ Test supplicant-identity="" wpa2-pre-shared-key=[/system routerboard get serial-number] /...
by Jotne
Sat Jul 18, 2020 7:12 pm
Forum: Beginner Basics
Topic: Webfig login hack
Replies: 14
Views: 6432

Re: Webfig login hack

No there are no simple way to hack this stupid router. Its very secure.
by Jotne
Sat Jul 18, 2020 11:51 am
Forum: Useful user articles
Topic: Tool: Using Splunk to analyse MikroTik logs 3.2 (Graphing everything) Topic is solved
Replies: 373
Views: 160180

Re: Tool: Using Splunk to analyse MikroTik logs 3.1 (Graphing everything) Topic is solved

Since my script log events as info and you have this: add action=disk1 topics=critical add action=disk1 topics=error add action=disk1 topics= info You do tell that all info log should go to the disk as well. Why can you not give your ISP access to your Splunk? They will then get the same log as you ...
by Jotne
Fri Jul 17, 2020 11:41 am
Forum: Useful user articles
Topic: Tool: Using Splunk to analyse MikroTik logs 3.2 (Graphing everything) Topic is solved
Replies: 373
Views: 160180

Re: Tool: Using Splunk to analyse MikroTik logs 3.1 (Graphing everything) Topic is solved

Du a search like this to see if any data comes inn to splunk.
index=*
by Jotne
Fri Jul 17, 2020 8:45 am
Forum: Useful user articles
Topic: Tool: Using Splunk to analyse MikroTik logs 3.2 (Graphing everything) Topic is solved
Replies: 373
Views: 160180

Re: Tool: Using Splunk to analyse MikroTik logs 3.1 (Graphing everything) Topic is solved

The point with the script is to send all information using syslog. If you selet that log should be sent to disk, it will also go there. As far as I know, you can not split the logg saying that some should go to disk, some to memory and some to disk. I still do not understand why you need logs to dis...
by Jotne
Thu Jul 16, 2020 11:50 pm
Forum: Useful user articles
Topic: Tool: Using Splunk to analyse MikroTik logs 3.2 (Graphing everything) Topic is solved
Replies: 373
Views: 160180

Re: Tool: Using Splunk to analyse MikroTik logs 3.1 (Graphing everything) Topic is solved

the files are showing on my disk because i have a rule that send the logs there
You have selected to write the logs to your disk so it will write it there. I do not understand the problem. Just remove the log to the disk?
by Jotne
Thu Jul 16, 2020 11:41 pm
Forum: Scripting
Topic: SoS ..small script needed
Replies: 2
Views: 733

Re: SoS ..small script needed

by the way iam using v5 of microtik
v5???
Its so old that you can not find v5 on the archive files: https://mikrotik.com/download/archive

Start by upgrading to some of the latest release.
by Jotne
Thu Jul 16, 2020 11:41 am
Forum: Useful user articles
Topic: Tool: Using Splunk to analyse MikroTik logs 3.2 (Graphing everything) Topic is solved
Replies: 373
Views: 160180

Re: Tool: Using Splunk to analyse MikroTik logs 3.1 (Graphing everything) Topic is solved

Thank you I going to try this somewhere in the next day's.
Should work as long as data gets inn to Splunk and are tagged correctly "MikroTik"
by Jotne
Thu Jul 16, 2020 11:35 am
Forum: Useful user articles
Topic: Tool: Using Splunk to analyse MikroTik logs 3.2 (Graphing everything) Topic is solved
Replies: 373
Views: 160180

Re: Tool: Using Splunk to analyse MikroTik logs 3.1 (Graphing everything) Topic is solved

is there a way to make the script output not be reflected on the memory or disk log?, only send it to the remote splunk server?
I do not see those files on my disk. Can you download one of them to your PC and list whats in the file?
by Jotne
Mon Jul 13, 2020 3:10 pm
Forum: Announcements
Topic: v6.47.1 [stable] is released!
Replies: 147
Views: 62425

Re: v6.47.1 [stable] is released!

Did not now that this was possible. Will test it out.
by Jotne
Sun Jul 12, 2020 12:40 pm
Forum: General
Topic: Monthly Reboot
Replies: 3
Views: 1036

Re: Monthly Reboot

how to reboot the router monthly
Why?
by Jotne
Sun Jul 12, 2020 12:17 am
Forum: Announcements
Topic: v6.47.1 [stable] is released!
Replies: 147
Views: 62425

Re: v6.47.1 [stable] is released!

I think this is broken in 6.47
What is this? Post info here, not a link..
by Jotne
Sat Jul 11, 2020 8:47 pm
Forum: Announcements
Topic: v6.47.1 [stable] is released!
Replies: 147
Views: 62425

Re: v6.47.1 [stable] is released!

Hi i dont believe that i will be able to upgrade my hex3. Only 4.9MiB free but nothing on the flash. Anybody an idea ? Im about 50km away from this box. I would downgrade to an older, much smaller version then upgrade to latest, but in your case that may give problem if you loose some function so t...
by Jotne
Sat Jul 11, 2020 11:40 am
Forum: Scripting
Topic: VK Basic Monitoring
Replies: 3
Views: 877

Re: VK Basic Monitoring

It would be fine if you edit first post and explain when you use it, for what and what is VK.
by Jotne
Fri Jul 10, 2020 2:25 pm
Forum: Announcements
Topic: v6.47.1 [stable] is released!
Replies: 147
Views: 62425

Re: v6.47.1 [stable] is released!

Great!
But Winbox CRASH DOWN, when Press + under System -> IPsec-> Policies.

Please fix that bug...
Its IP -> IPsec -> Policies not System and it works fine with Winbox 3.24 (latest)
by Jotne
Fri Jul 10, 2020 8:29 am
Forum: Beginner Basics
Topic: Port forwarding using DDNS doesn't work
Replies: 12
Views: 2475

Re: Port forwarding using DDNS doesn't work

This is wrong. Your are only the 10th this week with this error. :) /ip address add address=192.168.1.1/24 comment=defconf interface= ether2 network=\ 192.168.1.0 When using bringing, the IP should be on the bridge (or VLAN if that is used), not one of the interface belongs to the bridge. Correct /i...
by Jotne
Thu Jul 09, 2020 8:35 am
Forum: Scripting
Topic: Script to get interface WAN IP on PPPoE connections and DHCP connections
Replies: 2
Views: 977

Re: Script to get interface WAN IP on PPPoE connections and DHCP connections

This part fails: [/ip address get [find where interface=$ipgw] value-name=address] For my routers, interface does not show IP default-gateway 92.xxx.xxx.1 . So you can not use default-gateway to find what IP address you have on public interface. Example: /ip address print Flags: X - disabled, I - in...
by Jotne
Wed Jul 08, 2020 2:07 pm
Forum: Scripting
Topic: I need a script for SSID passkey using serial No.
Replies: 3
Views: 761

Re: I need a script for SSID passkey using serial No.

That is not to complicated to make: /interface wireless security-profiles add authentication-types=wpa2-psk eap-methods="" management-protection=allowed mode=dynamic-keys name=\ Test supplicant-identity="" wpa2-pre-shared-key=[/system routerboard get serial-number] This will crea...
by Jotne
Tue Jul 07, 2020 8:56 pm
Forum: Announcements
Topic: v6.48beta [testing] is released!
Replies: 185
Views: 65373

Re: v6.48beta [testing] is released!

*) bridge - fixed dynamic VLAN assignment when changing port "frame-type" property (introduced in v 6.46 ); *) crs3xx - fixed HW offloading for netPower 15FR and netPower 16P devices (introduced in v 6.47 ); *) crs3xx - fixed increased CPU temperature for CRS354-48G-4S+2Q+ device (introdu...
by Jotne
Tue Jul 07, 2020 12:50 pm
Forum: General
Topic: Feature request for v7.x
Replies: 282
Views: 79894

Re: Feature request for v7.x

Monthly traffic per interface. Dont tell me about graphing. Its not fine for me.
Log interface traffic counter to a syslog server. There you can see it number or you can graph it if you like.
See link in my signature on how to set up Splunk (syslog server) to log MikroTik Routers.
by Jotne
Tue Jul 07, 2020 8:08 am
Forum: Announcements
Topic: v6.47 [stable] is released!
Replies: 349
Views: 107814

Re: v6.47 [stable] is released!

@itforeverru

It looks like you are inn to some. Here is memory usage on MT 6.47 (running on a vmware)
This router only do DoH and used for testing only.
A reboot was done 5 July
Memory leak.jpg


My RB750Gv3 that is much more loaded, does not show this behaviour. 6.45.9
Memory leak2.jpg
by Jotne
Mon Jul 06, 2020 8:30 am
Forum: Wireless Networking
Topic: High Battery usage with 6.47 stable
Replies: 12
Views: 2847

Re: High Battery usage with 6.47 stable

On thing may create problem for you. You have added lan IP on an interface and not an bridge. You are not the first and for sure 100% not the last one to make this error. DHCP server is correctly configured on the bridge, so why did you miss the main IP? I guess you have upgraded from an older versi...
by Jotne
Mon Jul 06, 2020 8:10 am
Forum: Scripting
Topic: Torrent blocking working in y2020
Replies: 20
Views: 6701

Re: Torrent blocking working in y2020

Block Bittorrent and P2P using latest MikroTik RouterOS 6.43.3
This was posted 5 Juli 2020. 6.43.3 is very old and far far from latest Router OS (from 18.10.2018). Latest stable 6.47 and long term 6.45.9
I would not have used this old version due to lots of missing security patches.
by Jotne
Fri Jul 03, 2020 8:43 am
Forum: General
Topic: L2TP VPN can not connect on Windows 10
Replies: 17
Views: 11704

Re: L2TP VPN can not connect on Windows 10

This is the solution:
Maybe you should write that this is in spanish?
Also no need for posting the same multiple places.
by Jotne
Fri Jul 03, 2020 8:39 am
Forum: Beginner Basics
Topic: Is a hEX (RB750Gr3) powerfull enough...
Replies: 6
Views: 1199

Re: Is a hEX (RB750Gr3) powerfull enough...

Its not important how many devices you have on the inside lan. A 100Mpgs internet line should be no problem for the router to handle.
by Jotne
Wed Jul 01, 2020 12:14 pm
Forum: General
Topic: LAN to LAN forwarding [SOLVED]
Replies: 63
Views: 9640

Re: LAN to LAN forwarding [SOLVED]

I need port based forwards so I can migrate one service at a time to my new server instead of having to migrate them all at once. The reason for different (and non standard) ports is that I have several instances of services already running in Docker on new server for test purposes. Send out inform...
by Jotne
Wed Jul 01, 2020 12:00 am
Forum: General
Topic: LAN to LAN forwarding [SOLVED]
Replies: 63
Views: 9640

Re: LAN to LAN forwarding [SOLVED]

@Diresta

Changing server may be an normal operation to do with new IP. This is why we have DNS. Just redirect DNS to new server.
But why do you need to change port? What services is this that you have on port 150 or port 10000? Not standard ports?
by Jotne
Mon Jun 29, 2020 10:19 am
Forum: General
Topic: missed up my firewall filter rules
Replies: 9
Views: 1603

Re: missed up my firewall filter rules

19 chain= input action=accept protocol=tcp dst-address=1.2.3.4 in-interface=wan dst-port=80 20 chain= input action=accept protocol=tcp dst-address=1.2.3.4 in-interface=wan dst-port=443 Where are IP 1.2.3.4 located? on the router it self? if not this will do nothing. Input chain is only used for tra...
by Jotne
Mon Jun 29, 2020 9:44 am
Forum: Scripting
Topic: ASK [random wifi password generator]
Replies: 41
Views: 9448

Re: ASK [random wifi password generator]

Script creating password based on time will never work on RouterOS. Send an request to MikroTik to add a random password generator.
by Jotne
Sun Jun 28, 2020 10:48 pm
Forum: General
Topic: Feature requests
Replies: 1302
Views: 311953

Re: Feature requests

option to specify multiple adress lists inside single firewall rule?
You can make a jump rule and add multiple rules to it, all with an address list. Not exactly the same, but should work.
by Jotne
Sun Jun 28, 2020 8:09 pm
Forum: General
Topic: Two networks over one cable
Replies: 3
Views: 1092

Re: Two networks over one cable

Her in Norway, if I do use my ISP router, it will send data untagged VLAN to all my PC etc. Then IPTV goes on a separate VLAN. But if I change my ISP router to bridge, I will have one port on ISP router where my Router connects using NAT. Another port sends out IPTV on a tagger VLAN (not sure if it ...
by Jotne
Sun Jun 28, 2020 8:00 pm
Forum: Scripting
Topic: Need syntax help (interface --> interface list)
Replies: 4
Views: 1101

Re: Need syntax help (interface --> interface list)

There is an error.
wrong:
:put [/interface/list get [find name=Double-WAN-List]
correct
:put [/interface get [find name="Double-WAN-List]" ] tx-byte]
No list and double quote.
by Jotne
Sun Jun 28, 2020 5:34 pm
Forum: Scripting
Topic: ASK [random wifi password generator]
Replies: 41
Views: 9448

Re: ASK [random wifi password generator]

Did you try the url in a browser? https://www.random.org/passwords/\?num=1&len=20&format=plain&rnd=new It seems that they have added some DDoS protection using java. DDoS protection by Cloudflare So it may prevent the download to work from Mikrotik. Try to find another password site.
by Jotne
Sun Jun 28, 2020 5:26 pm
Forum: Scripting
Topic: Need syntax help (interface --> interface list)
Replies: 4
Views: 1101

Re: Need syntax help (interface --> interface list)

Cut and past this to terminal. Do you get any output. :put [/interface find name=Double-WAN-List] If this is ok, try: :put [/interface/list get [find name=Double-WAN-List] Post output of /interface print detail Edit: It may be the hyphen - giving problems. Try to rename interface to DoubleWANList
by Jotne
Sun Jun 28, 2020 11:33 am
Forum: Scripting
Topic: ASK [random wifi password generator]
Replies: 41
Views: 9448

Re: ASK [random wifi password generator]

When you past it to terminal, you do wrap it on brackets? { }
{
your code
}
If not it will not work.

6.44.6 are getting some old. Oktober 2019. It should work with the script.
by Jotne
Sun Jun 28, 2020 9:46 am
Forum: Scripting
Topic: ASK [random wifi password generator]
Replies: 41
Views: 9448

Re: ASK [random wifi password generator]

I can not explain why a script stops working. Try to run it on the terminal to see what is going on.
Upgrade your RouterOS if you do run an older version.
by Jotne
Fri Jun 26, 2020 8:29 pm
Forum: Scripting
Topic: Export specific address list
Replies: 2
Views: 1203

Re: Export specific address list

I can send the address list to Splunk using script. On Splunk you can do a lot of stuff with it. What is your goal?
by Jotne
Thu Jun 25, 2020 4:01 pm
Forum: Useful user articles
Topic: Tool: Using Splunk to analyse MikroTik logs 3.2 (Graphing everything) Topic is solved
Replies: 373
Views: 160180

Re: Tool: Using Splunk to analyse MikroTik logs 3.1 (Graphing everything) Topic is solved

Script updated to 4.1 to get CAPsMANN inforamtion.

Read section 2f) if you like to use CAPsMANN function.
by Jotne
Thu Jun 25, 2020 2:13 pm
Forum: Useful user articles
Topic: Tool: Using Splunk to analyse MikroTik logs 3.2 (Graphing everything) Topic is solved
Replies: 373
Views: 160180

Re: Tool: Using Splunk to analyse MikroTik logs 3.1 (Graphing everything) Topic is solved

Splunk for MikroTik updated to v3.1 Mayor changes is the CAPsMAN view If you like to use the CAPsMAN, update script to 4.1 and add capsmann script fond in section 2f first post: To upgrade, delete the folder /splunk/etc/app/Mikrotik Then install the unpacked spl (use winrar/winzip) file, install app...
by Jotne
Wed Jun 24, 2020 8:51 am
Forum: General
Topic: NTP server with GMT DST
Replies: 12
Views: 1746

Re: NTP server with GMT DST

Hence why I was asking if you read the first post.
And my reply to that is you cant. NTP only sends UTC format. Its up to each device to stets the correct time zone.
If that can not be done on your devices, some I find very strange, you should complain to that hardware manufacture.
by Jotne
Wed Jun 24, 2020 8:45 am
Forum: Useful user articles
Topic: Tool: Using Splunk to analyse MikroTik logs 3.2 (Graphing everything) Topic is solved
Replies: 373
Views: 160180

Re: Tool: Using Splunk to analyse MikroTik logs 3.0 (Graphing everything) Topic is solved

I will make a view that shows total traffic in/out, what IP it does come from and what IP it goes to. That is not the problem. What I would like to know is what port is used, there i were the problem lays. Look at line 1 and line 2 in the above post. Both comes from same IP 193.212.a.a, both goes to...
by Jotne
Tue Jun 23, 2020 5:36 pm
Forum: Useful user articles
Topic: Tool: Using Splunk to analyse MikroTik logs 3.2 (Graphing everything) Topic is solved
Replies: 373
Views: 160180

Re: Tool: Using Splunk to analyse MikroTik logs 3.0 (Graphing everything) Topic is solved

After talking more than one hour with a super spesialist in Netflow, I do start to get the grip on how things works. There are no way you can se in a Netflow packets, if its traffic returning from an started inside session or if it some from outside starting to sending inn data. You can look at port...
by Jotne
Tue Jun 23, 2020 1:16 pm
Forum: Scripting
Topic: How to get SNMP interface index in a script.
Replies: 4
Views: 1166

Re: How to get SNMP interface index in a script.

If you look at my post over here you will see why. https://forum.mikrotik.com/viewtopic.php?p=801674#p801674 Netflow packet do contain what interface they are sent trough. Name of the filed is inputSNMPidx or outputSNMPidx. So I do know that with SNMP i can find the corresponding interface. line _ti...
  • 1
  • 2
  • 3
  • 4
  • 5
  • 7