Community discussions

MikroTik App

Search found 36 matches

by vklpt
Thu Dec 01, 2022 7:59 pm
Forum: Scripting
Topic: Error when trying to clear firewall connections
Replies: 13
Views: 3948

Re: Error when trying to clear firewall connections

and then the "if (true) do={" doesn't make a good impression to leave pieces thrown there at random...
and then on-horror-resume-next never bodes well..
Admirable argumentation from the author of a better solution that does not even work properly (and shouldn't) lol:
by vklpt
Thu Dec 01, 2022 10:13 am
Forum: Scripting
Topic: Error when trying to clear firewall connections
Replies: 13
Views: 3948

Re: Error when trying to clear firewall connections

Use the loop if it does not.
So why don't I use my own solution?
by vklpt
Tue Nov 29, 2022 8:28 pm
Forum: Scripting
Topic: Error when trying to clear firewall connections
Replies: 13
Views: 3948

Re: Error when trying to clear firewall connections

I don't see any advantage in a double search
by vklpt
Tue Nov 29, 2022 6:41 pm
Forum: Scripting
Topic: Create/update address-list from a .txt file/link IPs and add the hostname to the comment's of each
Replies: 9
Views: 5218

Re: Create/update address-list from a .txt file/link IPs and add the hostname to the comment's of each

Any idea/solution?
You can literally add hostnames to address-list and they are will be resolved automatically.
by vklpt
Tue Nov 29, 2022 6:35 pm
Forum: Scripting
Topic: Error when trying to clear firewall connections
Replies: 13
Views: 3948

Re: Error when trying to clear firewall connections

eworm, please read the first post. It's an old and well-known problem.
by vklpt
Tue Nov 29, 2022 4:00 pm
Forum: Scripting
Topic: Error when trying to clear firewall connections
Replies: 13
Views: 3948

Re: Error when trying to clear firewall connections

This works: # 2022.11.29 # UDP only local funDebug do={ if ( true ) do={ log info (" KILL_CONNECTIONS: " . $1) } } $funDebug ("start") /ip firewall connection :local arrConnections [find protocol=udp]; :local numErr 0; :foreach conn in=$arrConnections do={ :do { remove $conn } on...
by vklpt
Tue Jan 04, 2022 3:54 pm
Forum: General
Topic: Port knocking with URL
Replies: 15
Views: 5726

Re: Port knocking with URL

v2022-01-03
Added: favicon, reload, an asterisk at expired dates
Changed: HTML template (simpler and more mobile-friendly)
by vklpt
Fri Mar 12, 2021 2:19 pm
Forum: Scripting
Topic: Mikrotik script how to line break
Replies: 7
Views: 8328

Re: Mikrotik script how to line break

For Python: try to replace '\n' with '\r\n'
by vklpt
Thu Sep 03, 2020 10:17 pm
Forum: Scripting
Topic: Yet another interface check script
Replies: 1
Views: 688

Re: Yet another interface check script

Demo:
by vklpt
Thu Sep 03, 2020 10:16 pm
Forum: Scripting
Topic: Yet another interface check script
Replies: 1
Views: 688

Yet another interface check script

https://github.com/vikilpet/mikrotik-interface-check Advantages: - Can be used for one or more interfaces. - Any type of interface. - Ping several addresses (relying on one is too unreliable). - You can run it as often as you like - it can detect fail relatively fast. - Easy setup - you only need to...
by vklpt
Sat Aug 01, 2020 7:51 pm
Forum: Scripting
Topic: Python scripting platform
Replies: 4
Views: 6694

Re: Python scripting platform

v2020-08-01 changed job_pool and job_batch so that parallel execution is a bit more convient to use.
by vklpt
Thu Jul 23, 2020 9:13 pm
Forum: General
Topic: Port knocking with URL
Replies: 15
Views: 5726

Re: Port knocking with URL

v2020-07-23 + hotkey «s». Now you can add new users without having to restart the program.
by vklpt
Thu Apr 23, 2020 1:29 pm
Forum: General
Topic: Port knocking with URL
Replies: 15
Views: 5726

Re: Port knocking with URL

v2020-04-23 + hotkeys
by vklpt
Mon Apr 20, 2020 6:48 pm
Forum: Scripting
Topic: Python scripting platform
Replies: 4
Views: 6694

Re: Python script platform

Upload TOR nodes to router: def MikroTik_TOR_nodes_update(submenu='demo'): # Only one fetch per 30 minutes allowed # by the author of list! # Skip IPv6 addresses. ROUTER_IP = '192.168.88.1' USER = 'admin' PWD = 'PaSsW0rD' # Exit nodes only: URL = 'https://www.dan.me.uk/torlist/?exit' LIST_NAME = 'TO...
by vklpt
Mon Apr 20, 2020 6:02 pm
Forum: General
Topic: Port knocking with URL
Replies: 15
Views: 5726

Re: Port knocking with URL

v2020-04-20
new logging format
web_knocking_2020-04-20_16_42_53.png
by vklpt
Wed Apr 15, 2020 9:38 pm
Forum: General
Topic: Port knocking with URL
Replies: 15
Views: 5726

Re: Port knocking with URL

v2020-04-15
+ Logging to a file
by vklpt
Mon Apr 13, 2020 7:59 pm
Forum: General
Topic: Port knocking with URL
Replies: 15
Views: 5726

Re: Port knocking with URL

The code is now publicly available.
It also may work with non-routeros devices with help of netmiko but i have MikroTik's only.
by vklpt
Sat Jan 25, 2020 4:26 pm
Forum: Scripting
Topic: Python scripting platform
Replies: 4
Views: 6694

Re: Python script platform

It is possible to run commands in parallel ( v2020-08-01 update) Example - remove UDP connections without reply on all routers: def MikroTik_Remove_UDP_connections_without_reply(submenu='demo'): ''' Send this command to all routers simultaneously: /ip firewall connection remove [find protocol=udp an...
by vklpt
Mon Aug 19, 2019 10:18 pm
Forum: Scripting
Topic: Python scripting platform
Replies: 4
Views: 6694

Re: Scheduler with API support

New function - routeros_find_send to simplify editing of existing settings. Remove static items from address-list: routeros_find_send( cmd_find=[ '/ip/firewall/address-list/print' , '?list=MY_LIST' , '?dynamic=false' ] , cmd_send=['/ip/firewall/address-list/remove'] , device_ip='192.168.88.1' , devi...
by vklpt
Sun Jul 14, 2019 2:06 pm
Forum: Scripting
Topic: Python scripting platform
Replies: 4
Views: 6694

Python scripting platform

Open source scripting platform for Windows with RouterOS API support. Платформа для скриптов с поддержкой ROS https://github.com/vikilpet/Taskopy Russian page: https://vikilpet.wordpress.com/taskopy/ Example — add IP from clipboard to address-list "my_list": def add_ip_to_list(hotkey='alt+...
by vklpt
Wed Mar 06, 2019 8:53 pm
Forum: General
Topic: Port knocking with URL
Replies: 15
Views: 5726

Re: Port knocking alternative

Besides being less practical than nping You did not get the idea. I suspected the executable might be malicious. VT Detection ratio: 11 / 70 Check VirusTotal: https://www.virustotal.com/en/file/d81c4fc522dad30fc355e92d53799542552fb7bf31f4597a9ee065156a70d40d/analysis/ If you believe in power of heu...
by vklpt
Tue Mar 05, 2019 7:31 pm
Forum: General
Topic: Port knocking with URL
Replies: 15
Views: 5726

Re: Port knocking alternative

Update:
• New ini parameter: url_prefix
by vklpt
Tue Feb 19, 2019 7:29 pm
Forum: General
Topic: QUEUE only for one TCP port
Replies: 4
Views: 1250

Re: QUEUE only for one TCP port

packet-mark and routing-mark are different things. You should use mark-packet action in mangle
by vklpt
Tue Feb 19, 2019 2:12 pm
Forum: General
Topic: QUEUE only for one TCP port
Replies: 4
Views: 1250

Re: QUEUE only for one TCP port

May be you messed up with source/destination port or source/destination queuing. You better show your rules.
by vklpt
Tue Feb 19, 2019 10:33 am
Forum: General
Topic: redirect subdomain(NAT) [SOLVED]
Replies: 11
Views: 6032

Re: redirect subdomain(NAT) [SOLVED]

@sob: good point. I automatically expected he talks about HTTP because the domain is completely irrelevant in ICMP and most other protocols. @vklpt: Nope. Layer7 communication starts AFTER the L4 is established. And NAT has to occur on first packet of connection. Even the definition of L7 matcher d...
by vklpt
Tue Feb 19, 2019 10:25 am
Forum: General
Topic: Voice Quality Issue
Replies: 2
Views: 1148

Re: Voice Quality Issue

It sounds like link congestion issue. You should monitor traffic load of your interfaces and CPU load of your router.
by vklpt
Tue Feb 19, 2019 10:22 am
Forum: General
Topic: Routing SIP to specific WAN
Replies: 2
Views: 1344

Re: Routing SIP to specific WAN

Many SIP devices have RTP port range in settings, so you can set that range and match RTP packets by range.
Other way there may be setting in SIP devices to mark packets with DSCP so you can use those markings in mangle.
by vklpt
Tue Feb 19, 2019 10:15 am
Forum: General
Topic: redirect subdomain(NAT) [SOLVED]
Replies: 11
Views: 6032

Re: redirect subdomain(NAT) [SOLVED]

You should try to use content or Layer7 matcher to distinguish those packets in NAT rules.
by vklpt
Mon Feb 18, 2019 7:14 pm
Forum: General
Topic: Public IP Address Blacklisted
Replies: 4
Views: 2110

Re: Public IP Address Blacklisted

Check if your IP's listed in spam databases, for example here
https://2ip.ru/spam/
by vklpt
Mon Feb 18, 2019 7:08 pm
Forum: General
Topic: Office 365 traffic shaping and priority on RouterOS
Replies: 4
Views: 5551

Re: Office 365 traffic shaping and priority on RouterOS

Add this servers to address-list: https://docs.microsoft.com/ru-ru/office365/enterprise/urls-and-ip-address-ranges then mark traffic from and to this address-list with some marks. Also you need mark all other traffic with another marks. Then make a queue tree: https://wiki.mikrotik.com/wiki/Manual:Q...
by vklpt
Mon Feb 18, 2019 6:50 pm
Forum: General
Topic: publishing solar winds orion on internet
Replies: 1
Views: 799

Re: publishing solar winds orion on internet

Why not just google "mikrotik port forwarding"?
https://wiki.mikrotik.com/wiki/Manual:I ... FTP_server
by vklpt
Mon Feb 18, 2019 6:48 pm
Forum: General
Topic: Load balancing and failover, EoIP, Bond.
Replies: 4
Views: 2931

Re: Load balancing and failover, EoIP, Bond.

/interface eoip add loop-protect=off mac-address=02:20:98:72:C9:A2 name=eoip-tunnel1 remote-address=11.11.11.10 tunnel-id=500 add loop-protect=off mac-address=02:20:98:72:C9:A2 name=eoip-tunnel2 remote-address=22.22.22.10 tunnel-id=501 /interface eoip add loop-protect=off mac-address=02:26:13:F5:00...
by vklpt
Mon Feb 18, 2019 4:14 pm
Forum: General
Topic: Port knocking with URL
Replies: 15
Views: 5726

Port knocking with URL

web_knocking_en_2020-04-13_19_51_26.png Let's call it «Web Knocking». The idea is simple - we open the ports just by clicking on the link. This is a web server that sends IP addresses of valid requests to the white list and IP addresses of bad requests to the black list: https://github.com/vikilpet...