Giter Club home page Giter Club logo

routeros-scripts's People

Contributors

bharrisau avatar bubenkoff avatar eworm-de avatar mgisbers avatar netravnen avatar netztrip avatar packelend avatar ziegenberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

routeros-scripts's Issues

Add html support to notification telegram

Hi,
This is a suggestion, would it be possible to add html support to the notification telegram bot in the future? Now it is only possible to send in markdown format and forcing the body to be in a code box.

Greetings

Foreign scripts & modules

Hello everybody,

people start to contribute scripts, but I am not interested in using all of them, or even missing hardware to do so. Merging them here is a bad trade off for both of use, the contributor and me: Issues are opened here, the contributor does not recognize (without me forwarding them). On the other hand all changes would have to be reviewed and merged by me, mostly without testing.

To mitigate that situation I think about adding a new section Foreign scripts & modules to the main README, just below Installing custom scripts & modules. You could add links to your website or repository with the scripts, and link back to my repository for general information, base installation and other scripts.

Any comments on this? I would like some feedback from @zainarbani (for #22) and @bubenkoff (#31 & #32). Do you think this is a reasonable solution for you?

[feature] UTF8 encoding and join SMSs

Hi,
I'm using script for telegram notification, but messages are received without diacritics. Is there a way how to display them correctly ? And 1 long message is distributed as 2 notifications, can it be joined into single notification ?

image

Same behavior is visible in emails too:

image

Failed sending telegram notification

Hi,
first of all, Thank You for such a great library of script. I'm using at home this for forwarding my SMS to Telegram. It was working ok, but it suddenly stopped. I have tried to update script, but I have same error in logs:

image

I have noticed, that in script is used

/ tool fetch check-certificate=yes-without-crl keep-result=no 

but according to RouterOS, it is deprecated parameter

image

This is my setup:

[rch@mikrotik] /system identity> /system routerboard print 
       routerboard: yes
        board-name: hAP ac^2
             model: RBD52G-5HacD2HnD
     serial-number: xxxxxxxxxxxx
     firmware-type: ipq4000L
  factory-firmware: 6.42.3
  current-firmware: 6.44.3
  upgrade-firmware: 6.46.2

Could you please modify script to work with 6.46.x version ?

Thank You

Found Trouble in email-backup script

There are some issue in version 55. $SendEMail2 functions is unable to send out email in email-backup. will it be carry attachment issue in that function? Meanwhile $SendNotification2 can send out telegram , matrix and email.
My version is 6.48.3

Email-Backup

That is great set of scripts, appreciate to all of your works .
The script contains a folder to organize backup file(s) . That is good idea but there are minor issue that is attached file contains the folder name.

image

it is my person modification with daily backup and monthly backup, it will keep monthly and current date backup.

My modification sharing.

#Add type of backup
:local TypeOfBackup "";
:local mday [:pick $YYYYMMDD 6 8];
:if ($mday = "01") do={
set $TypeOfBackup ("Monthly")
} else= {
set $TypeOfBackup ("Daily")
}

#Remove Outdate Backup file
/ file remove [ /file find where name~"^$0/..-$TypeOfBackup-.$"]

#Rewrite File with date & time pattern
:local FileName ([ $CharacterReplace ($Identity . "." . $Domain) "." "_"]."-".$TypeOfBackup."-". $YYYYMMDD . "-". $HHMMSS );

#Rewrite Subject Line with date & time pattern
subject=([ $SymbolForNotification "floppy-disk,incoming-envelope" ] .
"Backup & Config"." ".$TypeOfBackup." ". $YYYYMMDD . " [" . [/system clock get time] . "]"); \

DHCP-to-DNS script IPv6 support

I have used a similar script to dhcp-to-dns for assigning static DNS records to IPv4 addresses and previously modified it to also generate records for IPv6 addresses based on DHCPv4 leases' MAC address and IPv6 Neighbor List entries. I haven't thought about it much before, so there might be some scenario where this kind of solution misbehaves. Nevertheless, I believe we deserve some way to implement DNS auto-configuration for IPv6 as well...

Is this feature wanted or is the dhcp-to-dns script considered feature-complete? Would perhaps a separate script implementing this feature be welcomed or does this feel too hacky?

Email Backup error

Hello,

If i try to trun "/ system script run email-backup" i get the error "Error sending email [xxx] Backup & Config>:invalid BODY; I seems that there is a problem with the file.

Im using version 6.44.5 and 6.45.1. Sending a test mail over the menu is working fine.

Thanks a lot for your work

notification doesn't stat from netwatch

i have a very simple monitor via netwatch

preface:
i have notification enabled via mail, ntfy and telegram.
via terminal, if i do a simple
$SendNotification "test" "test"
everything works !

on a Netwatch monitor i have set for UP:

:global SendNotification
$SendNotification "Test" "Up";

for DOWN:

:global SendNotification
$SendNotification "Test" "Down";

but on netwatch it doesn't work.
tested by logging something, and it works fine.
any suggestions on why it happens ?

:global MkDir;

Hi,

I have deployed about 10 pcs of router for different models , some of router is unable create email-backup folder when first run of script. image
Once folder is created, all email-backup will run successfully on 2nd times and so on.

Sunny

Netwatch notify number of checks before wan-up?

On the netwatch notify Is it possible to use the count for wan-up as well as wan-down? (or have a separate count for WAN-Up)

Ideally I'd like the wan to pass a certain number of checks before it's brought back into use to deal with a link that's not completely dead but has high levels of packetloss. (E.g a wireless link in bad weather)

dhcp-to-dns crashes with IP pool instead of address

Hello, is there any nice solution on how to use "active address" instead of address? I have a bunch of leases where the address is a pool and of course, the script will crash on it because dhcp_pool0 is not valid ipv4 or ipv6. thx for the response.

dhcp-to-dns script question.

Hi, first thank you for all your hard work on this. I am a bit of a ROS newbie so please bear with me.

I installed the dhcp-to-dns script and am using a simple private internal .lan for my domain name. I would like the static DNS record to be hostname.lan. Instead I am getting hostname.dhcp.lan. I have the HostNameInZone configured to false, hopefully that is correct. Any way to have this appear simply as hostname.lan?

Also - I am unclear why there is the global-config overlay VS just global-config. Which one takes precedent? Does one update the other?

Thanks in advance and sorry of the layman questions.

Dhcp2dns

Hi, first thank you for all your hard work on this.
I use this script, but every time it runs, the processor is 100% utilized. Tried to run from the console, the script runs for 20-30 seconds. There are no more than 10 reservations in dhcp.
Also, on the firewall, I redirect all traffic on port 53 from the local network to the router itself.
So I use DoH (adguard).
What could be the reason for the high utilization rate?

Allow to customize certificate name

I'm using github as a base url to pull updates and thus don't need Let's Encrypt cert. Please consider making certificate name that your script expects customizable.

Autoreboot?

With this script, the router should restart after 1 minute if autoupgrade is switched on and an upgrade is available, right? Because nothing happens to me.

log-forwarding: non expected messages are still forwarded

I have only those settings in the config:

:global LogForwardIncludeMessage "(olha)";

But still get such messages forwarded for some reason:

The log on LTE contains these 2 messages after 2d18:32:21 uptime.

๐Ÿ”ด๏ธ 06:50:44 ipsec;error phase1 negotiation failed due to time up 33[500]<=>33[37672] d8757bb7945e3880:f23e9a07bac4fbdc
๐Ÿ”ด๏ธ 06:50:45 ipsec;error phase1 negotiation failed due to time up 33[500]<=>323[14651] 1a32d74bb499f6f1:e997e28f4652eccf

The expected messages are also passed, but just some additional non-expected messages also do pass.
Can you please help me understand what I missed in the configuration, or is it a bug?

ipv6-update adds 1 to the static IPv6 DNS-name's address if it ends in even number

Tested on RouterOS v7.1b6 Example prefix: 2001:7d0:87cc:c600::/56

  1. Create static IPv6 DNS record ending with ::1
  2. Disable dhcpv6-client, enable dhcpv6-client -> new prefix propagates correctly, static address ends with ::1
  3. Create static IPv6 DNS record ending with ::2
  4. Disable dhcpv6-client, enable dhcpv6-client -> new prefix propagates correctly, but address ends with ::3
  5. Disable dhcpv6-client, enable dhcpv6-client -> new prefix propagates correctly, static address ends correctly with ::3

64k limit problem for "tool fetch url"

If the size of the IP list in the URL for the fw-addr-lists list is larger than 64k, it cannot download all of it. It can download the first 64k size. Can you do a looped download in parts for this, @eworm-de?

For example, can you download the entire content in parts like this with a loop?
:tool fetch url=$url http-header-field="Range: bytes=$start-$end" output=user defined

Updates for global-config

Hello,
Just discovered your Mikrotik script repo and it looks really nice !

Can you just elaborate on this :
:global ScriptUpdatesIgnore {
"global-config"
}

Why is this file not updated on script-update ? How are we supposed to change the destination address for mail backup ?

Thanks a lot for your work

Netwatch-Notify configuration questions.

Hi,
Again - thank you for all of this - I am leaning much about how scripting works and I sincerely thank you.

If this is not the best way to ask questions, as these are not code issues necessarily, please let me know.

Questions - I am looking through this and trying to understand the "several" checks aspect of this script. If I understand correctly the default if =>5? So if the time out is 5s then it would roughly check for a period of 25 seconds before initiating the email?

Also - if I was going to turn an interface on/off or enable/disable a firewall rule would I add them as I have below in my example as SET CUSTOM ACTIONS HERE?

 :if ($Metric->"count" >= 5 && $Metric->"notified" != true) do={
      $SendNotification ("Netwatch Notify: \E2\9D\8C " . $HostName . " down") \
        ("Host " . $HostName . " (" . $HostVal->"host" . ") is down since " . $HostVal->"since" . ".");
      :set ($Metric->"notified") true;
      **SET CUSTOM ACTIONS HERE**
    }

Many thanks again.

ADD username/password auth for ntfy

Hello !
can you provide a way to specify username and password for ntfy ?
fetch can accomodate user, pass for that.

some private ntfy instances (self-hosted) can be secured by that

thanks

Failed Telegram Notification

Testing the telegram notification.
triple checked bot chatId and BotToken, they are correct.
postman works with that parameters.

notification is queued and never received.

i can see that it is downloading a GOdaddy cert, CRL is in red.

image
image

have you recently tested it ?

Script syntax broken. not compatible with ROS v6.49.7

Forward slashes for elements inside RouterOS are deprecated. For example: /system/routerboard/print no longer functions, the proper syntax is now /system routerboard print

for this reason, the entire script system is unusable on ROS v6.49.7

Anleitung

Hallo Christian,

Hast du eine Anleitung wie genau man die Scripte einbinden etc muss. Probiere gerade seit 2 Tage das z.B SMS Befehls Script zum laufen zu bekommen.

sG

Manage system update - schedule reboot at night no longer working

When running /system/script/run packages-update; I can no longer schedule a reboot over night.

Output of Terminal:

/system/script/run packages-update;
info: Package file routeros already exists.
info: Running backup script backup-cloud before update.
  status: finished

info: Rebooting for update.
Reboot, yes? [y/N]: 
N
action cancelled

RouterOS Version 7.9

How use script s with Netwatch ?

Hello ,

I want to know how to use the scripts with Netwatch ?

I mean should I write the script ? there are no free scripts ?

I mean I want to have a script to send me a message where any GRE Tunnel is down for 1 second ?

I really need your help

Best Regards

$DownloadPackage not pulling packages

$DownloadPackage failed to connect and pull packages. Issue is at line 261 in the global-functions.

The line reads:
:local PkgFile ($PkgName . "-" . $PkgVer . "-" . $PkgArch . ".npk");

Corrected line:
:local PkgFile ($PkgName . "-" . $PkgArch . "-" . $PkgVer . ".npk");

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.