Community discussions

MikroTik App

Search found 31 matches

by globalmedia
Mon Sep 16, 2024 7:21 am
Forum: Announcements
Topic: v7.15.3 [stable] is released!
Replies: 649
Views: 271217

Re: v7.15.3 [stable] is released!

Hi, I'm not able to get work Netwatch/ fetch to send any notification. I had fetch thorough Teams I did not touch the config but it is not working anymore after package upgrade to version 7.15.3. Today I tried set it up with Telegram and there is info Fetch failed with status 400 or Mode not specify...
by globalmedia
Wed Jun 26, 2024 5:30 am
Forum: General
Topic: Regex Format in Conditional DNS forwarding
Replies: 24
Views: 2429

Re: Regex Format in Conditional DNS forwarding

This is my first time using MK regex... I think I finally solve this puzzle. As I have a script updating dns static on dhcp leasing, I need to make a small change. Previously I has DNS static using this domain: WORD-XX.ad.localdomain. The machine/printer name still the same, for example: SALES-01, S...
by globalmedia
Tue Jun 25, 2024 6:42 pm
Forum: General
Topic: Regex Format in Conditional DNS forwarding
Replies: 24
Views: 2429

Re: Regex Format in Conditional DNS forwarding

Do you think is it a bug in RB implementation? ([^a-zA-Z0-9]*[^-][^0-9]{2})(\\.*[\\.]?ad\\.localdomain\$) I'm exhausted from testing different possibilities. Can you see the error of not being able to validate just the domain? :put ("ad.localdomain"~"([^a-zA-Z0-9]*[^-][^0-9]{2})(\\.*[...
by globalmedia
Tue Jun 25, 2024 4:48 pm
Forum: General
Topic: Regex Format in Conditional DNS forwarding
Replies: 24
Views: 2429

Re: Regex Format in Conditional DNS forwarding

Thank you for everybody that participate to this thread. I finally did it: For who want to do something similar, follow the working regex: :put ("test-01.ad.localdomain"~"([^a-zA-Z0-9]*[^-][^0-9]{2})(\\.*[\\.]?ad\\.localdomain)\$") :put ("test.ad.localdomain"~"([^a...
by globalmedia
Tue Jun 25, 2024 3:33 pm
Forum: General
Topic: Regex Format in Conditional DNS forwarding
Replies: 24
Views: 2429

Re: Regex Format in Conditional DNS forwarding

Ok! Now I am matching, but the first group I want to negative it. ?! just doesn't work. > :put ("test-01.ad.localdomain"~"^([a-zA-Z0-9]*[-][0-9]{2})(\\.*[\\.]?ad\\.localdomain)\$") true > :put ("test.ad.localdomain"~"^(?![a-zA-Z0-9]*[-][0-9]{2})(\\.*[\\.]?ad\\.loca...
by globalmedia
Tue Jun 25, 2024 2:59 pm
Forum: General
Topic: Regex Format in Conditional DNS forwarding
Replies: 24
Views: 2429

Re: Regex Format in Conditional DNS forwarding

I have tried different ways: > :put ("test.ad.localdomain"~"^(?![a-zA-z0-9]*[-][0-9]{2})(.*[\\.]?ad\\.localdomain)\$") false > :put ("test.ad.localdomain"~"^([\\W]*[-][\\D]{2})(.*[\\.]?ad\\.localdomain)\$") false > :put ("test.ad.localdomain"~"^...
by globalmedia
Tue Jun 25, 2024 2:47 pm
Forum: General
Topic: Regex Format in Conditional DNS forwarding
Replies: 24
Views: 2429

Re: Regex Format in Conditional DNS forwarding

Thank you for helping me. Sorry for that. I want to match anything [\.]?ad.localdomain (with or without dot), including subdomains, except for subdomain where you have word-XX (where XX is a numeric value). Using https://regex101.com/ you can easy debug the regex. With your tips now I will try to de...
by globalmedia
Mon Jun 24, 2024 8:46 pm
Forum: General
Topic: Regex Format in Conditional DNS forwarding
Replies: 24
Views: 2429

Re: Regex Format in Conditional DNS forwarding

Could you help me to rewrite this regexp ^(?![\\w]*[-][\\d]{2})(.*[\\.]?ad\\.localdomain)$ to work correctly in RouteOS V7? @tanget's right, RouterOS is closer to the C-runtime's more limited subset. But I'm not sure your doing anything tricky in the regex... You can run a simple test on RouterOS CL...
by globalmedia
Mon Jun 24, 2024 8:44 pm
Forum: General
Topic: Regex Format in Conditional DNS forwarding
Replies: 24
Views: 2429

Re: Regex Format in Conditional DNS forwarding

:put doesn't work for me. How do you debug scripts placed inside system / scripts? Every :put inside the script just is not being displayed. I am using v7. @tanget's right, RouterOS is closer to the C-runtime's more limited subset. But I'm not sure your doing anything tricky in the regex... You can ...
by globalmedia
Sun Jun 23, 2024 10:07 pm
Forum: General
Topic: Regex Format in Conditional DNS forwarding
Replies: 24
Views: 2429

Re: Conditional DNS forwarding

Hello, I did it, look: > /ip dns static add regexp="^(?![\\w]*[-][\\d]{2})(.*[\\.]?ad\\.localdomain)$" match-subdomain=yes type=FWD forward-to=10.10.10.10 failure: name or regexp required My regexp doesn't work. Don't know why. I have checked it several times in https://regex101.com/. Mayb...
by globalmedia
Sun Jun 23, 2024 9:50 pm
Forum: General
Topic: Regex Format in Conditional DNS forwarding
Replies: 24
Views: 2429

Re: Conditional DNS forwarding

Sorry, I just see that is possible to add regexp directly to DNS static. But even doing that, it's not working: /ip/dns/static> add regexp="^(?![\\w]*[-][\\d]{2})(.*[\\.]?ad\\.localdomain)$" forward-to=10.10.10.10 failure: name or regexp required RegExp is not working correctly for me. Bec...
by globalmedia
Sun Jun 23, 2024 9:35 pm
Forum: General
Topic: Regex Format in Conditional DNS forwarding
Replies: 24
Views: 2429

Re: Conditional DNS forwarding

Because I want to forward DNS requests to different servers based on hostname request. Using this rules: /ip firewall layer7-protocol add name=testdns regexp=lantest.mindlesstux.com /ip firewall nat add action=dst-nat chain=dstnat disabled=no dst-address=4.2.2.2 dst-port=53 layer7-protocol=testdns p...
by globalmedia
Sun Jun 23, 2024 8:39 pm
Forum: General
Topic: Regex Format in Conditional DNS forwarding
Replies: 24
Views: 2429

Regex Format in Conditional DNS forwarding

I have created a this REGEXP below: ^(?![\w]*[-][\d]{2})(.*[\.]?ad\.example\.com)$ But doesn't work on Mikrotik Layer7 RegExp. Can anyone help me to convert it to mikrotik? Here is a little run down on how to do this, the only thing left to do is to check what janisk says but im pretty sure this han...
by globalmedia
Sun Jun 23, 2024 8:01 pm
Forum: General
Topic: regex on Layer7 Protocols
Replies: 1
Views: 414

Re: regex on Layer7 Protocols

I am using https://regex101.com/ to help me debug the expression. Finally I have done an expression that matches what I need... But when I try to insert it in the layer 7 regexp, I just got a message saying that is not possible to use it. The expression I want to use is: ^(?![\w]*[-][\d]{2})(.*)([\....
by globalmedia
Sun Jun 23, 2024 4:52 am
Forum: General
Topic: regex on Layer7 Protocols
Replies: 1
Views: 414

regex on Layer7 Protocols

Dear community, I am not good with regex and I would love a help. I would like to create a regex rule where I ignore some records: ([^\W].*[A-Za-z][-][0-9][0-9])\.ad\.example\.com Basically I need to select any ad.example.com or *.ad.example.com EXCEPT host that start with LETTERS-\d{2}.ad.example.c...
by globalmedia
Mon Jun 17, 2024 11:37 pm
Forum: Scripting
Topic: DHCP lease script
Replies: 2
Views: 1680

DHCP lease script

Dear community, What exactly is wrong with this script? I am using RouteOS V7 and get this script from wiki page. # Domain to be added to your DHCP-clients hostname :local topdomain; :set topdomain “localdomain”; # Use ttl to distinguish dynamic added DNS records :local ttl; :set ttl "00:59:59&...
by globalmedia
Thu Jun 13, 2024 6:56 pm
Forum: General
Topic: How Can I Show A Custom Message When Blocking Sites Using FireWall?
Replies: 6
Views: 4149

Re: How Can I Show A Custom Message When Blocking Sites Using FireWall?

Is it possible to identify in the logs what site was blocked?
by globalmedia
Sun Jun 02, 2024 5:35 pm
Forum: Scripting
Topic: Script not running
Replies: 5
Views: 1791

Re: Script not running

Why the :put just doesn't work for me? The only way to see in console what is happening is using /log info for debug. Is that normal? Where put prints on?
by globalmedia
Sun Jun 02, 2024 4:57 pm
Forum: Scripting
Topic: Script not running
Replies: 5
Views: 1791

Re: Script not running

Thank you so much for both you guys. I am very grateful for your explanations. Helped me a lot.
by globalmedia
Fri May 31, 2024 11:05 pm
Forum: Scripting
Topic: Script not running
Replies: 5
Views: 1791

Script not running

Dear users, hope you doing well. I am trying to learn more about scripting in RouteOS so I am writing some codes to help me understand the possibilities. But I need a way to debug the script and it's no working well. There is a button called ˜Run Script" in the script window, but when I run it ...
by globalmedia
Mon Apr 15, 2024 4:21 am
Forum: General
Topic: Specific DST-List over VPN
Replies: 2
Views: 501

Specific DST-List over VPN

I would like to understand what I am doing wrong. I have a Wireguard VPN working. I can ping local and remote IP addresses from LAN. The VPN interface is configured for masquerated too. But when I am trying to force specific traffic over VPN it's losing packages. /ip route add distance=1 dst-address...
by globalmedia
Fri Mar 24, 2023 7:45 am
Forum: General
Topic: Firewall input drop all except LAN
Replies: 8
Views: 2440

Re: Firewall input drop all except LAN

Recommended that topic for all mikrotik new user.
by globalmedia
Fri Mar 24, 2023 7:43 am
Forum: General
Topic: Port flapping (ether3 link down/up)
Replies: 0
Views: 381

Port flapping (ether3 link down/up)

I am using a RB2011uias-2hnd-in with RouteOS 7.8 and my ether3 is constantly flapping (ether3 down / ether3 up). It's like 2 or 3 times per hour. Sometimes more than 3 hours. I have found some topics in the forum relating the same issue in different models. Is that a bug in mikrotik?
by globalmedia
Fri Mar 24, 2023 12:17 am
Forum: General
Topic: RB2011 and degraded Internet speed
Replies: 9
Views: 1001

Re: RB2011 and degraded Internet speed

I am referring to this one... Checkout the RB4011iGS+5HacQ2HnD-IN
Why would you replace a router with a wifi router, the 4011 has a WIRED only version and better anyway for the same price point is the RB5009?
by globalmedia
Thu Mar 23, 2023 5:36 am
Forum: General
Topic: RB2011 and degraded Internet speed
Replies: 9
Views: 1001

Re: RB2011 and degraded Internet speed

Unfortunately ECMP also uses the mangle: / ip firewall mangle add chain=input in-interface=wlan1 action=mark-connection new-connection-mark=wlan1_conn add chain=input in-interface=wlan2 action=mark-connection new-connection-mark=wlan2_conn add chain=output connection-mark=wlan1_conn action=mark-rout...
by globalmedia
Thu Mar 23, 2023 5:30 am
Forum: General
Topic: RB2011 and degraded Internet speed
Replies: 9
Views: 1001

Re: RB2011 and degraded Internet speed

Thank you so much. I will read about ECMP. What are the side-effects without marking connection from mangle? Could you give me an example and how to fix it with routing rules? Sincerely You could try ECMP. While that mean "equal cost" load balancing, you use >2 default route to essentially...
by globalmedia
Thu Mar 23, 2023 5:29 am
Forum: General
Topic: RB2011 and degraded Internet speed
Replies: 9
Views: 1001

Re: RB2011 and degraded Internet speed

Getting a modern router with horsepower is certainly recommended.
Unaware of any method to avoid mangling in this case.
I am thinking about it. The only similar device is the 4011 with wireless.
by globalmedia
Thu Mar 23, 2023 4:14 am
Forum: General
Topic: RB2011 and degraded Internet speed
Replies: 9
Views: 1001

RB2011 and degraded Internet speed

Dear all, I would like to know if there is a different approach to implementing dynamic load balance without mangle using two wan ports (wan1-pppoe/wan2-dhcp). I checked some: using pcc, nth, etc. All them using mangle. Why am I asking? Because I have 500mb in wan1 and 300mb in wan2, but when I conf...
by globalmedia
Thu Mar 23, 2023 3:52 am
Forum: General
Topic: Firewall input drop all except LAN
Replies: 8
Views: 2440

Re: Firewall input drop all except LAN

I got it. Thank you so much! Mindset changes! :-D Its simple for both chains a few default rules a few user rules drop all No need to get cute............ allow Admin to router allow users to needed services drop all else allow subnets to WAN ************** allow port forwarding drop all else **** a...
by globalmedia
Tue Mar 21, 2023 10:48 pm
Forum: General
Topic: Firewall input drop all except LAN
Replies: 8
Views: 2440

Re: Firewall input drop all except LAN

Dear, I absolutely agree with you. But the comments came from the examples that I have used. I will make necessary changes with your suggestions. Accept all only from admin IPs. Accept from all only 53 and 123 ports. And I have observed the following... I am also getting a lot of ACK,PSH messages an...
by globalmedia
Mon Mar 20, 2023 11:14 pm
Forum: General
Topic: Firewall input drop all except LAN
Replies: 8
Views: 2440

Firewall input drop all except LAN

I have enabled the defconf: drop all not coming from LAN rule in the firewall. Basically it is an input drop !LAN After that I am getting a lot of these messages in the log: OUT-OF-LAN input: in:ether1-pppoe-out1 out:(unknown 0), connection-state:new src-mac xx:xx:xx:xx:xx:xx, proto UDP, xxx.xxx.xxx...