Community discussions

MikroTik App

Search found 22 matches

by Lelik200
Tue Oct 27, 2020 2:51 pm
Forum: Scripting
Topic: One line password generation without fetch tool
Replies: 16
Views: 1299

Re: One line password generation without fetch tool

Should line 17 be like this?
:set ($arrayString->"mixedpin") "8923176504"          ; :set ($arrayString->"mixednumbers") "8923176504"
("mixednumbers" -> "mixedpin")
by Lelik200
Thu Oct 22, 2020 3:48 pm
Forum: Beginner Basics
Topic: VPN over VPN puzzle
Replies: 4
Views: 367

Re: VPN over VPN puzzle

See for your route table, it's seems that you have default route to your "torrent vpn". In this case you need to manually add routes to your office network via "office vpn" connection.
by Lelik200
Thu Oct 22, 2020 3:13 pm
Forum: Beginner Basics
Topic: VPN over VPN puzzle
Replies: 4
Views: 367

Re: VPN over VPN puzzle

If pings pass to the host in the VPN network, then it is likely that the problem is in MSS \ MTU
by Lelik200
Thu Oct 22, 2020 11:16 am
Forum: General
Topic: PPTP VPN problem with Tele2 LTE
Replies: 4
Views: 311

Re: PPTP VPN problem with Tele2 LTE

Providers often have problems with PPTP, especially if you are not given a real IP. If you do not want to argue with technical support, use other protocols. For example, sstp, but it is slower and load the CPU.
by Lelik200
Thu Oct 22, 2020 10:46 am
Forum: General
Topic: VPN client to access the router
Replies: 5
Views: 251

Re: VPN client to access the router

If you are sure that a client with ip 192.168.89.201 goes online via vpn, then all traffic goes through vpn and additional routes are not needed. See rules in the input chain.
by Lelik200
Thu Oct 22, 2020 12:45 am
Forum: Scripting
Topic: UPnP in load balancing setup
Replies: 8
Views: 496

Re: UPnP in load balancing setup

Regarding Flash memory, in the long run, running this script every minute isn't the wisest thing I think? I will write an update for the script and we will test it. I hope that changes from UPNP will not be frequent and, accordingly, the load on the flash memory will be small, and it will be the no...
by Lelik200
Thu Oct 22, 2020 12:35 am
Forum: Scripting
Topic: One line password generation without fetch tool
Replies: 16
Views: 1299

Re: One line password generation without fetch tool

Yes, it's strange. Last time I tested on 6.47.4 and everything was fine. We are waiting for a response from support.
by Lelik200
Wed Oct 21, 2020 4:19 pm
Forum: Scripting
Topic: UPnP in load balancing setup
Replies: 8
Views: 496

Re: UPnP in load balancing setup

Is there a way to make your script do this: 1. Clone WAN1 dynamic rules to WAN2 and also clone WAN2 to WAN1 because that's the original problem with UPnP anyway 2. Of course, while avoiding cloning already existing clones on either WAN interfaces. I think yes The original article said: 1. Make the ...
by Lelik200
Wed Oct 21, 2020 3:25 pm
Forum: Scripting
Topic: One line password generation without fetch tool
Replies: 16
Views: 1299

Re: One line password generation without fetch tool

Alternatively, but they are removed automatically after a few seconds if you use "minutes-valid=0"
by Lelik200
Wed Oct 21, 2020 1:16 pm
Forum: Scripting
Topic: UPnP in load balancing setup
Replies: 8
Views: 496

Re: UPnP in load balancing setup

Hello! I tried to write "FUTURE VERSION" but cannot test. And i use "in-interface" matcher instead of "dst-address=<WAN 2 IP>". :local wan2InterfName "ether2" :local RuleComment "UPnP_Cloned" :local I :local J :local NeedTo #if rules identical - function is true, else false :local fnRulesCompare do=...
by Lelik200
Tue Oct 20, 2020 8:22 pm
Forum: General
Topic: Two routerboard connection
Replies: 1
Views: 173

Re: Two routerboard connection

Hello!

On first board you need to disable NAT or masquarade rules for output port 5 if it exist.

On second board you need to add route to 192.168.77.0/24 network:
/ip route add dst-address=192.168.77.0/24 gateway=192.168.88.200
by Lelik200
Tue Oct 20, 2020 4:14 pm
Forum: Scripting
Topic: How to delete a subnet
Replies: 1
Views: 183

Re: How to delete a subnet

Hello! /ip firewall connection print where dst-address~!"192.168.0.0/16" It doesn't work like that. https://wiki.mikrotik.com/wiki/Manual:Regular_Expressions You can mark ISP-connections in mangle ;;; ISP1 new inbound chain=prerouting action=mark-connection new-connection-mark=isp1_conn passthrough=...
by Lelik200
Tue Oct 20, 2020 12:04 pm
Forum: Scripting
Topic: script dont create file?
Replies: 2
Views: 256

Re: script dont create file?

Most likely you are trying to get more than 4096 bytes into a variable: :local contents [/file get $file contents] https://forum.mikrotik.com/viewtopic.php?t=127093 It is limit not to file - it is limit for variable size... If you write text variable to file - you can write maximum 4096 bytes. But, ...
by Lelik200
Mon Oct 19, 2020 3:58 pm
Forum: Scripting
Topic: Search for interfaces containing the word
Replies: 2
Views: 311

Re: Search for interfaces containing the word

In RoOS CLI it will be so
/interface print where type="eoip" name~"NEW"
by Lelik200
Mon Oct 19, 2020 3:32 pm
Forum: Scripting
Topic: Move Nat rule to end of the same type rule
Replies: 1
Views: 223

Re: Move Nat rule to end of the same type rule

/ip firewall nat add chain=srcnat disabled=yes place-before=([/ip firewall nat find where action=masquerade]->0)
by Lelik200
Mon Oct 19, 2020 10:03 am
Forum: Scripting
Topic: Scripting help
Replies: 2
Views: 131

Re: Scripting help

:local imei
:set imei ([/interface lte info lte1 as-value once]->"imei")
:put ("all imei number: $imei")
:put ("first 3 digit: $[:pick $imei 0 3]")
by Lelik200
Mon Oct 19, 2020 7:55 am
Forum: Scripting
Topic: Script to compare dst-address variable to a preset address
Replies: 1
Views: 280

Re: Script to compare dst-address variable to a preset address

Hello!
If I understood you correctly, then:
:local ArrToFind {
  "8.8.8.8:443";
  "8.8.8.8:53";
  "1.1.1.1:111"}
:local I
:foreach I in=$ArrToFind do={
  :put ($I . " - " . [:len [/ip firewall connection find where dst-address=$I]])
}

result:
8.8.8.8:443 - 2
8.8.8.8:53 - 0
1.1.1.1:111 - 0
by Lelik200
Sat Oct 10, 2020 12:21 pm
Forum: Scripting
Topic: Combine two IP4 address lists to create a /24 list
Replies: 4
Views: 254

Re: Combine two IP4 address lists to create a /24 list

Hello! Do you mean something like this? :local list1 {\ 1.1.1.1;\ 2.2.2.2;\ 3.3.3.3;\ 4.4.4.4;\ 5.5.5.5;\ 2.2.2.200} :local list2 {\ 1.1.1.1;\ 2.2.2.2;\ 3.3.3.3;\ 4.4.5.4;\ 5.5.6.5} :local AgregateMask 24 :local AgregatedList :local i :local j :local net :local ReversMask (32-$AgregateMask) :foreach...
by Lelik200
Fri Oct 09, 2020 9:49 pm
Forum: Scripting
Topic: Importing IP List from file
Replies: 5
Views: 341

Re: Importing IP List from file

Please post local.net file example.
by Lelik200
Fri Oct 09, 2020 9:06 pm
Forum: Scripting
Topic: difficulty comparing variables.
Replies: 1
Views: 484

Re: difficulty comparing variables.

Hello! 1. You need to use defaultippppoeout1 variable as string. 2. You missed the letter "l" in "defa ut ippppoeout1" in ":global defa ut ippppoeout1 value=200.200.200.200 (example of ip 200.200.200.200) / or value="200.200.200.200" was also tested" :local defaultippppoeout1 "200.200.200.200" :loca...
by Lelik200
Thu Sep 03, 2020 11:30 am
Forum: Scripting
Topic: DHCP lease script cannot use ssh-exec with public/private key for automated login
Replies: 9
Views: 1726

Re: DHCP lease script cannot use ssh-exec with public/private key for automated login

Hello! I have not tested how my version works with DHCP, but for ppp-on-up script it works. I think it's the same thing. So. We have two routers: "A" - on which the event occurs, "B" - on which the command must be executed. 1. Create public and private keys pair - pub.ssh, priv.ssh. 2. Settings for ...
by Lelik200
Fri Jul 24, 2020 3:55 pm
Forum: Scripting
Topic: One line password generation without fetch tool
Replies: 16
Views: 1299

One line password generation without fetch tool

:put ([/certificate scep-server otp generate minutes-valid=0 as-value]->"password")