Community discussions

MikroTik App

Search found 759 matches

by optio
Wed Jun 12, 2024 3:49 pm
Forum: Scripting
Topic: Script Execution Error - Dynu.com 7.13 was fine 7.15 no bueno
Replies: 14
Views: 743

Re: Script Execution Error - Dynu.com 7.13 was fine 7.15 no bueno

There is no error now because script logic is put into function, I'm still hoping that MT will fix script error logging when :return called from main script code block...
by optio
Tue Jun 11, 2024 12:18 am
Forum: General
Topic: CPU
Replies: 6
Views: 402

Re: CPU

so if j knew the problem that one of those things is there's a way to fix it
Depends, could be also some fault in OS/HW, but profile with configuration export can help for troubleshooting.
CPU on SXTsq is not powerful, a lot of firewall rules can cause that, etc...
by optio
Mon Jun 10, 2024 11:47 pm
Forum: General
Topic: Winbox on iPhone
Replies: 4
Views: 278

Re: Winbox on iPhone

Joke, OP was asking in Winbox (not Mikrotik app) on iPhone, screenshot is from Winbox running on ReactOS under UTM (QEMU) on iPhone :)
by optio
Mon Jun 10, 2024 9:41 pm
Forum: General
Topic: CPU
Replies: 6
Views: 402

Re: CPU

When it happens go to Tools->Profile->Start and post which process is causing high cpu load, eg:
profile-winbox.png
by optio
Mon Jun 10, 2024 8:42 pm
Forum: General
Topic: Winbox on iPhone
Replies: 4
Views: 278

Re: Winbox on iPhone

I'm using the Winbox on my iPhone and want to know where can I find the Align function as I do not see it under the wireless when connected
Cannot see issue here :)
winbox-iphone.png
by optio
Sun Jun 09, 2024 2:56 pm
Forum: Beginner Basics
Topic: Implemeting Mosh (mobile shell)
Replies: 1
Views: 271

Re: Implemeting Mosh (mobile shell)

If your device supports containers it should be possible to create container that starts on boot with mosh and connect to ROS locally from it (for eg. with ssh). Similar using ssh+screen in container on any shell.
by optio
Sun Jun 09, 2024 1:12 pm
Forum: Scripting
Topic: hotspot page allow Access-Control-Allow-Origin - CORS
Replies: 1
Views: 194

Re: hotspot page allow Access-Control-Allow-Origin - CORS

Rewrite response on web server and set into Access-Control-Allow-Origin header value with correct base url web server host (masked on your screenshot) or any with * value (not recommended).
Nginx examples, it should be possible to do it on any advanced web server.
by optio
Sat Jun 08, 2024 10:11 pm
Forum: Forwarding Protocols
Topic: Redistributing active IPsec tunnel destinations
Replies: 5
Views: 341

Re: Redistributing active IPsec tunnel destinations

Did you try with event handler function to monitor IPsec policy changes, like described here https://forum.mikrotik.com/viewtopic.php?t=207973 ? :global IpSecPolicyEventHandler do={ # do someting: $1 - active, etc... } :execute { :global IpSecPolicyEventHandler /ip/ipsec/policy print follow-only whe...
by optio
Fri Jun 07, 2024 9:35 pm
Forum: General
Topic: Roadmap for ROS?
Replies: 4
Views: 405

Re: Roadmap for ROS?

Are there generally such roadmaps public available for any operating system?
by optio
Fri Jun 07, 2024 6:43 pm
Forum: Announcements
Topic: WinBox v3.40 released!
Replies: 164
Views: 157716

Re: WinBox v3.40 released!

It is probably the iOS app ported to MacOS 👈
Porting is not needed for Apple silicon CPU based Macs :)
mt-app-mac.png
by optio
Fri Jun 07, 2024 4:37 pm
Forum: Scripting
Topic: need help for my first script
Replies: 7
Views: 806

Re: need help for my first script

Isn't that bound address then? This can be retrieved for interface and set into src-address property.
by optio
Thu Jun 06, 2024 10:11 pm
Forum: Announcements
Topic: v7.15.1 [stable] is released!
Replies: 309
Views: 57082

Re: v7.15 [stable] is released!

but you should agree that the example he posted ACTUALLY caught an ERROR that he had not noticed before (caused by the arbitrary and probably unnecessary change of the system package name to routeros in v7). I agree that would be helpful if this actually works ok, when you have log error every 1min...
by optio
Thu Jun 06, 2024 8:18 pm
Forum: Announcements
Topic: v7.15.1 [stable] is released!
Replies: 309
Views: 57082

Re: v7.15 [stable] is released!

Well, that is actually GOOD! Now you see an error that was present in your config all the time since upgrading to v7. (that is when the package "system" was renamed "routeros". that was not with 7.15 but already with 7.1) I disagree: /system/script add dont-require-permissions=y...
by optio
Thu Jun 06, 2024 8:03 pm
Forum: Virtualization
Topic: CHR using Apple Virtualization Framework (via UTM)
Replies: 53
Views: 5185

Re: CHR using Apple Virtualization Framework (via UTM)

That is system emulation with QEMU, you can run any supported architecture like that on any system where you can run QEMU, this topic is related to CHR virtualization using Apple Virtualization Framework. With Apple VF CHR arm64 raw image won't boot, but x86_64 it does after changing FS type on ESP ...
by optio
Sun Jun 02, 2024 10:35 pm
Forum: Scripting
Topic: mikrotik events script New abroach
Replies: 10
Views: 945

Re: mikrotik events script New abroach

This approach can be used for various forum script requests how to parse log records to do some logic, no need to track last processed record by timestamp called with some interval scheduler, instead :execute script which runs in background that calls event global function with log properites in arg...
by optio
Sun Jun 02, 2024 2:20 pm
Forum: Scripting
Topic: The issue of a function containing variables unsuccessfully.
Replies: 15
Views: 771

Re: The issue of a function containing variables unsuccessfully.

Command and arguments cannot be builded from variables, build command as string and use :execute command to execute it.
:local actionValue disable
:execute "/ip firewall nat $actionValue [find comment~\"hack_dns\"]" as-string
by optio
Sun Jun 02, 2024 1:19 pm
Forum: Announcements
Topic: v7.15.1 [stable] is released!
Replies: 309
Views: 57082

Re: v7.15 [stable] is released!

I agree, commands like :error, :quit, :return are valid and it should not produce such error in log.
by optio
Sun Jun 02, 2024 1:36 am
Forum: Announcements
Topic: v7.15.1 [stable] is released!
Replies: 309
Views: 57082

Re: v7.15 [stable] is released!

Unfortunately I cannot get it to downgrade. It downloads the firmware, it starts installing it and then the interface goes in invalid state and it never recovers. After a reboot the newest firmware is still installed. Did you try download image with fetch and set image filename for firmware-file in...
by optio
Sat Jun 01, 2024 9:12 pm
Forum: General
Topic: Cellular internet in Europe
Replies: 5
Views: 780

Re: Cellular internet in Europe

Try with this if helps.
by optio
Sat Jun 01, 2024 3:11 pm
Forum: Announcements
Topic: v7.15.1 [stable] is released!
Replies: 309
Views: 57082

Re: v7.15 [stable] is released!

Anyone has a link for the previous firmware version RG502QEAAAR13A03M4G_02.001.02.001 so I can downgrade?
https://upgrade.mikrotik.com/firmware/R ... .001/image
Double check if RG502Q-EA is correct modem model on your device.
by optio
Sat Jun 01, 2024 12:35 pm
Forum: Announcements
Topic: v7.15.1 [stable] is released!
Replies: 309
Views: 57082

Re: v7.15 [stable] is released!

Any chateau LTE 12 users with 16Mb flash upgraded to this release? I did, only issue I have so far is this . I'm still using legacy wireless package since I was unable to install combination of wifi-qcom-ac with containers and larger custom config on 16MB device. Now I noticed that some space is fr...
by optio
Fri May 31, 2024 12:38 am
Forum: Announcements
Topic: v7.15.1 [stable] is released!
Replies: 309
Views: 57082

Re: v7.15 [stable] is released!

:retrun command called from script (eg. :return ""), not inside function, used to exit script if some condition matches where script doesn't need to continue executing generates error log "executing script <script_name> from <winbox|scheduler> failed, please check it manually", ...
by optio
Tue May 28, 2024 9:42 pm
Forum: Containers
Topic: Horrible container performance from 7.14 up to 7.15rc2
Replies: 23
Views: 1701

Re: Horrible container performance from 7.14 up to 7.15rc2

Try to load system by running stress-ng inside container (eg. stress-ng --cpu 4 --aggressive). Does it loads all cpu cores to 100% when monitoring cpu from ROS /system/resource/monitor ?
You can also try with yabs.sh benchmark script inside container and share result.
by optio
Tue May 28, 2024 8:53 pm
Forum: Scripting
Topic: script to save current date and time in text file
Replies: 13
Views: 983

Re: script to save current date and time in text file

ntp update date and time only one time, and save this value if router reboot then start with this saved value .. if not found internet as my case to update the time it will running with this wrong saved time and make many problems so i want to save always currect time ROS saves current time on user...
by optio
Tue May 28, 2024 8:00 pm
Forum: Scripting
Topic: need help for my first script
Replies: 7
Views: 806

Re: need help for my first script

Why interface is needed in this case? Unless destination not reachable over main vrf, since Netwatch is lacking vrf setting.

P.S.
Netwatch has src-address property, it can be set to IP of desired interface.
by optio
Sun May 26, 2024 10:53 pm
Forum: Scripting
Topic: need help for my first script
Replies: 7
Views: 806

Re: need help for my first script

Use Netwatch ROS feature for this, set host to IP on which you need to check connection and in down-script set script code which disables/enables interface, additionally check interval and timeout properties if you need to tweak how fast it will react on connection loss.
by optio
Sun May 26, 2024 1:00 am
Forum: General
Topic: Feature request:remove limit about "press of the reset button, or a cold reboot"
Replies: 14
Views: 981

Re: Feature request:remove limit about "press of the reset button, or a cold reboot"

Try this on your own risk: Create ROS backup and download it locally if will be needed to create VM instance to recover Setup Winbox access to CHR (can be temporary direct over WAN for this tryout), it's mandatory, below noted why Add this script which creates static DNS records in loop: /system/scr...
by optio
Sat May 25, 2024 10:37 am
Forum: General
Topic: Feature request:remove limit about "press of the reset button, or a cold reboot"
Replies: 14
Views: 981

Re: Feature request:remove limit about "press of the reset button, or a cold reboot"

Yes, that puzzles me also, unless it always tries soft reboot/shutdown and after some timeout it performs hard on certain VM management, but I never seen that.
by optio
Sat May 25, 2024 10:24 am
Forum: General
Topic: Feature request:remove limit about "press of the reset button, or a cold reboot"
Replies: 14
Views: 981

Re: Feature request:remove limit about "press of the reset button, or a cold reboot"

How is possible to shut down such VM if system becomes unresponsive?
by optio
Wed May 22, 2024 10:54 pm
Forum: Scripting
Topic: Need Help with MikroTik Script for Matching and Storing Patterns
Replies: 4
Views: 436

Re: Need Help with MikroTik Script for Matching and Storing Patterns

So the result is a number of the index of the string so how to edit my script to achieve what i said in the post?
viewtopic.php?t=201819#p1038319
by optio
Wed May 22, 2024 9:57 pm
Forum: Containers
Topic: Stopped containers respond to ping
Replies: 17
Views: 918

Re: Stopped containers respond to ping

@vovan700i If you really want to achieve this for some reason, you may try with workaround and create short interval scheduler script which checks if container is running and if not disables its VETH interface. Ofc. for next container start VETH first needs to be enabled again while such scheduler i...
by optio
Tue May 21, 2024 11:07 pm
Forum: RouterBOARD hardware
Topic: Running out of space on 16MB RouterBOARDs
Replies: 46
Views: 8851

Re: Running out of space on 16MB RouterBOARDs

free-hdd-space: 952.0KiB
I have even less (440 KiB) and it's not affecting performance, create topic with issue description and full config, maybe someone will help.
by optio
Mon May 20, 2024 7:56 pm
Forum: Scripting
Topic: remove [find] gets stuck while executing
Replies: 4
Views: 471

Re: remove [find] gets stuck while executing

I doubt it is because of error while removing dynamic objects because it will stop on error, not stuck or go in timeout. Could be device performance issue or storage corruption. Regarding removing dynamic objects and error handling with retry (but it doubt that's the case here), it can be solved wit...
by optio
Sun May 19, 2024 5:57 pm
Forum: Wireless Networking
Topic: Which frequency to use?
Replies: 7
Views: 786

Re: Which frequency to use?

5745 or 5765 are unused and not in DFS channels range (in most countries) to avoid possible radar interference. All widths are available on these frequencies. See more in table on Wiki page.
by optio
Sat May 18, 2024 2:24 pm
Forum: Scripting
Topic: Ready variable from file.rsc [SOLVED]
Replies: 8
Views: 2122

Re: Ready variable from file.rsc [SOLVED]

@abbio90 better use json uploaded over smb and set global variables (or process in logic) depending on key/values in json using same script with checks other logic that you have for specific needed functionality...
by optio
Wed May 15, 2024 5:11 pm
Forum: General
Topic: PHP API MikroTik v.7.x [SOLVED]
Replies: 3
Views: 6051

Re: PHP API MikroTik v.7.x [SOLVED]

https://web.archive.org/web/20170210102 ... _PHP_class
But I will suggest quite opposite and use REST API with some PHP HTTP client and json_encode() / json_decode() for request / response processing.
by optio
Wed May 15, 2024 4:24 pm
Forum: General
Topic: New RouterOS Vulnerability?
Replies: 20
Views: 1341

Re: New RouterOS Vulnerability?

telnet user/password sniffed on some network while connecting from WAN
by optio
Sun May 12, 2024 5:22 pm
Forum: General
Topic: Script help
Replies: 2
Views: 306

Re: Script help

:local newLIB1 [/ip/firewall/address-list find list="jonny"]
/ppp
:if ([:len $newLIB1] > 0) do={
  secret enable jonny
} else={
  secret disable jonny
  active remove [find name="jonny"]
}
by optio
Sat May 11, 2024 10:15 pm
Forum: Scripting
Topic: Script triggered by API not executed properly [SOLVED]
Replies: 7
Views: 5599

Re: Script triggered by API not executed properly [SOLVED]

There is no either log "Container update: Container Container HomeAssistant stopped", (line: $logWithMessage ("Container $contComment stopped") logPrefix=$logPrefix level="W" ) which means can be timeouted by check in line above :if ($sec > $stopTimeoutSec) do={ $abortW...
by optio
Sat May 11, 2024 9:42 pm
Forum: Scripting
Topic: Script triggered by API not executed properly [SOLVED]
Replies: 7
Views: 5599

Re: Script triggered by API not executed properly [SOLVED]

:local contComment "CommentToIdentifyContainer" Now its supplied with an argument? :local contComment $1 Call me stupid, but where do i supply that? That's also script change but forgot to mention, whole script code is added into global var as function which accepts container comment as a...
by optio
Sat May 11, 2024 5:03 pm
Forum: Scripting
Topic: Script triggered by API not executed properly [SOLVED]
Replies: 7
Views: 5599

Re: Script triggered by API not executed properly [SOLVED]

Glad that you find it useful, I did additionally some small changes to print out messages in terminal, not just in log and moved config vars on top for convenience, but core of script logic remains as in linked topic from OP, here is my latest ver: :global GcontainerUpdate do={ # After ROS upgrade c...
by optio
Thu May 09, 2024 10:02 pm
Forum: General
Topic: serious problem with arp table!
Replies: 8
Views: 758

Re: serious problem with arp table!

In case of Apple TV, could be issue with combination of DHCP setting "Add ARP for Leases" and Apple TV Wi-Fi privacy (Wifi MAC randomization).
by optio
Thu May 09, 2024 9:01 pm
Forum: Containers
Topic: Container backup Topic is solved
Replies: 6
Views: 4238

Re: Container backup Topic is solved

And did you tried to backup/restore root OS dir like that? @nieprzem generally it not needed to backup containers root dir, just mounts which are preserving configuration and other files that are needed for service to be restored as configured. Then these directories can be mounted not as container ...
by optio
Thu May 09, 2024 8:21 pm
Forum: Containers
Topic: Container backup Topic is solved
Replies: 6
Views: 4238

Re: Container backup Topic is solved

You can just insert USB drive to Linux machine or VM and mount it inside Linux, use tar for backuping to preserve special files (like in /dev), permissions and symlinks on dirs/files, example . Not sure it can be done without detaching USB from MT device, over SMB you cannot get permissions and othe...
by optio
Thu May 09, 2024 7:53 pm
Forum: Containers
Topic: Container backup Topic is solved
Replies: 6
Views: 4238

Re: Container backup Topic is solved

I assume USB is formatted as FAT because it can be browsed on Windows? See https://help.mikrotik.com/docs/display/ROS/Container : Container use example Prerequisites: RouterOS device with RouterOS v7.4beta or later and installed Container package Physical access to a device to enable container mode ...
by optio
Mon May 06, 2024 10:46 am
Forum: General
Topic: User and pass
Replies: 7
Views: 688

Re: User and pass

how to use the tool?
There are examples on page (steps Decrypt->Unpack->Extract Users), it's Python script which extracts data from ROS backup.
by optio
Sun May 05, 2024 11:13 pm
Forum: General
Topic: Wireguard road warrior setup does not work under WiFi
Replies: 21
Views: 1392

Re: Wireguard road warrior setup does not work under WiFi

What is the purpose of "road warrior" VPN if you unable to connect to it from any WAN IP? :) Allowing all IP address ranges of all ISPs available on locations from where you assume you will be connected is a bit silly, unless this is not VPN for travelling purposes (but then it is not &quo...
by optio
Sun May 05, 2024 6:36 pm
Forum: Scripting
Topic: Script SMS forward sms
Replies: 7
Views: 1496

Re: Script SMS forward sms

No problem on my side for years. I use 2 different modem, 1 Mikrotik LTE and 1 USB. My script deletes the SMS immediately after forwading, including the empty lines. What is important is not to overload the received SMS. I'm referring to sent messages (outbox), these messages are not deleted from S...
by optio
Sun May 05, 2024 6:20 pm
Forum: Beginner Basics
Topic: Mopidy issue
Replies: 9
Views: 912

Re: Mopidy issue

@webnoob Why don't set hostname to 0.0.0.0 (or :: ) and it will listen on all interfaces? Then you don't need to worry about host IP changes (like using host name) unless you have multiple interfaces (excluding lo) and you want service to listen only on interface with IP 192.168.xxx.xxx. Regarding h...
by optio
Sun May 05, 2024 2:47 am
Forum: General
Topic: How to block YouTube effectively
Replies: 37
Views: 3590

Re: How to block YouTube effectively

DNS blocking can be trivially bypassed by putting resolved IP addresses for blocked hosts into OS hosts file.
by optio
Sat May 04, 2024 4:20 pm
Forum: General
Topic: User and pass
Replies: 7
Views: 688

Re: User and pass

if i had old version how can i get password?
Depends on old version, this can be used for ROS versions 6.13 - 6.45
by optio
Fri May 03, 2024 6:20 pm
Forum: Scripting
Topic: Functions and function parameters
Replies: 54
Views: 104670

Re: Functions and function parameters

Yes, sure, I did. I said I execute it.
From prev. post:
But, when I execute the same code via another script, the global variable value2 is always empty.
My code is not same code if you look closely.
by optio
Fri May 03, 2024 5:48 pm
Forum: Forwarding Protocols
Topic: Virtual Host (Multiple Subdomains, 1 public ip) DSTNat to Specific IPs
Replies: 4
Views: 511

Re: Virtual Host (Multiple Subdomains, 1 public ip) DSTNat to Specific IPs

ROS doesn't provide reverse proxy service, you will need to setup it manually on some server or in ROS container, there are many choices like HAProxy, Nginx, Apache, Caddy... In ROS setup nat for HTTP/S ports to IP of reverse proxy and rest is in reverse proxy configuration depending which is used. ...
by optio
Fri May 03, 2024 5:37 pm
Forum: General
Topic: Setup Wireguard to use NextDNS
Replies: 2
Views: 345

Re: Setup Wireguard to use NextDNS

I'm guessing OP wants that wg peers use NextDNS as resolver when connected. But not sure what this means I just setup NextDNS on MK router. Is this means that ROS DNS server uses NextDNS as upstream resolver? Anyway, DNS config property with IP (ROS IP?) of DNS resolver in [Interface] section of pee...
by optio
Fri May 03, 2024 5:09 pm
Forum: Scripting
Topic: Functions and function parameters
Replies: 54
Views: 104670

Re: Functions and function parameters

Assuming that FunctionTest is already created as global from elsewhere, you first need to define it before call when called inside another script (or inside another function scope).
:global FunctionTest
:global value2 [$FunctionTest var1="test"]
by optio
Fri May 03, 2024 4:36 pm
Forum: Scripting
Topic: Script SMS forward sms
Replies: 7
Views: 1496

Re: Script SMS forward sms

Be aware that this could happen when sending SMS over ROS.
by optio
Wed Apr 24, 2024 9:27 pm
Forum: Scripting
Topic: How to use fetch tool with IPv6
Replies: 9
Views: 811

Re: How to use fetch tool with IPv6

Try with :put [/tool fetch url="http://$ipv6add/index.php" http-header-field="Host:api.myip.com" output=user as-value] Note: use http protocol, https requires (E)SNI host name which is not set from URL when accesing over IP and SSL handshake will fail since certificate is not iss...
by optio
Wed Apr 24, 2024 6:54 pm
Forum: General
Topic: RouterOS 7 can't edit dynamic object
Replies: 18
Views: 1888

Re: RouterOS 7 can't edit dynamic object

Since this thread topic about dynamic rules in general I will just mention UPnP dynamic rules, above conversation is mainly about hotspot rules and this is not related. Yes, if you switch on something that creates the dynamic rules, then those rules must be removed after the feature gets disabled. F...
by optio
Sun Apr 21, 2024 4:02 pm
Forum: General
Topic: Feature requests
Replies: 1748
Views: 647524

Re: Feature requests

Not sure if this is already asked, please put configuration change log into separate topic, for eg. system,info,configuration to have ability to filter it out without filtering other logs from system,info topic. When configuration change logging was introduced into system,info topic, log can get blo...
by optio
Mon Apr 01, 2024 2:26 am
Forum: Scripting
Topic: Is 8MB in a variable from a txt file is possible?
Replies: 54
Views: 3797

Re: Is 8MB in a variable from a txt file is possible?

@optio you really need to cut the chunks because you don't know if you get chunk-cuts in the middle of the IP address. So I re-introduced the cut-back of 512 bytes and early ends of 256 bytes in $data. To read the complete list I have added that the last chunk does not end early, when 256 bytes are...
by optio
Sun Mar 31, 2024 11:48 pm
Forum: Scripting
Topic: Is 8MB in a variable from a txt file is possible?
Replies: 54
Views: 3797

Re: Is 8MB in a variable from a txt file is possible?

Did you check that script is actually working correctly? Try to find all matching lines from downloaded file with regex ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}.*http.*$ and you will see that 2935 lines are matching for import and from your log count is 2934, as I analized last matching line ...
by optio
Sun Mar 31, 2024 8:58 pm
Forum: Scripting
Topic: Is 8MB in a variable from a txt file is possible?
Replies: 54
Views: 3797

Re: Is 8MB in a variable from a txt file is possible?

Removing the file after download should be optional and the file could then be reused on reboot, even before the connection comes up. Depends on usage, in this case if in current script /file remove "$listname.txt" is just removed it will not work anyway, update function needs to be modif...
by optio
Sun Mar 31, 2024 7:54 pm
Forum: General
Topic: Can't access Mikrotik website from china
Replies: 12
Views: 850

Re: Can't access Mikrotik website from china

license.mikrotik.com and (www.)mikrotik.com are using TLS 1.3 (forum.mikrotik.com does not), from Wikipedia : SSL protocols In March 2020, China suddenly started blocking websites using the TLS (Transport Layer Security 1.3) and ESNI (Encrypted Server Name Indicator) for SSL certificates, since ESNI...
by optio
Sun Mar 31, 2024 7:30 pm
Forum: Scripting
Topic: Is 8MB in a variable from a txt file is possible?
Replies: 54
Views: 3797

Re: Is 8MB in a variable from a txt file is possible?

In update function after partnumbers :for loop use: :local listCount [:len [find list=$listname dynamic]] And log listCount variable or use as return value of function and use it after function call... Examples: ... :local update do={ ... :local listCount [:len [find list=$listname dynamic]] :put &q...
by optio
Sun Mar 31, 2024 6:40 pm
Forum: Scripting
Topic: Is 8MB in a variable from a txt file is possible?
Replies: 54
Views: 3797

Re: Is 8MB in a variable from a txt file is possible?

Script needed some adjustments for single fetch, try with this: # Turris Import by Blacklister # 20210823 new version that directly downloads from the external server # 20240331 rewritten to fetch the whole file and write it to a local file and then import it { # import config - delay for slow route...
by optio
Sun Mar 31, 2024 5:28 pm
Forum: Scripting
Topic: Is 8MB in a variable from a txt file is possible?
Replies: 54
Views: 3797

Re: Is 8MB in a variable from a txt file is possible?

I edited above comment meanwhile, this request can be avoided. Order of commands needs to be adapted to get filesize after file is fetched and set other variables and put rest of the code below it which depends on filesize.
by optio
Sun Mar 31, 2024 5:19 pm
Forum: Scripting
Topic: Is 8MB in a variable from a txt file is possible?
Replies: 54
Views: 3797

Re: Is 8MB in a variable from a txt file is possible?

maybe src-address argument for fetch is causing the problem? P.S. I think :local filesize ([/tool fetch url=$url src-address=10.10.10.10 keep-result=no as-value]->"total") is not needed, you can get file size from downloaded file, it will avoid double fetching of same content. :local files...
by optio
Sun Mar 31, 2024 4:04 pm
Forum: Scripting
Topic: Is 8MB in a variable from a txt file is possible?
Replies: 54
Views: 3797

Re: Is 8MB in a variable from a txt file is possible?

Yes, file chunk read to variable works on ROS 7.14: :local data ([/file read offset=0 chunk-size=2 file=nameservers-all.txt as-value]->"data") :put $data 26 It depends which ROS version @Kataius is using, more optimal is to download whole file and parse its data by chunks than using multip...
by optio
Sun Mar 31, 2024 3:36 pm
Forum: RouterBOARD hardware
Topic: Request for Python Script to Change L2TP Password in MikroTik Router
Replies: 6
Views: 850

Re: Request for Python Script to Change L2TP Password in MikroTik Router

For ROS API (not REST) you have Python3 example on MT help page or use pip packages like this or this . For REST API, it should work with any HTTP client (like requests module mentioned above), requests and responses bodies are in JSON format. For eg. here is some Python module which is using REST A...
by optio
Sun Mar 31, 2024 2:54 pm
Forum: Scripting
Topic: Is 8MB in a variable from a txt file is possible?
Replies: 54
Views: 3797

Re: Is 8MB in a variable from a txt file is possible?

@Kataius as you can see issue is troubleshooted, override Accept-Encoding header in fetch so that gzip encoding will not be set in it and it should work (it's a server issue).
P.S. use https url scheme since for http server respond with redirect to https, fetch will perform 1 less request.
by optio
Sun Mar 31, 2024 2:22 pm
Forum: Scripting
Topic: Is 8MB in a variable from a txt file is possible?
Replies: 54
Views: 3797

Re: Is 8MB in a variable from a txt file is possible?

No gzip support activated on the server? Range on server side is not supported when gzip encoding is set, all gzipped data is retrieved then. This is some issue on Caddy http server, public-dns.info is using Caddy as I see from response headers. curl -s https://public-dns.info/nameservers-all.txt |...
by optio
Sun Mar 31, 2024 1:29 pm
Forum: Scripting
Topic: Is 8MB in a variable from a txt file is possible?
Replies: 54
Views: 3797

Re: Is 8MB in a variable from a txt file is possible?

Yes, that's strange, I just checked with local http server and indeed it returns ok: curl -s -H 'Range: bytes=0-1' http://192.168.100.21/info.php <? :put ([/tool fetch url="http://192.168.100.21/info.php" http-header-field="Range: bytes=0-1" output=user as-value]->"data"...
by optio
Sun Mar 31, 2024 1:10 pm
Forum: Scripting
Topic: Is 8MB in a variable from a txt file is possible?
Replies: 54
Views: 3797

Re: Is 8MB in a variable from a txt file is possible?

This is server side operation for Range header (server returns bytes depending on Range header value), see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range That's is my whole point, yes you can extract from these returned bytes some bytes, but you cannot achieve chunked download of al...
by optio
Sun Mar 31, 2024 12:08 pm
Forum: Scripting
Topic: Is 8MB in a variable from a txt file is possible?
Replies: 54
Views: 3797

Re: Is 8MB in a variable from a txt file is possible?

Read it like this: Curl wc is word count not bytes. Maybe you missed -c argument... $ wc --help Usage: wc [OPTION]... [FILE]... or: wc [OPTION]... --files0-from=F Print newline, word, and byte counts for each FILE, and a total line if more than one FILE is specified. A word is a non-zero-length seq...
by optio
Sat Mar 30, 2024 11:49 pm
Forum: Scripting
Topic: Is 8MB in a variable from a txt file is possible?
Replies: 54
Views: 3797

Re: Is 8MB in a variable from a txt file is possible?

@optio nothing wrong there, Data is a variable and so 64512 bytes is the max.
It shouldn't be since range header is set. 64512 is because full data is fetched and limited to that and that's wrong (it should be 2 as from curl).
by optio
Sat Mar 30, 2024 6:53 pm
Forum: Scripting
Topic: Is 8MB in a variable from a txt file is possible?
Replies: 54
Views: 3797

Re: Is 8MB in a variable from a txt file is possible?

I suspect there is a bug on http-header-field argument for fetch command, maybe it is not sent correctly (I didn't check this over local web server to analyse), download data is always 64512 bytes regardles which range is set in header when output=user as-value : :put [:len ([/tool fetch url="h...
by optio
Thu Mar 14, 2024 10:22 pm
Forum: Scripting
Topic: simple double if / else error [SOLVED]
Replies: 11
Views: 4335

Re: simple double if / else error [SOLVED]

replace
:if ($routewan1 = "true") do ={
with
:if ($routewan1 = "true") do={

do (or from, to, else, on-error, ...) with whitespace before = is not correct syntax, but after = whitespace can exists before block brackets.
by optio
Thu Mar 14, 2024 9:59 pm
Forum: Scripting
Topic: Mikrotik script syntax highlight [SOLVED]
Replies: 10
Views: 3505

Re: Mikrotik script syntax highlight [SOLVED]

Here is something similar for VS Code viewtopic.php?t=200228
by optio
Thu Mar 14, 2024 9:43 pm
Forum: Announcements
Topic: v7.14.3 [stable] is released!
Replies: 671
Views: 209330

Re: v7.14.1 [stable] is released!

@clte19ax Maybe there is a issue that containers are not stopped gracefully before system shutdown (or there is short timeout for waiting). On mine device Pi-hole container is in stopping state about 2-3s before goes to stopped when manually stopped, some others a bit shorter, but overall, device sh...
by optio
Sun Mar 10, 2024 2:38 am
Forum: Scripting
Topic: snmpwalk/snmpget can't read global variable [SOLVED]
Replies: 14
Views: 7539

Re: snmpwalk/snmpget can't read global variable [SOLVED]

In this case personally I will rather use file in root path which is using tmpfs (assuming ROS is running on device with flash drive) than writing value into some config if presistance is not needed since such file will act as global variable, preserved only in RAM, no flash writes upon setting valu...
by optio
Sat Mar 09, 2024 10:35 pm
Forum: RouterBOARD hardware
Topic: Chateau LTE18 ax external antenna conn. for LTE or WIFI?
Replies: 6
Views: 4409

Re: Chateau LTE18 ax external antenna conn. for LTE or WIFI?

From my experience (on Chateau LTE12) when lte antenna is set manually, in Winbox "External Antenna Selected" is empty (this field is only for auto selection as mentioned here for external-antenna-selected ), but from CLI: /interface/lte/settings> print mode: auto firmware-path: firmware e...
by optio
Sat Mar 09, 2024 10:16 pm
Forum: Scripting
Topic: How do I protect source code from being pirated?
Replies: 29
Views: 1654

Re: How do I protect source code from being pirated?

Since fetch requires ftp user policy from ROS 7.13+ version it might be a problem as you stated, if ppp up/down events are limited as netwatch, but this is not documented afaik, it needs to be tested to be sure.
by optio
Sat Mar 09, 2024 8:58 pm
Forum: Scripting
Topic: How do I protect source code from being pirated?
Replies: 29
Views: 1654

Re: How do I protect source code from being pirated?

It was suggestion if this is really some "secret" algorithm in script, I'm not using PPPoE, so PPP profile scripts for PPPoE cannot execute fetch to some external service on LAN with some static IP (such service doesn't need to be on some server accessed over WAN and actually it is better ...
by optio
Sat Mar 09, 2024 8:07 pm
Forum: Scripting
Topic: snmpwalk/snmpget can't read global variable [SOLVED]
Replies: 14
Views: 7539

Re: snmpwalk/snmpget can't read global variable [SOLVED]

I think problem is that SNMP service is executing script with different user (some internal system) than ROS login user which created global variable. Users cannot read global variables created by another. Same issue is for eg. with netwatch tool and getting/setting global variables that are used wi...
by optio
Sat Mar 09, 2024 4:50 pm
Forum: Scripting
Topic: Extender timeout in fetch tool
Replies: 1
Views: 326

Re: Extender timeout in fetch tool

try with duration argument for fetch: /tool fetch url="http://172.21.0.58:8008/" duration=1m
by optio
Sat Mar 09, 2024 4:07 pm
Forum: Scripting
Topic: How do I protect source code from being pirated?
Replies: 29
Views: 1654

Re: How do I protect source code from being pirated?

Or create external service (in PHP or whatever) which will perform same script logic and trigger with fetch external service endpoint in PPP profile up and down scripts with some parameters you need, you can control/fetch data from ROS over its API from that service. Restrict access to server where ...
by optio
Sat Mar 09, 2024 3:27 pm
Forum: Beginner Basics
Topic: DNS setup with AdGuard and static hosts
Replies: 5
Views: 1706

Re: DNS setup with AdGuard and static hosts

When I now ping "commander", I got "Name or service not known". The all makes sense, but I want to define the static hosts and DNS entries in my Mikrotik Router. Is there a way I can achieve this? Like using my MT-router as the default DNS server, but all DNS requests which are ...
by optio
Wed Mar 06, 2024 9:44 pm
Forum: Virtualization
Topic: Portainer or Yacht on MT /Container
Replies: 5
Views: 692

Re: Portainer or Yacht on MT /Container

If resource monitoring is needed then ROS will need to expose per container resource usage otherwise it can be achieved only with custom container image with some resource monitoring service installed along with actual service.
by optio
Wed Mar 06, 2024 7:29 pm
Forum: Virtualization
Topic: Portainer or Yacht on MT /Container
Replies: 5
Views: 692

Re: Portainer or Yacht on MT /Container

You can create scheduled script that checks if container is running or use external monitoring software that will perform that over ROS API.
by optio
Wed Mar 06, 2024 6:53 pm
Forum: Virtualization
Topic: CHR using Apple Virtualization Framework (via UTM)
Replies: 53
Views: 5185

Re: CHR using Apple Virtualization Framework (via UTM)

And it is also possible to compare checksums from original files is someone is concerned...
by optio
Wed Mar 06, 2024 11:34 am
Forum: Scripting
Topic: Calculate date and time in script
Replies: 8
Views: 865

Re: Calculate date and time in script

Is it $validity string type variable then? Did you try
:local validitytime [:tonum [:totime $validity]]
:log info "validitytime: $validitytime"
?
Or could be ROS version issue, you did not specify on which is this performed, maybe on older versions :tonum from time doesn't work.
by optio
Wed Mar 06, 2024 10:37 am
Forum: Virtualization
Topic: CHR using Apple Virtualization Framework (via UTM)
Replies: 53
Views: 5185

Re: CHR using Apple Virtualization Framework (via UTM)

warning secured... :)
by optio
Tue Mar 05, 2024 7:25 pm
Forum: Scripting
Topic: Calculate date and time in script
Replies: 8
Views: 865

Re: Calculate date and time in script

Regarding $validity it is already explained in my previous post, but if is hard to understand, here it is: >:local validity 3d00:00:00; :put [:tonum $validity] 259200 >:local validity 01:00:00; :put [:tonum $validity] 3600 >:local validity "3d00:00:00"; :put [:tonum [:totime $validity]] 25...
by optio
Mon Mar 04, 2024 11:19 pm
Forum: General
Topic: TCP SYN flood test and confusion
Replies: 6
Views: 684

Re: TCP SYN flood test and confusion

I think it will not be noticed in some shorter period, mine ISPs did not complain when I did this (device connected to ISP from which I was attacking and ISP on which is router connected). See this post and topic conversation, maybe address lists are not issue but you can test it.
by optio
Mon Mar 04, 2024 11:00 pm
Forum: General
Topic: TCP SYN flood test and confusion
Replies: 6
Views: 684

Re: TCP SYN flood test and confusion

If you are behind CGNAT then you are protected from this attack since attacker cannot reach your WAN IP, your public IP is on another subnet. If you want to test this properly setup WAN connection without CGNAT and attack over WAN. See also how long you can perform attack until address lists are fil...
by optio
Mon Mar 04, 2024 10:46 pm
Forum: Scripting
Topic: Is 8MB in a variable from a txt file is possible?
Replies: 54
Views: 3797

Re: Is 8MB in a variable from a txt file is possible?

Maybe there is some limit even if you have free memory for much more bytes... Try with my approach mentioned in previous post if you skilled with scripting to implement it, actually you don't need HEAD method first to get file bytes, it is more optimal but it works only on ROS 7.14+, as I see you ar...
by optio
Mon Mar 04, 2024 10:29 pm
Forum: General
Topic: TCP SYN flood test and confusion
Replies: 6
Views: 684

Re: TCP SYN flood test and confusion

Which rules for TCP SYN flooding protection did you add? From here maybe?
If you are not behind CGNAT try to perform
hping3 -c 15000 -d 120 -S -w 64 -p <TCP_PORT> --flood --rand-source <ROUTER_WAN_IP>
from device using other WAN connection and see how it goes...
by optio
Mon Mar 04, 2024 9:42 pm
Forum: Scripting
Topic: Is 8MB in a variable from a txt file is possible?
Replies: 54
Views: 3797

Re: Is 8MB in a variable from a txt file is possible?

Ah ok, just current free memory is limit... but also proposed solution for parsing chunks in prev. post which could work on any device without worrying about free memory, for this case doesn't matter, but for parsing 100Mb file maybe it will and it can be implemented in ROS 7.14 without waiting as-v...
by optio
Mon Mar 04, 2024 7:54 pm
Forum: Scripting
Topic: Calculate date and time in script
Replies: 8
Views: 865

Re: Calculate date and time in script

See script in this post , for converting $lastSeenStr (date-time format) into timestamp you can use $datetime2epoch function created by @rextended taken from here , $validity is in time type, to convert it into timestamp you can use ROS global command :tonum , in your case [:tonum $validity] (if is ...
by optio
Mon Mar 04, 2024 7:05 pm
Forum: Scripting
Topic: Is 8MB in a variable from a txt file is possible?
Replies: 54
Views: 3797

Re: Is 8MB in a variable from a txt file is possible?

I didn't tested it, strange it is not initially implemented to return value as default, there is no much practical use without value. Btw., regarding your function, are you sure this will work on large files and $thefile will not reach variable size limit or maybe device memory limit, since it appen...
by optio
Sun Mar 03, 2024 6:16 pm
Forum: Beginner Basics
Topic: Can't send SMS with MBIM: MEMORY_FULL [SOLVED]
Replies: 3
Views: 3232

Re: Can't send SMS with MBIM: MEMORY_FULL [SOLVED]

You can delete messages using modem AT command and executing it over ROS CLI command /interface/lte/at-chat lte1 input="<SOME_AT_COMMAND>" <wait=yes>, see more in ROS LTE manual how to use at-chat . AT commands depends on modem used by device, for your modem ( EG18-EA ) see this manual . F...
by optio
Sat Mar 02, 2024 3:07 pm
Forum: Scripting
Topic: Creating a script for sending SMS
Replies: 15
Views: 2630

Re: Creating a script for sending SMS

Can't tell where is the issue regarding removing SMS, try to upgrade ROS to 7.14, there is some fix in 7.14 regarding SMS removal: *) modem - fixed SMS removal (introduced in v7.13); here is script that retries removing SMS in recursion until no error with max retry count 10, controlled by maxRetry ...
by optio
Sat Mar 02, 2024 1:55 pm
Forum: Announcements
Topic: v7.14.3 [stable] is released!
Replies: 671
Views: 209330

Re: v7.14 [stable] is released!

chateau seized up and had to cut the power as connectivity was lost, replugged into mains again, storage went to 0 so have zero free space - have opened support ticket to find out how to clean up (what I suspect was probably a temp file in /tmp somewhere or a core dump) Had similar issues with 7.13...
by optio
Sat Mar 02, 2024 11:47 am
Forum: Announcements
Topic: v7.14.3 [stable] is released!
Replies: 671
Views: 209330

Re: v7.14 [stable] is released!

Irony was lost when I migrated from wireless package to this wifi-qcom-ac *) package - reduced "wireless" package size for ARM, ARM64, MIPSBE, MMIPS devices; I'm using same device as yours, but continued to use "wireless" package and actually gain 36KiB (500KiB -> 536KiB free) a...
by optio
Fri Mar 01, 2024 5:41 pm
Forum: General
Topic: Block Youtube on computers and smartphone apps
Replies: 85
Views: 20716

Re: Block Youtube on computers and smartphone apps

It will work until Youtube hosts implements ESNI. After that you can only block by address list with resolved Youtube hosts and hoping that some of that resolved Youtube host IPs are not shared with some other hosts that are on same IP that shouldn't be blocked (some Google service for eg.). There a...
by optio
Fri Mar 01, 2024 4:51 pm
Forum: Scripting
Topic: fetch seems to behave different when called in function [SOLVED]
Replies: 12
Views: 3196

Re: fetch seems to behave different when called in function [SOLVED]

Local function can call other local function if passed as argument, see script in this post , all local functions and variables. Like from that script: $escapeValue $v escapeStr=$escapeStr arrayToStr=$arrayToStr , of course you need to pass as argument to root function all functions called from all ...
by optio
Fri Mar 01, 2024 12:52 pm
Forum: Scripting
Topic: Is 8MB in a variable from a txt file is possible?
Replies: 54
Views: 3797

Re: Is 8MB in a variable from a txt file is possible?

From ROS version 7.13 there is /file/read command (currently undocumented) which you can use to read file chunked with arguments chunk-size and offset . First, fetch command will need to download whole file on to FS and not be used to return response data as value to variable. This can be useful for...
by optio
Thu Feb 29, 2024 10:47 pm
Forum: Beginner Basics
Topic: Pihole - NAT firewall Rule not redirected static DNS [SOLVED]
Replies: 3
Views: 1169

Re: Pihole - NAT firewall Rule not redirected static DNS [SOLVED]

Personally I will go with strict as possible rule just for DoH and block all DoT - 1st option, without dst-address-list in DoT rules to block all DoT but to avoid potential blocking other service ports (if maybe I will need them) for addresses in DNS-DOH list which is in DoH rule (unlike DoH rule in...
by optio
Thu Feb 29, 2024 10:03 pm
Forum: Virtualization
Topic: CHR using Apple Virtualization Framework (via UTM)
Replies: 53
Views: 5185

Re: CHR using Apple Virtualization Framework (via UTM)

Ah yes, I forgot about Rosetta is not supporting Linux bootstrapping. Well we will need to wait CHR ROS for aarch64 then...
by optio
Thu Feb 29, 2024 8:34 pm
Forum: Virtualization
Topic: CHR using Apple Virtualization Framework (via UTM)
Replies: 53
Views: 5185

Re: CHR using Apple Virtualization Framework (via UTM)

Great work @Amm0
chr_utm_i.png
Didn't try yet over Rosetta on M, but it could be issues with FS corruption as I mentioned in my previous post (or is just native ARM issue). Too bad there is no USB passthrough support.
by optio
Thu Feb 29, 2024 5:48 pm
Forum: Scripting
Topic: fetch seems to behave different when called in function [SOLVED]
Replies: 12
Views: 3196

Re: fetch seems to behave different when called in function [SOLVED]

Or you don't need to use global variable at all and pass local variable as function argument... :local afraidSyncURL "http://sync.afraid.org/u/random_token/" :local updateDDNS do={ :local result [/tool fetch url=$1 as-value output=user] ... $updateDDNS $afraidSyncURL :log info "FreeDN...
by optio
Thu Feb 29, 2024 3:55 pm
Forum: Scripting
Topic: Creating a script for sending SMS
Replies: 15
Views: 2630

Re: Creating a script for sending SMS

I meant if you will using this SMS check along with logic from my past script which you tried and which goes out of sync for some reason... But if you want just to check SMS inbox, from first look your script maybe needs some corrections but something like that can be put in scheduler event. Maybe o...
by optio
Wed Feb 28, 2024 10:12 pm
Forum: Scripting
Topic: Creating a script for sending SMS
Replies: 15
Views: 2630

Re: Creating a script for sending SMS

If that's works for you ok, if WAN network is not blocked in between scheduler interval (provider gives some grace bandwidth or time until SMS is sent when quota is reached)... or you want to put this function in logic of an existing script? If you want better message cleanup match with "10 GB&...
by optio
Wed Feb 28, 2024 6:49 pm
Forum: Scripting
Topic: Creating a script for sending SMS
Replies: 15
Views: 2630

Re: Creating a script for sending SMS

Are you sure that provider is not resetting quota after limit is reached and not immediately after SMS is sent which causes unsync? In such case you will need first to reach quota limit and then calibrate script, but it will still require small change in script to add diff from quota limit and thres...
by optio
Mon Feb 26, 2024 10:52 pm
Forum: General
Topic: Bridge use-ip-firewall + mangle + queue doesn't work
Replies: 2
Views: 917

Re: Bridge use-ip-firewall + mangle + queue doesn't work

I don't have such issue with queue tree, ip firewall enabled on bridge, no bridge filters, fastrack rule enabled for packets without mark and when I set max limit to queue items it limits, tested with some lower value than actual current bandwidh (since my bandwith varries over LTE so I used some lo...
by optio
Mon Feb 26, 2024 12:41 pm
Forum: Scripting
Topic: Creating a script for sending SMS
Replies: 15
Views: 2630

Re: Creating a script for sending SMS

Just be careful with that and don't and use short scheduler intervals since flash has limited sector writes, setting comment writes config on flash and also when using file on flash/* path. Using USB drive is alternative to avoid flash wear-out since USB drive is easier to replace when its wear-out ...
by optio
Sun Feb 25, 2024 4:33 pm
Forum: Scripting
Topic: Creating a script for sending SMS
Replies: 15
Views: 2630

Re: Creating a script for sending SMS

@ludycro, @hafte You can use one of these two scripts in scheduler event (startup with some interval, eg. 5min). Script with interface rx/tx bytes with persistence in interface comment :local smsSendThresholdMiB 9216 :local smsNumber "13880" :local smsMessage "NASTAVI" :local wan...
by optio
Wed Feb 21, 2024 6:53 pm
Forum: RouterBOARD hardware
Topic: hAP ax3 - how to use the API to control ithe router remotely - Can serial port on board be used? [SOLVED]
Replies: 12
Views: 4879

Re: hAP ax3 - how to use the API to control ithe router remotely - Can serial port on board be used? [SOLVED]

I forgot to mention @RadckM or quote, I was referring to statement: Anyway - Since there is no other option I will end up doing the ethernet and one of the options of controlling the router over API, using USB to Serial or anything like that is not an option fo rme . But I see now that problem is re...
by optio
Wed Feb 21, 2024 6:37 pm
Forum: RouterBOARD hardware
Topic: hAP ax3 - how to use the API to control ithe router remotely - Can serial port on board be used? [SOLVED]
Replies: 12
Views: 4879

Re: hAP ax3 - how to use the API to control ithe router remotely - Can serial port on board be used? [SOLVED]

Idk why USB to serial is not an option for you, but if is because you already have device connected to USB, you can use USB hub connected to MT device and connect multiple USB devices including USB to serial into hub. There are also devices such this and you don't need another USB to serial on lapto...
by optio
Wed Feb 21, 2024 5:37 pm
Forum: Wireless Networking
Topic: Chateau 5G R16: request for modem's AT Command documentation
Replies: 10
Views: 1241

Re: Chateau 5G R16: request for modem's AT Command documentation

Could be on MNO side since users are reporting issues regarding PDU Session modification to Open5GS using Chateau 5G and it was fixed on Open5GS side, like this issue.
by optio
Tue Feb 20, 2024 6:03 pm
Forum: Virtualization
Topic: CHR using Apple Virtualization Framework (via UTM)
Replies: 53
Views: 5185

Re: CHR using Apple Virtualization Framework (via UTM)

For me VFM and VirtioFS seems to be stable using with Docker on M1, have some databases running with it in containers (even some with x86_64 arch using Rosetta), so I guess UTM needs to improve stability and it will be great free VM alternative on Macs.
by optio
Tue Feb 20, 2024 5:49 pm
Forum: General
Topic: Forward SOCKS server traffic through specific interface
Replies: 6
Views: 1054

Re: Forward SOCKS server traffic through specific interface

Sorry I don't have experience with sstp, especially not in such setup, maybe some others have, but if nobody is replying you're out of luck here.
by optio
Tue Feb 20, 2024 5:34 pm
Forum: Virtualization
Topic: CHR using Apple Virtualization Framework (via UTM)
Replies: 53
Views: 5185

Re: CHR using Apple Virtualization Framework (via UTM)

Did you experienced any FS corruption running on UTM with Apple Virtualization Framework? Related to this still open issue for UTM -> https://github.com/utmapp/UTM/issues/4840 I tried with Debian 12.5 (arm64, without Rosetta) which installation is using kernel 6.1 and FS gets corrupted eventually on...
by optio
Tue Feb 20, 2024 2:42 am
Forum: General
Topic: Android and IOS VPN with Mikrotik
Replies: 12
Views: 1261

Re: Android and IOS VPN with Mikrotik

I think this is related to ROS version, not sure on which is introduced, I have latest 7.13.5
wg-peer.png
by optio
Mon Feb 19, 2024 11:11 pm
Forum: General
Topic: Android and IOS VPN with Mikrotik
Replies: 12
Views: 1261

Re: Android and IOS VPN with Mikrotik

Is there any solution for QR code in wireguard without BTH???
Yes, QR code is visible in Winbox/WebFig in WG peer configuration
by optio
Mon Feb 19, 2024 10:47 pm
Forum: General
Topic: Android and IOS VPN with Mikrotik
Replies: 12
Views: 1261

Re: Android and IOS VPN with Mikrotik

I have static public IP. I no need BTH. You don't need BTH because you have public static IP (and guessing not behind CGNAT) or you don't need BTH because you don't need internet connection routed over home VPN? BTH VPN will not use MT cloud server for VPN connection if VPN port is accessible from ...
by optio
Mon Feb 19, 2024 10:30 pm
Forum: Announcements
Topic: WinBox v3.40 released!
Replies: 164
Views: 157716

Re: WinBox v3.40 released!

downloaded the Oct '23 ver from another site which shows 3.40.
That's brave (or...?), running router admin software downloaded from non official site
by optio
Mon Feb 19, 2024 10:22 pm
Forum: Announcements
Topic: WinBox v3.40 released!
Replies: 164
Views: 157716

Re: WinBox v3.40 released!

Download button on that page has the same URL linked, so clicking there returns to same page. No way to download Winbox. From WinBox menu on download page: https://mt.lv/winbox64 vs https://mt.lv/winbox - how is this same URL? How does a user identify which version of Winbox is in use? Can't find t...
by optio
Mon Feb 19, 2024 6:36 pm
Forum: General
Topic: Android and IOS VPN with Mikrotik
Replies: 12
Views: 1261

Re: Android and IOS VPN with Mikrotik

There is also MT "Back To Home" mobile app for iOS and Android which simplifies VPN (Wireguard) configuration process.
by optio
Mon Feb 19, 2024 5:46 pm
Forum: Beginner Basics
Topic: Pihole - NAT firewall Rule not redirected static DNS [SOLVED]
Replies: 3
Views: 1169

Re: Pihole - NAT firewall Rule not redirected static DNS [SOLVED]

This doesn't make sense since have hairpin dst-nat NAT rule for all outgoing DNS traffic from LAN to Pi-hole unless Chrome is performing DoH request to Google DNS when is set manually and that bypasses router NAT rules. Did you try with other browsers? Since dig is unable to connect due to NAT rules...
by optio
Mon Feb 19, 2024 12:29 pm
Forum: General
Topic: Amazon Fire TV and traffic to TCP echo service on port 7 [SOLVED]
Replies: 5
Views: 1884

Re: Amazon Fire TV and traffic to TCP echo service on port 7 [SOLVED]

@jfernandezr ignore it, this is some bot answer
by optio
Sun Feb 18, 2024 11:51 pm
Forum: The Dude
Topic: Is too much to ask for Dude x64 windows client?
Replies: 33
Views: 8682

Re: Is too much to ask for Dude x64 windows client?

it's annoying on a Intel Mac as it requires a VM...
It is possible to run it with crossover wine because it supports 32bit emulation
dude-mac.png
by optio
Thu Feb 15, 2024 10:56 pm
Forum: Wireless Networking
Topic: Chateau 5G R16: request for modem's AT Command documentation
Replies: 10
Views: 1241

Re: Chateau 5G R16: request for modem's AT Command documentation

Afaik all Chateau models have Quectel modems (maybe other LTE MT devices too or all), in MT devices brochures you can find modem model, like for this device where LTE modem model is stated R11mL-RG520F , strip MT model prefix up to dash you will get RG520F , Googling quectel RG520F AT command manual...
by optio
Thu Feb 15, 2024 12:13 am
Forum: Beginner Basics
Topic: Tilde sign in Terminal (Mac) [SOLVED]
Replies: 37
Views: 3175

Re: Tilde sign in Terminal (Mac) [SOLVED]

@Favazza if you still have issue with tilde, you can try with this Applescript run by Quick Action (Service): on run {input, parameters} tell application "System Events" to keystroke (ASCII character 126) & " " return input end run run Automator app->Quick Action->drag "...
by optio
Wed Feb 14, 2024 5:53 pm
Forum: Beginner Basics
Topic: Tilde sign in Terminal (Mac) [SOLVED]
Replies: 37
Views: 3175

Re: Tilde sign in Terminal (Mac) [SOLVED]

1) "real" tilde, Ascii and Unicode 126 or 0x0E : https://www.compart.com/en/unicode/U+007E No, it's 0x7E hex (as on link) And yes, on some layouts Opt+n can produce different character (non ascii) since this shortcut is for adding diacritic on supported character, as I mentioned Still c/p...
by optio
Tue Feb 13, 2024 11:57 pm
Forum: Beginner Basics
Topic: Tilde sign in Terminal (Mac) [SOLVED]
Replies: 37
Views: 3175

Re: Tilde sign in Terminal (Mac) [SOLVED]

Could be, but from my experience using external BT Magic Keyboard and keyboard on MBP never had such issues, but I'm not on US layout.
by optio
Tue Feb 13, 2024 11:42 pm
Forum: Wireless Networking
Topic: Channel Width (wifi-qcom-ac)
Replies: 11
Views: 1733

Re: Channel Width (wifi-qcom-ac)

If you have Android device you can try with WiFi Analyzer
by optio
Tue Feb 13, 2024 10:44 pm
Forum: Beginner Basics
Topic: Tilde sign in Terminal (Mac) [SOLVED]
Replies: 37
Views: 3175

Re: Tilde sign in Terminal (Mac) [SOLVED]

Not on all layouts, try on German for eg... For US you have much simpler shortcut, shift+` prints ~
by optio
Tue Feb 13, 2024 9:51 pm
Forum: Beginner Basics
Topic: Tilde sign in Terminal (Mac) [SOLVED]
Replies: 37
Views: 3175

Re: Tilde sign in Terminal (Mac) [SOLVED]

Opt+n is actualy shortcut to put tilde as diacritic on character that can have such diacritic, like Opt+n n prints ñ, or for ˆ diacritic Opt+i (on US) o to get ô, etc... But it can be used with space to print standalone diacritic. When Keyboard Viewer is active it shows which character supports diac...
by optio
Tue Feb 13, 2024 8:44 pm
Forum: Beginner Basics
Topic: Tilde sign in Terminal (Mac) [SOLVED]
Replies: 37
Views: 3175

Re: Tilde sign in Terminal (Mac) [SOLVED]

This means that his system/browser replaces ascii tilde to *whatever* tilde from my prev. post and also in any other app like some plain text editors? How is possible to work on that? :)
by optio
Tue Feb 13, 2024 8:35 pm
Forum: Beginner Basics
Topic: Tilde sign in Terminal (Mac) [SOLVED]
Replies: 37
Views: 3175

Re: Tilde sign in Terminal (Mac) [SOLVED]

Yeah but when you copy plain ascii character (~) from some text to cliboard (cmd+c) and paste it (cmd+v) it should be the same plain text character. Command with pbcopy is doing same thing but from bytes and it seems on paste there is no problem, I don't get it. Check with c/p command echo -n "...
by optio
Tue Feb 13, 2024 8:24 pm
Forum: Beginner Basics
Topic: Tilde sign in Terminal (Mac) [SOLVED]
Replies: 37
Views: 3175

Re: Tilde sign in Terminal (Mac) [SOLVED]

Something is wrong in on that macOS if copy from bytes is needed to get plain text character anyway... How is not possible to just simply c/p character from plain text, is some utility software running that intercepts clipboard which alters characters?
by optio
Tue Feb 13, 2024 2:42 pm
Forum: Beginner Basics
Topic: Tilde sign in Terminal (Mac) [SOLVED]
Replies: 37
Views: 3175

Re: Tilde sign in Terminal (Mac) [SOLVED]

https://discussions.apple.com/browse, sign in, ask question there, maybe you get response
by optio
Tue Feb 13, 2024 12:37 pm
Forum: General
Topic: OpenVPN auth. is always null-digest [SOLVED]
Replies: 2
Views: 694

Re: OpenVPN auth. is always null-digest [SOLVED]

Digest (Auth) is not used for GCM ciphers (always null), imho Auth selection should be disabled in window form when only GCM ciphers are selected to avoid confusion.
by optio
Mon Feb 12, 2024 11:41 pm
Forum: General
Topic: UPnP is not working?
Replies: 14
Views: 1065

Re: UPnP is not working?

This doesn't make sense, UPnP on ROS is creating dynamic dst-nat rules only (convenient for UPnP clients that randomizes/or some range that cannot be controlled/ open port or local client IP is not static) which are also possible to create manually, no need to spoof anything if si dst-nat issue. Whi...
by optio
Mon Feb 12, 2024 9:10 pm
Forum: Beginner Basics
Topic: Tilde sign in Terminal (Mac) [SOLVED]
Replies: 37
Views: 3175

Re: Tilde sign in Terminal (Mac) [SOLVED]

As I understand it is plain ~, for me it's same combination in any app for selected keyboard layout. Maybe it's something in Terminal Settings to set, if it's ~ in combination with Option key and there is Terminal Settings option in Keyboard tab "Use Option as Meta key", if checked it will...
by optio
Mon Feb 12, 2024 8:32 pm
Forum: Beginner Basics
Topic: Tilde sign in Terminal (Mac) [SOLVED]
Replies: 37
Views: 3175

Re: Tilde sign in Terminal (Mac) [SOLVED]

How is this ROS related topic? Key combination for such character can depend on keyboard layout for specific language or you can get tilde in other apps on text input, like TextEdit, but you cannot in Terminal? Anyway, this is macOS topic for some other forum, I'm using macOS and I don't have such i...
by optio
Mon Feb 12, 2024 5:59 pm
Forum: Scripting
Topic: Test if array is associative, multi-dimensional, or simple list [SOLVED]
Replies: 15
Views: 3564

Re: Test if array is associative, multi-dimensional, or simple list [SOLVED]

:put [:typeof ($x->10)]
this is "nothing" because the 11th element (is 0 based, so 0 i s the first) do not exist
and in most other languages this is index out of bounds error/exception...
by optio
Mon Feb 12, 2024 1:00 pm
Forum: Scripting
Topic: Need help with a script that fails on some routers
Replies: 5
Views: 1099

Re: Need help with a script that fails on some routers

Maybe is some memory stack issue with large history on that device... Regarding code, you can optimize loop using :while instead :foreach to iterate while condition $f!=1
by optio
Mon Feb 12, 2024 12:27 pm
Forum: Scripting
Topic: Test if array is associative, multi-dimensional, or simple list [SOLVED]
Replies: 15
Views: 3564

Re: Test if array is associative, multi-dimensional, or simple list [SOLVED]

Problem is that you can combine all in single array, you can have single element, k/v element and inner array element in single array. See "Operations with Arrays" in documentation . You can iterate array and check its elements type to determine this or just use 1st element as reference, b...
by optio
Sun Feb 11, 2024 9:38 pm
Forum: Scripting
Topic: Help script run at startup to run previous scheduler
Replies: 6
Views: 1118

Re: Help script run at startup to run previous scheduler

@abdalgalil this should do: 1. Add new script with name: scheduler_helpers : :global GschedulerHelpersInit :if (!$GschedulerHelpersInit) do={ :set GschedulerHelpersInit true :global GupdateSchedulerStartDate do={ /system/scheduler :local sched [find name="$1"] :if ($sched = "") d...
by optio
Sun Feb 11, 2024 3:01 pm
Forum: Wireless Networking
Topic: LTE modem fail after RouterOS update
Replies: 7
Views: 6715

Re: LTE modem fail after RouterOS update

I'm more in favor using Google for advanced search since forum posts are public, with Google you can combine keywords with and/or/not logic, search sentence, etc.., just add site:forum.mikrotik.com in query to search only MT forum site, eg. for this https://www.google.com/search?q=lte+disappear+site...
by optio
Sun Feb 11, 2024 2:45 pm
Forum: General
Topic: Winbox on Mac always false-starts?
Replies: 5
Views: 1100

Re: Winbox on Mac always false-starts?

Same here, "Open in New Window" never worked in wine on Mac as expected and I'm not using it, if I want multiple WinBox instances I just run again winbox64 or "New WinBox" if already connected.
by optio
Sun Feb 11, 2024 1:54 pm
Forum: General
Topic: iOS app serves up WiFi menu for no apparent reason
Replies: 5
Views: 877

Re: iOS app serves up WiFi menu for no apparent reason

WebFig in mobile browser... :)
by optio
Sat Feb 10, 2024 11:56 pm
Forum: General
Topic: iOS app serves up WiFi menu for no apparent reason
Replies: 5
Views: 877

Re: iOS app serves up WiFi menu for no apparent reason

ROS "7.3.12"? Is it maybe 7.13.2? I noticed this issue using legacy drivers after 7.13 update when wireless package split is introduced, issue is reported in different topics. No updates released for iOS app yet, Android app doesn't have such issue. iOS app shows only WiFi section, while A...
by optio
Sat Feb 10, 2024 8:56 pm
Forum: Scripting
Topic: Help script run at startup to run previous scheduler
Replies: 6
Views: 1118

Re: Help script run at startup to run previous scheduler

I did not check this, so I will ask, is next-run in the past if scheduler is not triggered while device is off? If yes, you can just check if next-run is the past from current date and run schedulers from other startup scheduler that checks next-run date on them. You can search forum how to create t...
by optio
Thu Feb 08, 2024 3:53 pm
Forum: Containers
Topic: Container does not start
Replies: 4
Views: 1170

Re: Container does not start

I guess something went wrongv with image extraction or there is some problem with accessing usb disk partition; remove container, check if root directory is deleted and delete mount directories if exists, remove leading / in src mount directories (eg. /usb1-part1/etc -> usb1-part1/etc) and create ne...
by optio
Thu Feb 08, 2024 3:25 pm
Forum: General
Topic: Is architecture emulation under docker supported?
Replies: 6
Views: 638

Re: Is architecture emulation under docker supported?

If you search the forums, someone has made a docker container for the cli netinstall program. They have put in a (x64 I think) emulator into the container (it is smaller than the netinstall executable) Well if you put in container image QEMU build for ROS device CPU architecture and run service wit...
by optio
Wed Feb 07, 2024 7:21 pm
Forum: Containers
Topic: Container does not start
Replies: 4
Views: 1170

Re: Container does not start

Try to enable logging for container (/container set 0 logging=yes), start and see if anything is logged from container in ROS logs.
by optio
Wed Feb 07, 2024 6:49 pm
Forum: General
Topic: Is architecture emulation under docker supported?
Replies: 6
Views: 638

Re: Is architecture emulation under docker supported?

@nkourtzis If OS is supporting emulation Docker can run image for different architecture for supported OS emulation, like on Mac OS, Macs can run arm64 and amd64 images. But this not related to ROS, under ROS you can run only CPU supported architecture images in containers. FYI ROS doesn't use Docke...
by optio
Tue Feb 06, 2024 5:50 pm
Forum: General
Topic: Upgrade Pihole Container Without Breaking It [SOLVED]
Replies: 9
Views: 1414

Re: Upgrade Pihole Container Without Breaking It [SOLVED]

Script is cloning current container config (ROS container config, don't mix with service ( Pi-hole ) config in container) into new, preserving service config in container it's up to you how is container configured, as I wrote: ...you will not need to use this after each update if configuration dirs ...
by optio
Tue Feb 06, 2024 1:44 am
Forum: Beginner Basics
Topic: webconfig not reachable from Firefox using https
Replies: 8
Views: 773

Re: webconfig not reachable from Firefox using https

It is possible to add it as exception for HTTPS-Only Mode in FF settings and for other web sites will be used (there is no need to globally turn off). If local WebFig IP (or hostname if is accessed by it in url) is added there it will work (for me is working in FF on Mac when using url with http:// ...
by optio
Tue Feb 06, 2024 1:08 am
Forum: General
Topic: Support for ACME/Let's Encrypt certificate management [SOLVED]
Replies: 114
Views: 74059

Re: Support for ACME/Let's Encrypt certificate management [SOLVED]

@hennotaht some update, it seems you can use acme.sh with non standard HTTP port with --httpport param and --tlsport param for HTTPS as documented here , these params can added to container CMD and existing service on ROS can work on standard port. Edit: it seems this is feature just for reverse pro...
by optio
Mon Feb 05, 2024 11:11 pm
Forum: Scripting
Topic: Nested DO ON-ERROR scripts
Replies: 17
Views: 3473

Re: Nested DO ON-ERROR scripts

No, on-error needs its own block with code where you can expect error:
:if ($newip != $oldip) do={
  :do {
    :set newip [:resolve $comment]
    /ip firewall address-list set $i address=$newip
  } on-error={
# do error handling or log here if needed...
  }
}
by optio
Mon Feb 05, 2024 10:59 pm
Forum: Scripting
Topic: Nested DO ON-ERROR scripts
Replies: 17
Views: 3473

Re: Nested DO ON-ERROR scripts

Did you put code in :do { } block before on-error={}? I don't see that in your commented code and that is probably causing syntax error.
by optio
Mon Feb 05, 2024 9:26 pm
Forum: General
Topic: Upgrade Pihole Container Without Breaking It [SOLVED]
Replies: 9
Views: 1414

Re: Upgrade Pihole Container Without Breaking It [SOLVED]

This is not correct way to update container. You first need to delete old one (wait a bit to ROS delete its root dir) and create new one with same config, you cannot have 2 or more containers on same root-dir . I think ROS needs improvement for creating containers and not allow to create new one wit...
by optio
Mon Feb 05, 2024 12:38 am
Forum: General
Topic: Dark mode on Dude and Winbox
Replies: 3
Views: 1338

Re: Dark mode on Dude and Winbox

by optio
Mon Feb 05, 2024 12:32 am
Forum: General
Topic: Upgrade Pihole Container Without Breaking It [SOLVED]
Replies: 9
Views: 1414

Re: Upgrade Pihole Container Without Breaking It [SOLVED]

It's possible to have 2 Ip for two containers and send theses 2 ip to the clients....
Yes, you can set multiple DNS server IPs for DHCP network.
by optio
Sun Feb 04, 2024 1:41 pm
Forum: Scripting
Topic: Easy container update script
Replies: 5
Views: 1944

Re: Easy container update script

Created some more generic approach for updating containers from remote repository since I have various with different config set: :local contComment "<CONTAINER_COMMENT>" :local logPrefix "Container update: " :local abortWithMessage do={ :log error "$($logPrefix)Error - $1&q...
by optio
Sat Feb 03, 2024 9:59 pm
Forum: General
Topic: Upgrade Pihole Container Without Breaking It [SOLVED]
Replies: 9
Views: 1414

Re: Upgrade Pihole Container Without Breaking It [SOLVED]

I'm upgrading Pihole regularly when update is avaiable (visible on web gui at bottom). How it breaks in your case?
by optio
Fri Feb 02, 2024 5:57 pm
Forum: General
Topic: Support for ACME/Let's Encrypt certificate management [SOLVED]
Replies: 114
Views: 74059

Re: Support for ACME/Let's Encrypt certificate management [SOLVED]

Temporary while acme.sh script in container is performing, after is done port forward can be disabled and enabled for other service, this can be handled by ROS script or manually since you cannot have same port open for other services. If you have port 443 used by other service and must be always ac...
by optio
Wed Jan 31, 2024 11:25 pm
Forum: General
Topic: Can't access to ip's with the same subnet. MAC only
Replies: 1
Views: 364

Re: Can't access to ip's with the same subnet. MAC only

Mac priorities default route by network services order, but VPN connections have priority regardless of that order: https://support.apple.com/guide/mac-help/mchlp2711/mac You can’t change the order of virtual private network (VPN) connections because they already take priority over non-VPN connectio...
by optio
Wed Jan 31, 2024 9:07 pm
Forum: Scripting
Topic: Easy container update script
Replies: 5
Views: 1944

Re: Easy container update script

Some can have other config properties set to container like CMD, host, DNS, etc... Why just not find current container by comment variable, read all its config properties and set it for new container?
by optio
Wed Jan 31, 2024 8:42 pm
Forum: Announcements
Topic: Newsletter #116 | January 2024
Replies: 95
Views: 33085

Re: Newsletter #116 | January 2024

Fact: The design used for that processor prevented it from using more than 640kB of memory.

So someone decided that limit, it could be there, but the worst thing was that it was FORCED TO MAINTAIN IT even afterwards, for "decades"...
We need DOS/4G solution for ROS :)
by optio
Wed Jan 31, 2024 7:26 pm
Forum: General
Topic: 7.13 wireless package split question
Replies: 90
Views: 24938

Re: 7.13 wireless package split question

Problem is that npk install script is dumb copy all files process from package to ROS fs location, when having all Qcom drivers in single package it will need to first check device peripherals and copy only needed driver files (it will be the same at the end like installing ac or ax separately), in ...
by optio
Wed Jan 31, 2024 6:57 pm
Forum: General
Topic: 7.13 wireless package split question
Replies: 90
Views: 24938

Re: 7.13 wireless package split question

Suggestion is to have 2 packages, Legacy and Qcom, not forcing new Qcom drivers. Qcom bundle can contain ax+ac drivers and upgrade process can install drivers only needed for device, device will not have both ax and ac drivers on flash storage if upgrade process is a bit "smarter".
by optio
Wed Jan 31, 2024 6:45 pm
Forum: Announcements
Topic: Newsletter #116 | January 2024
Replies: 95
Views: 33085

Re: Newsletter #116 | January 2024

Chateau LTE18 ax Suggested price $299.00 vs Chateau 5G R16 Suggested price $485.00 Why such price difference considering that Chateau LTE18 ax is more powerful than Chateau 5G R16 in every aspect except modem (I don't want to even comment 16MB storage size)? Comparing retail modem prices Quectel EG...
by optio
Wed Jan 31, 2024 6:19 pm
Forum: General
Topic: 7.13 wireless package split question
Replies: 90
Views: 24938

Re: 7.13 wireless package split question

Yes, a bit more RAM usage for larger npk (Qcom ax+ac), but it I think all devices should be able to handle that, it will be more cleaner process for upgrade. Upgrade process should be able to detect which drivers you need for device and install them.
by optio
Tue Jan 30, 2024 11:33 pm
Forum: General
Topic: Feature Request: webfig dark theme
Replies: 7
Views: 916

Re: Feature Request: webfig dark theme

Np, not ideal, some icons are black and doesn't look distinctive on dark bg, also dashboard and status text items is always black no matter what color is for certain text type in scheme.
by optio
Tue Jan 30, 2024 10:39 pm
Forum: General
Topic: Feature Request: webfig dark theme
Replies: 7
Views: 916

Re: Feature Request: webfig dark theme

Also there is Windows dark color scheme which can be used for WInbox: https://gist.github.com/Zeinok/ceaf6ff2 ... nt-4567145
by optio
Mon Jan 29, 2024 6:25 pm
Forum: General
Topic: feature request: add Port List to firewall
Replies: 48
Views: 20439

Re: feature request: add Port List to firewall

Yes, just checked issue (long time passed when I switched to ufw firewall wrapper) is that iptables doesn't support multiple protocols like -[p/m] udp,tcp in combination with --[s/d]port(s) , it has all but you cannot combine it with ports, like ROS rule doesn't allow entering port without protocol ...
by optio
Sun Jan 28, 2024 6:30 pm
Forum: General
Topic: feature request: add Port List to firewall
Replies: 48
Views: 20439

Re: feature request: add Port List to firewall

I doubt it will reduce number rules it they are correctly written, since you can literally add list of ports and range in single rule, unless you mean that port list can contain protocol also, but this imho can create configuration mess for rules, I would rather have multiprotocol rule for such case...
by optio
Sun Jan 28, 2024 6:12 pm
Forum: Scripting
Topic: Script does not execute any longer
Replies: 1
Views: 442

Re: Script does not execute any longer

From 7.13 changelog : *) fetch - require "ftp" user policy; Generally, if you are only user which have access to router, add all policies to scripts and dont-require-permissions=yes and you will not have problems like this. I'm setting this to scripts from beginning and never had such issu...
by optio
Sun Jan 28, 2024 3:07 pm
Forum: Scripting
Topic: Reset statistics of connected wireless devices / clients
Replies: 2
Views: 437

Re: Reset statistics of connected wireless devices / clients

this?
/interface/wireless/registration-table reset-counters [find]
by optio
Sat Jan 27, 2024 10:47 pm
Forum: General
Topic: fetch now fills logs 7.13.3
Replies: 3
Views: 433

Re: fetch now fills logs 7.13.3

Idk, It's introduced in 7.13 and it was even worse, but now is reduced in 7.13.3, see changelog, I muted all from fetch in that way.
by optio
Sat Jan 27, 2024 10:39 pm
Forum: General
Topic: fetch now fills logs 7.13.3
Replies: 3
Views: 433

Re: fetch now fills logs 7.13.3

Edit in system logging info topic log rule and add !fetch there.
by optio
Sat Jan 27, 2024 6:55 pm
Forum: Scripting
Topic: Foreach Problem
Replies: 1
Views: 383

Re: Foreach Problem

try with in loop:
/tool/fetch url="https://api.telegram.org/bot$bot/sendmessage%5C?chat_id=$chat&text=$useroff" output=none as-value
by optio
Fri Jan 26, 2024 6:35 pm
Forum: General
Topic: Howto mark Amazon AWS traffic?
Replies: 13
Views: 4242

Re: Howto mark Amazon AWS traffic?

by optio
Fri Jan 26, 2024 6:11 pm
Forum: General
Topic: Howto mark Amazon AWS traffic?
Replies: 13
Views: 4242

Re: Howto mark Amazon AWS traffic?

Parsing such large JSON (1.6MB) in ROS script won't work anyway due to variables size limitation. If you want all on single device solution you will need to use container for that if your device supports it. You can build container image with minimal Alpine Linux image + depended packages for script...
by optio
Wed Jan 24, 2024 10:20 pm
Forum: General
Topic: Sms v7.13.2
Replies: 2
Views: 727

Re: Sms v7.13.2

Generally, if something worked before and after upgrade not and also nothing is mentioned in release changelog(s) which affects non-working something - create support ticket to MT.
by optio
Wed Jan 24, 2024 9:31 pm
Forum: Scripting
Topic: How to make Mikrotik beep on adding new log entry
Replies: 9
Views: 1154

Re: How to make Mikrotik beep on adding new log entry

Make feature request for ROS to add for log action script trigger event like scheduler or netwatch have (eg. on-event ). Then it will possible immediately perform some rsc code (beep, led...) for log record with specified action without need iterating log records in scheduler. Also will be good to h...
by optio
Wed Jan 24, 2024 8:07 pm
Forum: General
Topic: 💀⚠️CRITICAL: Never trust who provides scripts containing "/import" from "/tool fetch" from external sources.
Replies: 2
Views: 668

Re: 💀⚠️CRITICAL: Never trust who provides scripts containing "/import" from "/tool fetch" from external sources.

Agree, example https://blocklister.gefoo.org/
Especially HTTP fetch can be problematic where attacker can perform MITM attack and modify response even if site is providing non malicious response.
by optio
Tue Jan 23, 2024 10:59 pm
Forum: General
Topic: V2Ray Client on RouterOS
Replies: 1
Views: 3756

Re: V2Ray Client on RouterOS

I have setup with Shadowsocks server in ROS container with v2ray plugin over TLS and with port tunnel setup, using ss-tunnel client on computer to open local port tunneled to ss-server I'm able to connect local Wireguard to ROS Wireguard. Trough that Wireguard connection I have internet connection o...
by optio
Tue Jan 23, 2024 11:00 am
Forum: Announcements
Topic: WinBox v3.40 released!
Replies: 164
Views: 157716

Re: WinBox v3.40 released!

Like The Dude, while it works you can use it :)
by optio
Mon Jan 22, 2024 11:26 pm
Forum: Announcements
Topic: WinBox v3.40 released!
Replies: 164
Views: 157716

Re: WinBox v3.40 released!

Well you can always develop on older version library which has better performance. :) Fingers crossed, they will not do anything and keep it just the (perfect) way it currently is. For windows users yes, over wine is even bigger performance impact. On my Mac (M1) Winbox startup is approx. 5s (On Int...
by optio
Mon Jan 22, 2024 10:04 pm
Forum: Announcements
Topic: WinBox v3.40 released!
Replies: 164
Views: 157716

Re: WinBox v3.40 released!

I worked with Qt, it can be styled to have similar current look, https://doc.qt.io/qt-6/gallery.html . Regarding performance impact I doubt it will noticeable if developed using native Qt Widgets (unless someone is executing on 486/Pentium I machines), using QML/JS framework is different thing and i...
by optio
Mon Jan 22, 2024 9:26 pm
Forum: Scripting
Topic: API in C for windows
Replies: 3
Views: 612

Re: API in C for windows

Yes, http and json processing for such bulk requests is not much applicable.
by optio
Mon Jan 22, 2024 8:36 pm
Forum: Scripting
Topic: API in C for windows
Replies: 3
Views: 612

Re: API in C for windows

Great to have that, I'm personally more in favor using libcurl and some JSON C library with ROS REST API.
by optio
Mon Jan 22, 2024 8:10 pm
Forum: Announcements
Topic: WinBox v3.40 released!
Replies: 164
Views: 157716

Re: WinBox v3.40 released!

It "just" needs rewrite to use some cross-platform GUI library like Qt or GTK.
by optio
Mon Jan 22, 2024 5:37 pm
Forum: Announcements
Topic: WinBox v3.40 released!
Replies: 164
Views: 157716

Re: WinBox v3.40 released!

"Teaser" - lol
wb_mac.png
under that...
wb_contents.png
by optio
Sun Jan 21, 2024 8:49 pm
Forum: General
Topic: 7.13 wireless package split question
Replies: 90
Views: 24938

Re: 7.13 wireless package split question

Mentioned long term in release topic viewtopic.php?t=202423#p1042578 but no response... Maybe it should be replied to this viewtopic.php?t=201378#p1035120
by optio
Sun Jan 21, 2024 8:24 pm
Forum: General
Topic: /tool/dns-update to bind server
Replies: 9
Views: 1143

Re: /tool/dns-update to bind server

See BIND9 docs, https://bind9.readthedocs.io/en/v9.18.21/chapter6.html#dynamic-update for how to setup your zone file (not rdnc.conf) for it to work with RouterOS's dns-update (which follows RFC-2136): Dynamic update is enabled by including an allow-update or an update-policy clause in the zone sta...
by optio
Sun Jan 21, 2024 7:44 pm
Forum: General
Topic: /tool/dns-update to bind server
Replies: 9
Views: 1143

Re: /tool/dns-update to bind server

Yes, but this statement "By default the DNS server listens on port 953..." not sure is correct (unless bind config is modified for DNS service to listen on that port, but then it is not default), it's default for RNDC port and if is even remapped to that port with nat /tool/dns-update will...
by optio
Sun Jan 21, 2024 6:30 pm
Forum: General
Topic: /tool/dns-update to bind server
Replies: 9
Views: 1143

Re: /tool/dns-update to bind server

TCP port 953 is RNDC port not DNS service port. All DNS clients uses standard DNS port (UDP/TCP 53) for queries or update request and that port must be accesible for DNS service to work.
by optio
Sun Jan 21, 2024 6:01 pm
Forum: General
Topic: Support for ACME/Let's Encrypt certificate management [SOLVED]
Replies: 114
Views: 74059

Re: Support for ACME/Let's Encrypt certificate management [SOLVED]

While this topic is marked as solved using letsencrypt-routeros.sh shell script on external system, it is possible to do that all inside ROS if device support containers , see Run-acme.sh-in-docker , image on docker hub: neilpang/acme.sh . Acme.sh config dir must be mounted for this container ( --co...
by optio
Wed Jan 17, 2024 10:24 pm
Forum: Scripting
Topic: Variable not being referenced by ":find" command? [SOLVED]
Replies: 3
Views: 2718

Re: Variable not being referenced by ":find" command? [SOLVED]

You can have multiple routes per IP, you can iterate find like this: /ip/route :foreach routeId in=[find where 8.8.8.8 in dst-address and active and routing-table=main] do={ :local immediateGateway ([get $routeId]->"immediate-gw") :put "immediateGateway: $immediateGateway" }
by optio
Wed Jan 17, 2024 7:32 pm
Forum: Scripting
Topic: ip-scan
Replies: 3
Views: 871

Re: ip-scan

Example: :local filename "scan.txt" :local records "" :foreach scan in=[/tool/ip-scan duration=10s as-value] do={ :local record "IP: $($scan->"address"), MAC: $($scan->"mac-address")" :put $record :set records "$records$record\n" } :if ([:l...
by optio
Tue Jan 16, 2024 7:23 pm
Forum: Scripting
Topic: ip-scan
Replies: 3
Views: 871

Re: ip-scan

Add additional command argument as-value and output then can be passed to variable or other command argument. It will not be same output as printed on CLI, as-value returns key-value array, but that can be formatted for some file output if needed.
by optio
Thu Jan 11, 2024 4:29 pm
Forum: Announcements
Topic: WinBox v3.40 released!
Replies: 164
Views: 157716

Re: WinBox v3.40 released!

On my Mac (M2Pro, Sonoma), winbox 3.40 runs without issues using Gcenx wine builds ...
Except it crashes on some cases viewtopic.php?t=203174#p1047711, not sure if is related to that wine build or is generally Winbox issue.
by optio
Thu Jan 11, 2024 11:38 am
Forum: Scripting
Topic: Syntax difference in versions, how to handle? [SOLVED]
Replies: 12
Views: 4080

Re: Syntax difference in versions, how to handle? [SOLVED]

Does :execute command exists in ROS6? You try with it if does, :if ([/system package get 0 version] ~ "^6") do={:execute "/export terse" as-string} else={:execute "/export terse show-sensitive" as-string} Syntax will not be checked in string for execute, it will only br...
by optio
Thu Jan 11, 2024 12:59 am
Forum: General
Topic: Do not prefill 'admin' in the router login page
Replies: 11
Views: 1764

Re: Do not prefill 'admin' in the router login page

Also Winbox crashes when trying to open large script (35KB), Winbox64 running with wine-8.0.1 (WineskinCX 23.7.1), attached log.
by optio
Thu Jan 11, 2024 12:07 am
Forum: General
Topic: MikroTik forum - http error 500
Replies: 7
Views: 1016

Re: MikroTik forum - http error 500

Yesterday was extremely slow, today is faster but occasional server error 500 occurs.
by optio
Wed Jan 10, 2024 11:53 pm
Forum: General
Topic: RouterOS 7 can't edit dynamic object
Replies: 18
Views: 1888

Re: RouterOS 7 can't edit dynamic object

Yes it's annoying, for eg. UPnP dynamic NAT rules can be left after power loss on device or software did not shut down gracefully, etc... I have scheduled cleanup script that checks if device is up by performing arp ping to host ip in dynamic NAT rule and when removing dynamic rules was allowed scri...
by optio
Wed Jan 10, 2024 6:59 pm
Forum: Scripting
Topic: Why is this so hard???
Replies: 24
Views: 4494

Re: Why is this so hard???

As I suspected, adding both as-string and file arguments on :execute doesn't create file output, which means if you add as-string you can also use commands wihout :execute for sync calls, unless there is a need to dynamically generate commands in string for execution by some logic or commands are lo...
by optio
Wed Jan 10, 2024 5:55 pm
Forum: Announcements
Topic: v7.13.5 [stable] is released!
Replies: 909
Views: 274896

Re: v7.13.1 [stable] is released!

I see now, your device doesn't have wifi, that's why... There are a lot of devices with wifi and 16MB storage.
by optio
Wed Jan 10, 2024 5:23 pm
Forum: Announcements
Topic: v7.13.5 [stable] is released!
Replies: 909
Views: 274896

Re: v7.13.1 [stable] is released!

Then your config is not consuming much space and maybe not running containers on it (not as containers storage, as additional package + large config with a lot of scripts).
by optio
Wed Jan 10, 2024 5:20 pm
Forum: General
Topic: Do not prefill 'admin' in the router login page
Replies: 11
Views: 1764

Re: Do not prefill 'admin' in the router login page

Winbox is simply more stable, faster and works even if there is no IP. So it is not more complicated, it is only more reliable.
Try to paste large script to Winbox GUI script form field... Had to use WebFIg for this.
by optio
Wed Jan 10, 2024 5:09 pm
Forum: Beginner Basics
Topic: Terrible wifi speed - L009UiGS-2HaxD-IN - Wifi 6 (Router OS 7.13) [SOLVED]
Replies: 28
Views: 8142

Re: Terrible wifi speed - L009UiGS-2HaxD-IN - Wifi 6 (Router OS 7.13) [SOLVED]

Yes generally usb3 device can interfere 2.4-2.5GHz spectrum if not properly shielded (like some low cost usb-c to usb-a adapters), doesn't need to be radio transmitting device in purpose.
by optio
Wed Jan 10, 2024 4:56 pm
Forum: Announcements
Topic: v7.13.5 [stable] is released!
Replies: 909
Views: 274896

Re: v7.13.1 [stable] is released!

I'm sure users can afford 220KiB
I'm sure you don't own 16MB storage device :)
by optio
Wed Jan 10, 2024 1:17 pm
Forum: Scripting
Topic: Why is this so hard???
Replies: 24
Views: 4494

Re: Why is this so hard???

It seems that the final goal is to have that file, not to print something on screen...
Yes, as OP is written, but can then as-string and file arguments be mixed to be sync call since is suggested? Don't have time to test that now.
by optio
Wed Jan 10, 2024 1:15 am
Forum: Scripting
Topic: `conditional not boolean` bug with :onerror (new in 7.13)
Replies: 24
Views: 3093

Re: `conditional not boolean` bug with :onerror (new in 7.13)

Regardless, maybe someone from MT has read this viewtopic.php?p=1000982#p1000982 and implemented :onerror :)
by optio
Wed Jan 10, 2024 12:47 am
Forum: Scripting
Topic: `conditional not boolean` bug with :onerror (new in 7.13)
Replies: 24
Views: 3093

Re: `conditional not boolean` bug with :onerror (new in 7.13)

Or just
:return [:set resp [/tool/fetch url=$url output=user as-value]]
It just needs return, but it's not documented like that and imho it shuldn't expect return from this scope.
by optio
Wed Jan 10, 2024 12:25 am
Forum: Scripting
Topic: `conditional not boolean` bug with :onerror (new in 7.13)
Replies: 24
Views: 3093

Re: Bug with :onerror (new in 7.13)

Seem to be it, clearly a bug.
by optio
Wed Jan 10, 2024 12:18 am
Forum: Scripting
Topic: Why is this so hard???
Replies: 24
Views: 4494

Re: Why is this so hard???

Why not just perform commands without :execute then?
by optio
Tue Jan 09, 2024 11:53 pm
Forum: Scripting
Topic: `conditional not boolean` bug with :onerror (new in 7.13)
Replies: 24
Views: 3093

Re: Bug with :onerror (new in 7.13)

This is also strange behaviour: { :local urls ("https://httpstat.us/400", "https://httpstat.us/500", "https://httpstat.us/200", "https://httpstat.us/404") :local l [:len $urls] :local idx 0 :local resp "" :while ($resp = "" && $idx ...
by optio
Tue Jan 09, 2024 8:48 pm
Forum: Scripting
Topic: Why is this so hard???
Replies: 24
Views: 4494

Re: Why is this so hard???

Execute is async command.
by optio
Tue Jan 09, 2024 12:19 pm
Forum: Scripting
Topic: Why is this so hard???
Replies: 24
Views: 4494

Re: Why is this so hard???

You wrote script for your needs I just corrected it to work... Hard to guess what result you are expecting from it if not specified.
by optio
Tue Jan 09, 2024 1:21 am
Forum: RouterBOARD hardware
Topic: Running out of space on 16MB RouterBOARDs
Replies: 46
Views: 8851

Re: Running out of space on 16MB RouterBOARDs

what's your experience like with running containers on Chateau (owner of same device here... :) ) ? Positive after some ROS version upgrades, at beginning was troubles due to some bugs related to containers. I had to tweak configurations to have small RAM usage, on Pi-hole DNS cache is disabled sin...
by optio
Tue Jan 09, 2024 1:11 am
Forum: General
Topic: 7.13 wireless package split question
Replies: 90
Views: 24938

Re: 7.13 wireless package split question

Do you even READ what is written? Again: when an RB4011 (or any device) is upgraded from 7.12.1 to 7.13, an unusable WiFi menu is added. This takes up space on the device (a real problem on e.g. the hAP ac2!!!) and also it causes winbox to fail saving sessions. Reported before. So to be clear again...
by optio
Tue Jan 09, 2024 12:58 am
Forum: Scripting
Topic: Why is this so hard???
Replies: 24
Views: 4494

Re: Why is this so hard???

You need to escape " and $ characters, also ; is missing after /ip dhcp-server lease to separate command. :local stringexec "/ip dhcp-server lease; :foreach i in=[find] do={ :put ([get \$i comment].\",\".[get \$i address].\",\".[get \$i mac-address].\",\".[get...
by optio
Tue Jan 09, 2024 12:01 am
Forum: RouterBOARD hardware
Topic: Running out of space on 16MB RouterBOARDs
Replies: 46
Views: 8851

Re: Running out of space on 16MB RouterBOARDs

I'm running containers on Chateau LTE12 which has 256MB RAM size but just 16MB flash, have no problem with RAM while containers are running, constantly 2 are running as DNS service (Pi-hole and Unbound - recursive) and periodically starting some others, so far RAM is not issue but flash is. Afaik fo...
by optio
Mon Jan 08, 2024 11:01 pm
Forum: General
Topic: Chateau LTE12 - Cell Monitor
Replies: 9
Views: 1777

Re: Chateau LTE12 - Cell Monitor

Try find them on https://www.cellmapper.net and you will see to which provider belongs.
by optio
Mon Jan 08, 2024 10:55 pm
Forum: Announcements
Topic: v7.13.5 [stable] is released!
Replies: 909
Views: 274896

Re: v7.13.1 [stable] is released!

then to be rushed and have bugs be introduced in what is supposed to be a "Stable" release.
Someone said "It must be released before end of year!" and that happens...
by optio
Mon Jan 08, 2024 10:03 pm
Forum: Announcements
Topic: v7.13.5 [stable] is released!
Replies: 909
Views: 274896

Re: v7.13.1 [stable] is released!

If you are already on 7.13 it will update, I'm also short on disk space (456 KiB free) and update passed.
by optio
Mon Jan 08, 2024 9:15 pm
Forum: RouterBOARD hardware
Topic: Running out of space on 16MB RouterBOARDs
Replies: 46
Views: 8851

Re: Running out of space on 16MB RouterBOARDs

I had to remain on legacy wireless package to have container package because it not fit with wifi-qcom-ac and my config.
by optio
Mon Jan 08, 2024 8:21 pm
Forum: RouterBOARD hardware
Topic: Running out of space on 16MB RouterBOARDs
Replies: 46
Views: 8851

Re: Running out of space on 16MB RouterBOARDs

Maybe basic routing stuff should remain like Filters, Nexthops, RouterID, Rules, Settings and Tables but other parts as part of extended routing optional package and also Dot1X and RADIUS can be optional.
by optio
Mon Jan 08, 2024 6:52 pm
Forum: RouterBOARD hardware
Topic: Running out of space on 16MB RouterBOARDs
Replies: 46
Views: 8851

Re: Running out of space on 16MB RouterBOARDs

...or offer to purchase ROS compatible flash memory to replace it on board :)
by optio
Sun Jan 07, 2024 4:30 pm
Forum: General
Topic: Under DNS Amplification attack, network unusable with Mikrotik routers
Replies: 12
Views: 2811

Re: Under DNS Amplification attack, network unusable with Mikrotik routers

@tin9 You can create filter rule to add IP which connecting to DNS port into address list for blocking and create raw filter rule that drops all packets in prerouting chain for IPs in that address list. You can also consider setting up recursive DNS for your network if you don't want to rely on ISP ...
by optio
Sun Jan 07, 2024 4:02 pm
Forum: RouterBOARD hardware
Topic: Running out of space on 16MB RouterBOARDs
Replies: 46
Views: 8851

Re: Running out of space on 16MB RouterBOARDs

@t0mm13b https://www.gbmb.org/mb-to-mib Afaik any storage device is advertised in MB/GB/TB sizes, not in MiB/GiB/TiB.
by optio
Sun Jan 07, 2024 3:58 pm
Forum: General
Topic: AdGuard Home update
Replies: 1
Views: 1484

Re: AdGuard Home update

As mentioned here you will need to mount /opt/adguardhome/work and /opt/adguardhome/conf to persist data and config.
by optio
Sun Jan 07, 2024 3:37 pm
Forum: General
Topic: DNS not resolving some domains
Replies: 23
Views: 3248

Re: DNS not resolving some domains

You can see from my post on 8.8.8.8 it was masked, it seems it is not reliable, depends maybe from which authoritative DNS is requested. Currently also for me is responding with full answer.

Edit: Performed 10 queries and 1 was masked again.
by optio
Sun Jan 07, 2024 2:47 pm
Forum: General
Topic: DNS not resolving some domains
Replies: 23
Views: 3248

Re: DNS not resolving some domains

Using whitehouse.gov as an example, some servers respond, other don't.
Which server responds answer for that domain and is not masked by RFC 8482? Masked responses are useless (example in my previous post).
by optio
Sat Jan 06, 2024 11:57 pm
Forum: Beginner Basics
Topic: RB4011 disk full
Replies: 2
Views: 1123

Re: RB4011 disk full

From ROS container help page : Containers use up a lot of disk space, USB/SATA,NVMe attached media is highly recommended. For devices with USB ports - USB to SATA adapters can be used with 2.5" drives - for extra storage and faster file operations. I'm running 5 containers on 16Mb storage devic...
by optio
Sat Jan 06, 2024 9:23 pm
Forum: General
Topic: USB serial remote monitoring and flashing
Replies: 4
Views: 1207

Re: USB serial remote monitoring and flashing

Yes, remote-access can be used also, then it's also possible with socat to create PTY for remote serial connection. https://www.wut.de/e-58www-29-apus-000.php
by optio
Sat Jan 06, 2024 7:59 pm
Forum: General
Topic: USB serial remote monitoring and flashing
Replies: 4
Views: 1207

Re: USB serial remote monitoring and flashing

Works without problem, but I'm missing the option to upload the firmware over serial of RB951. It will be same on Chateau, it's same ROS on both. You can try to setup on RB951 special login over serial port and connect over ssh to it with option to allocate pseudo TTY (-tt) in contaner from other d...