Community discussions

MikroTik App

Search found 65 matches

by wcsnet
Fri Jun 21, 2024 1:52 pm
Forum: General
Topic: KNOT - modbus routing via MQTT
Replies: 16
Views: 5998

Re: KNOT - modbus routing via MQTT

This is what I do to get modes to mqtt # wcs, copyright © 2010. all rights reserved # script version : 1.0 :local errors 0 # :global gostatusXscript :while ($gostatusXscript = "no" ) do={ :delay 5s; } :set gostatusXscript "no" # :do { :global modbusregisters { {":set tmp [/i...
by wcsnet
Tue Mar 12, 2024 6:52 pm
Forum: General
Topic: Hairpin NAT using Local DNS
Replies: 9
Views: 1039

Re: Hairpin NAT using Local DNS

the config files for applications get pushed globally both internal and external systems use them so one set of ports just makes for easier management
by wcsnet
Tue Mar 12, 2024 3:29 pm
Forum: General
Topic: Hairpin NAT using Local DNS
Replies: 9
Views: 1039

Re: Hairpin NAT using Local DNS

Okay that works, however what do I do with servers on the same subnet :shock:
by wcsnet
Tue Mar 12, 2024 10:47 am
Forum: General
Topic: Hairpin NAT using Local DNS
Replies: 9
Views: 1039

Re: Hairpin NAT using Local DNS

Currently I have my local dns a records pointing to the router?
by wcsnet
Tue Mar 12, 2024 10:42 am
Forum: General
Topic: Hairpin NAT using Local DNS
Replies: 9
Views: 1039

Re: Hairpin NAT using Local DNS

thanks @mkx

Sounds simple enough I how ever see one concern.
Some of my internal services run on different source ports and I would still require a dot-net to do the port translation

Example service runs on port 1050 and the clients use 5050
by wcsnet
Mon Mar 11, 2024 6:43 pm
Forum: General
Topic: Hairpin NAT using Local DNS
Replies: 9
Views: 1039

Hairpin NAT using Local DNS

Hey Team, For some web services I run the source ip address is extremely important. These web services run both internal and external to the network. When using hairpin nat (src-nat -> masquerade ) I obviously lose the ability to see the source ip address. Is there I way I can use the static dns ent...
by wcsnet
Mon Mar 14, 2016 7:36 am
Forum: Beginner Basics
Topic: Block Whatsapp
Replies: 60
Views: 73124

Re: Block Whatsapp

I have had great sucess with blocking all sorts of things useing dns, for whatsapp i have a script that adds all ip found in the dns cashe to a address list abvously my script is dynamic and can do this for anything isn't that simply put DNS static override and blocking DNS bypassing/sneaking ? Wel...
by wcsnet
Sun Mar 13, 2016 9:58 pm
Forum: Beginner Basics
Topic: Block Whatsapp
Replies: 60
Views: 73124

Re: Block Whatsapp

I have had great sucess with blocking all sorts of things useing dns, for whatsapp i have a script that adds all ip found in the dns cashe to a address list abvously my script is dynamic and can do this for anything
by wcsnet
Wed Mar 02, 2016 10:17 am
Forum: Scripting
Topic: [Solved] Use of externally defined global variables inside import scripts,
Replies: 5
Views: 4329

Re: [Solved] Use of externally defined global variables inside import scripts,

Had just about the same issue, i have global variable for thing used across a number of scripts, for example email addresses . So i have a file "post configuration load.rsc" to basically send just a email but this did not work with a exec "post configuration load.rsc" or import &...
by wcsnet
Tue Jan 19, 2016 9:03 am
Forum: General
Topic: Centrally manage MikroTiks
Replies: 6
Views: 2291

Re: Centrally manage MikroTiks

so this can be done it just takes some clever scripting :-)
by wcsnet
Tue Jan 19, 2016 9:03 am
Forum: General
Topic: Centrally manage MikroTiks
Replies: 6
Views: 2291

Re: Centrally manage MikroTiks

I have a scripting solution that saves specified configurations and then from one central router pushes these to the listed router. Example from the central router i might do this: /system script export compact file="flash/configurator/system script" /system scheduler export compact file=&...
by wcsnet
Fri Nov 20, 2015 8:48 pm
Forum: Beginner Basics
Topic: Block url without proxy
Replies: 4
Views: 2194

Block url without proxy

Or if you use your router as a dns server add a static entry and point it to somewhere


Sent from my iPhone using Tapatalk
by wcsnet
Mon Oct 19, 2015 3:03 pm
Forum: Scripting
Topic: Script to update Ros version and signal in Database
Replies: 4
Views: 1771

Script to update Ros version and signal in Database

Have a look at the fetch command it well documented and there is plenty examples


Sent from my iPhone using Tapatalk
by wcsnet
Thu Oct 01, 2015 3:05 pm
Forum: Scripting
Topic: Trigger when clients connects
Replies: 2
Views: 921

Trigger when clients connects

You could always loop the wireless registration table


Sent from my iPhone using Tapatalk
by wcsnet
Thu Sep 03, 2015 12:19 am
Forum: Scripting
Topic: Script to telnet to modem
Replies: 1
Views: 2142

Script to telnet to modem

Telnet and SSH is only available interactively so it cant be scripted


Sent from my iPhone using Tapatalk
by wcsnet
Wed Sep 02, 2015 7:36 pm
Forum: General
Topic: Central Deployment using Infrastructure-as-a-Code?
Replies: 11
Views: 9029

Central Deployment using Infrastructure-as-a-Code?

WERNER.VENTER.MAIL@GMAIL.COM.


Sent from my iPhone using Tapatalk
by wcsnet
Wed Sep 02, 2015 7:34 pm
Forum: General
Topic: Central Deployment using Infrastructure-as-a-Code?
Replies: 11
Views: 9029

Central Deployment using Infrastructure-as-a-Code?

Maybe a little but off the topic, i have a series of scripts that sync any confic on a per device basis from a central router or a few routers email me if you are interested


Sent from my iPhone using Tapatalk
by wcsnet
Tue Jul 28, 2015 12:50 pm
Forum: Virtualization
Topic: Cloud Hosted Router
Replies: 579
Views: 283064

Re: Cloud Hosted Router

Such good news this!!!
by wcsnet
Tue Jul 28, 2015 12:39 pm
Forum: Scripting
Topic: Run script before shutdown
Replies: 1
Views: 1184

Run script before shutdown

At the moment nope


Sent from my iPhone using Tapatalk
by wcsnet
Tue Jul 21, 2015 9:29 pm
Forum: General
Topic: WinBox background suggestion
Replies: 15
Views: 8137

WinBox background suggestion

+1


Sent from my iPhone using Tapatalk
by wcsnet
Mon Jul 20, 2015 5:41 pm
Forum: General
Topic: Creating Queues in one shot
Replies: 6
Views: 1342

Creating Queues in one shot

Have a lool here http://forum.mikrotik.com/viewtopic.php?t=22760


Sent from my iPhone using Tapatalk
by wcsnet
Mon Jul 20, 2015 5:38 pm
Forum: General
Topic: Creating Queues in one shot
Replies: 6
Views: 1342

Creating Queues in one shot

Yep its ease are they all on the same sibme?


Sent from my iPhone using Tapatalk
by wcsnet
Tue Jun 23, 2015 6:49 pm
Forum: Scripting
Topic: Script for reboot based on wireless clients
Replies: 10
Views: 3942

Script for reboot based on wireless clients

Dude of no one replies send me a mail ill write it for you when i have some time you can then come post it here werner.venter.mail@gmail.com.


Sent from my iPhone using Tapatalk
by wcsnet
Tue Jun 23, 2015 6:46 pm
Forum: General
Topic: [VIDEO] Mikrotik and Cisco OSPF tutorial
Replies: 2
Views: 1519

[VIDEO] Mikrotik and Cisco OSPF tutorial

Thank you !


Sent from my iPhone using Tapatalk
by wcsnet
Mon Jun 22, 2015 3:33 pm
Forum: General
Topic: Indetify Router Initiated Traffic
Replies: 2
Views: 1054

Re: Indetify Router Initiated Traffic

So this is what I did if anyone is interested: add action=passthrough chain=forward comment="-------------------------------------------------- router initiated traffic " disabled=yes add chain="input - x" comment="accept - new traffic" connection-state=new disabled=yes...
by wcsnet
Mon Jun 22, 2015 7:24 am
Forum: General
Topic: NetMetal 5 deployment today!
Replies: 6
Views: 2223

NetMetal 5 deployment today!

Wow those routers are super sexy


Sent from my iPhone using Tapatalk
by wcsnet
Fri Jun 19, 2015 12:36 pm
Forum: General
Topic: Indetify Router Initiated Traffic
Replies: 2
Views: 1054

Indetify Router Initiated Traffic

Hallo Guys I am looking for a firewall filter rule to identify and accept traffic that was Initiated by the actual router. Example, if the router sends out a email I don't want to specifically allow input and output for smtp traffic but rather just identify that the router is sending a email and the...
by wcsnet
Wed Jun 17, 2015 8:27 pm
Forum: General
Topic: IP Cloud question
Replies: 17
Views: 4527

IP Cloud question

Ip cloudy works well though i use it lots!!!


Sent from my iPhone using Tapatalk
by wcsnet
Wed Jun 17, 2015 8:25 pm
Forum: General
Topic: Change Quick Set without running the script.
Replies: 7
Views: 2274

Change Quick Set without running the script.

Is there a document outlining the various thing quickset looks for for example what address etc....


Sent from my iPhone using Tapatalk
by wcsnet
Sat Jun 13, 2015 9:43 pm
Forum: Scripting
Topic: Display router downtime by script
Replies: 7
Views: 2917

Display router downtime by script

Well yes you can do this but would require some scripting i would separate the values first basically get data hours minutes ect each into their own variable then convert each to seconds so if you do this for your two date time samples you should have two seconds values which you can then subtract a...
by wcsnet
Sat Jun 13, 2015 9:35 pm
Forum: General
Topic: [Solved...finally] Is Mikrotik's Road Warrior L2TP/IPsec a Pipe Dream? No!
Replies: 21
Views: 9243

Is Mikrotik's Road Warrior L2TP/IPsec a Pipe Dream?

Yep same issue here cant get l2tp working with iOS however pptp works fine


Sent from my iPhone using Tapatalk
by wcsnet
Thu Jun 11, 2015 5:43 pm
Forum: General
Topic: Did we loose IP cloud?
Replies: 155
Views: 42628

Did we loose IP cloud?

I personally love ip cloud even if it just serves as a backup ddns service


Sent from my iPhone using Tapatalk
by wcsnet
Tue Jun 09, 2015 6:39 pm
Forum: General
Topic: [BUG] SSH client does not works from background script
Replies: 11
Views: 4116

[BUG] SSH client does not works from background script

I also wanted to know if you could ssh or telnet from a script but apparently not it is only available interactively


Sent from my iPhone using Tapatalk
by wcsnet
Sat Jun 06, 2015 2:54 pm
Forum: Beginner Basics
Topic: L2TP IPSec VPN = not working.
Replies: 9
Views: 22596

Re:

I also tried l2tp config for ios but could never get it to work pptp works fine thougj


Sent from my iPhone using Tapatalk
by wcsnet
Thu Jun 04, 2015 10:38 am
Forum: Beginner Basics
Topic: Connecting to PPTP server, not sure how to route
Replies: 10
Views: 4617

Connecting to PPTP server, not sure how to route

Did you check if the firewall is not blocking the traffic


Sent from my iPhone using Tapatalk
by wcsnet
Thu Jun 04, 2015 10:32 am
Forum: Scripting
Topic: Monitoring Script
Replies: 19
Views: 5943

Monitoring Script

The get value might also be different for dhcp leases


Sent from my iPhone using Tapatalk
by wcsnet
Thu Jun 04, 2015 10:31 am
Forum: Scripting
Topic: Monitoring Script
Replies: 19
Views: 5943

Monitoring Script

Yep you can do that but remember only static leases has a comment filed which i use in the acrip


Sent from my iPhone using Tapatalk
by wcsnet
Wed Jun 03, 2015 8:14 pm
Forum: Scripting
Topic: Monitoring Script
Replies: 19
Views: 5943

Monitoring Script

The firewall address list items that aren't dynamic is static


Sent from my iPhone using Tapatalk
by wcsnet
Wed Jun 03, 2015 8:13 pm
Forum: Scripting
Topic: Monitoring Script
Replies: 19
Views: 5943

Monitoring Script

What do you mean by static ip address table?


Sent from my iPhone using Tapatalk
by wcsnet
Wed Jun 03, 2015 8:09 pm
Forum: Beginner Basics
Topic: Connecting to PPTP server, not sure how to route
Replies: 10
Views: 4617

Connecting to PPTP server, not sure how to route

You have to add a route to your companies subnet

add check-gateway=ping distance=1 dst-address=192.168.1.0/24 gateway=vpn client interface


Sent from my iPhone using Tapatalk
by wcsnet
Wed Jun 03, 2015 1:53 pm
Forum: RouterBOARD hardware
Topic: RB433AH TCP transfer CPU 100%
Replies: 11
Views: 3721

Re: RB433AH TCP transfer CPU 100%

Seems like running the test on udp instead of tcp does not drain the cpu that much
by wcsnet
Fri May 22, 2015 9:02 pm
Forum: Beginner Basics
Topic: how to? with multiple DHCP
Replies: 2
Views: 1126

Re: how to? with multiple DHCP

JUAP # /interface bridge filter add action=passthrough chain=forward comment=\ "-------------------------------------------------- isloate dhcp server from wlan1" disabled=yes add action=drop chain=input comment="drop - dhcp traffic" dst-port=67-68 in-interface=wlan1 \ ip-protoco...
by wcsnet
Mon Feb 09, 2015 11:04 am
Forum: Scripting
Topic: Change script owner
Replies: 2
Views: 3186

Re: Change script owner

a cli command would be assume
by wcsnet
Mon Feb 09, 2015 11:02 am
Forum: Scripting
Topic: :resolve problems
Replies: 9
Views: 9344

Re: :resolve problems

This is my version of a resolve script it does ip to host name or host name to ip: wcsnet, copyright © 2010. all rights reserved # script version : 1.0 :do { :local content :local newhost :local oldhost :log info "******************** starting - ip resolve ip*******************" :log info ...
by wcsnet
Thu Feb 05, 2015 2:55 pm
Forum: Scripting
Topic: Help with script for DNS lookups and address lists
Replies: 22
Views: 12340

Re: Help with script for DNS lookups and address lists

this is what I use can be used to get ip from dns name or dns name from ip. # wcsnet, copyright © 2010. all rights reserved # script version : 1.0 :do { :local content :local newhost :local oldhost :log info "******************** starting - ip resolve ip*******************" :log info "...
by wcsnet
Thu Feb 05, 2015 2:26 pm
Forum: Scripting
Topic: Reading/Writing Encrypted Scripts
Replies: 20
Views: 13389

Re: Reading/Writing Encrypted Scripts

+1
Really needed
by wcsnet
Tue Feb 03, 2015 11:35 am
Forum: Scripting
Topic: script to search max rx tx in torch and get ip
Replies: 2
Views: 2065

Re: script to search max rx tx in torch and get ip

I think the interface torch is a interactive tool and cant be scripted.
by wcsnet
Tue Feb 03, 2015 11:11 am
Forum: Scripting
Topic: Monitoring Script
Replies: 19
Views: 5943

Re: Monitoring Script

This is a newer version it runs on 6.25 For this to work you have to add address list items and then these are pinged Example: /ip firewall address-list add address=8.8.8.8 comment="google dns1*100" list="router ping" The comment field is used to store the ping result as well as ...
by wcsnet
Tue Feb 03, 2015 7:46 am
Forum: Scripting
Topic: Script to reset only one counter.
Replies: 2
Views: 1950

Re: Script to reset only one counter.

/queue simple reset-counters 1
by wcsnet
Sun Nov 23, 2014 2:53 pm
Forum: Scripting
Topic: DDNS script for no-ip dyndns ipchange
Replies: 14
Views: 14425

Re: DDNS script for no-ip dyndns ipchange

Check my script futhet up
by wcsnet
Tue Sep 02, 2014 3:10 pm
Forum: Scripting
Topic: DDNS script for no-ip dyndns ipchange
Replies: 14
Views: 14425

Re: DDNS script for no-ip dyndns ipchange

Initially you just have to add

/ip firewall address-list add comment=0.0.0.0 list="my wan ip"
by wcsnet
Fri Aug 29, 2014 9:27 pm
Forum: Scripting
Topic: DDNS script for no-ip dyndns ipchange
Replies: 14
Views: 14425

Re: DDNS script for no-ip dyndns ipchange

Send me a email and ill send it to you werner.venter.mail@gmail.com
by wcsnet
Fri Aug 01, 2014 1:48 pm
Forum: Scripting
Topic: Need help with my script
Replies: 6
Views: 2095

Re: Need help with my script

Your mail syntax looks wrong
by wcsnet
Fri Aug 01, 2014 1:45 pm
Forum: Scripting
Topic: Need help with my script
Replies: 6
Views: 2095

Re: Need help with my script

The best way to debug script is line by line. If there is one line that is wrong the entire script wont work at all. Try to break you script down into simple sections like in your example have the ping result written to a var and then use the var in your if. Small things like that make these scripts...
by wcsnet
Thu Jul 31, 2014 12:10 pm
Forum: Scripting
Topic: notify the user about their consumption
Replies: 6
Views: 2270

Re: notify the user about their consumption

Report looks like this
by wcsnet
Thu Jul 31, 2014 12:08 pm
Forum: Scripting
Topic: notify the user about their consumption
Replies: 6
Views: 2270

Re: notify the user about their consumption

:local content :local i :local megstotal :local bytestotal :local bytescurrent :local bytessaved :local megssaved :local bytesdowncurrent :local megsdowncurrent :local megsupcurrent :local bytesupcurrent :log info "******************** starting - queue usage update ********************" :l...
by wcsnet
Wed Jul 30, 2014 12:20 pm
Forum: Scripting
Topic: Help with my PING script!
Replies: 2
Views: 3097

Re: Help with my PING script!

Maybe this will help Address list item looks like this add address=10.0.0.175 comment=wcsnet-ps1*100 list="router ping" :global scriptemail :global lastping :local content :local checkip :local checklaststatus :local checknewstatus :local checkcomment :local difference :local list :local a...
by wcsnet
Wed Jul 30, 2014 12:04 pm
Forum: Scripting
Topic: how clear Mikrotik Log ?
Replies: 20
Views: 30150

Re: how clear Mikrotik Log ?

/system logging action set memory memory-lines=1

/system logging action set memory memory-lines=100
by wcsnet
Wed Jul 30, 2014 11:57 am
Forum: Scripting
Topic: Cool console script - how to use?
Replies: 4
Views: 2526

Re: Cool console script - how to use?

I have a asci image Glad to see someone also used my scripts :-) :local content :local i :local logcontenttemp "" :local logcontent "" :set logcontenttemp ":.you are logged into: $[/system identity get name] :-D" :set logcontent ("$logcontent " ."$logcont...
by wcsnet
Wed Jul 30, 2014 11:40 am
Forum: Scripting
Topic: Monitoring Script
Replies: 19
Views: 5943

Re: Monitoring Script

I use this My warring log I set to action email so I get mailed for warning log entries The address list entry should look like this add address=10.0.0.175 comment=wcsnet-ps1*100 list="router ping" :global scriptemail :global lastping :local content :local checkip :local checklaststatus :l...
by wcsnet
Wed Jul 30, 2014 11:23 am
Forum: Scripting
Topic: Script for Date and Time
Replies: 12
Views: 46903

Re: Script for Date and Time

:local date
:local time
:local day
:local month
:local year
:local hour

:set date [/system clock get date]
:set time [/system clock get time]
:set day [:pick $date 4 6]
:set hour [:pick $time 0 2]
by wcsnet
Wed Jul 30, 2014 9:28 am
Forum: Scripting
Topic: TELNET ON SCRIPT run by terminal but not from scheduler
Replies: 3
Views: 2618

Re: TELNET ON SCRIPT run by terminal but not from scheduler

I asked Mikrotik support a while ago about this and the response was that telnet within a script currently does not work...
Although it might function well in console.
by wcsnet
Wed Jul 30, 2014 9:23 am
Forum: Scripting
Topic: DDNS script for no-ip dyndns ipchange
Replies: 14
Views: 14425

Re: DDNS script for no-ip dyndns ipchange

This is the no-ip script I use: :global scriptemail :global ddnsurl1 :global ddnsurl2 :local wanipchecklast :local wanipchecknow :local wanipchanged "no" :local ddnsuser "xxx" :local ddnspass "xxx :local ddnshost1 "xxx" :local ddnshost2 "xxx" :log info &q...
by wcsnet
Mon Jul 21, 2014 6:33 pm
Forum: RouterBOARD hardware
Topic: New hardware - mAP
Replies: 155
Views: 100557

Re: New hardware - mAP

The question is why are these not available yet :?
by wcsnet
Fri May 31, 2013 12:54 pm
Forum: General
Topic: A question on Connection Limits
Replies: 23
Views: 8386

Re: A question on Connection Limits

Had exactly the same issue as described above. Is there a way to log the average amount of connections per ip address to try and identify a base limit. Does connection limit work for udp as well, recently i had loads of udp attacks on udp port 53 and was wondering how i could limit connections like ...